-
Notifications
You must be signed in to change notification settings - Fork 0
/
fond_membership_reepay.admin.inc
36 lines (31 loc) · 1.15 KB
/
fond_membership_reepay.admin.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/**
* @file
*/
/**
* Return the Billy global settings form.
*/
function fond_membership_reepay_admin_settings() {
$form['fond_membership_reepay_api_key'] = array(
'#type' => 'textfield',
'#title' => t('Reepay API Key'),
'#required' => TRUE,
'#default_value' => variable_get('fond_membership_reepay_api_key', ''),
'#description' => t('The API key for your Reepay account. Get or generate a valid API key at Reepay. Please read the !termslink.', array('!termslink' => l(t('Reepay API Terms'), 'https://api.reepay.com/api'))),
);
$form['fond_membership_reepay_test'] = array(
'#type' => 'checkbox',
'#title' => t('Mark entities in Reepay as test'),
'#default_value' => variable_get('fond_membership_reepay_test', false),
'#description' => t('Should entities in Reepay be marked as test?')
);
// Initiate API Client.
try {
$api_request = fond_membership_reepay_get_api_client();
}
catch (Exception $e) {
drupal_set_message($e->getMessage(), 'error');
return system_settings_form($form);
}
return system_settings_form($form);
}