Made paypal fees customisable

This commit is contained in:
2015-03-19 13:39:03 +11:00
parent 0c907cc710
commit 1f7e73ae87
2 changed files with 41 additions and 9 deletions

View File

@@ -103,8 +103,8 @@ function booking_admin() {
'#type' => 'textfield',
'#title' => t('Registration limit'),
'#description' => t("Total number of attendees permitted."),
'#size' => 3,
'#maxlength' => 3,
'#size' => 5,
'#maxlength' => 5,
'#required' => TRUE,
'#default_value' => variable_get('booking_regn_limit','500'),
);
@@ -133,7 +133,31 @@ function booking_admin() {
'#options' => array (0 => t('Off'), t('On')),
'#default_value' => variable_get('booking_paypal_sandbox', 0),
);
$form['paypal']['booking_paypal_transaction_fee_fixedcost'] = array (
'#type' => 'textfield',
'#title' => t('Paypal fixed cost transaction fee'),
'#default_value' => variable_get('booking_paypal_transaction_fee_fixedcost', '0.3'),
'#field_prefix' => '$',
'#size' => 5,
'#description' => 'Transaction fee is currently $0.3 AUD and is added before the percentage fee is applied.',
);
$form['paypal']['booking_paypal_transaction_fee_percentage'] = array (
'#type' => 'textfield',
'#title' => t('Paypal Percentage Transaction Fee'),
'#default_value' => variable_get('booking_paypal_transaction_fee_percentage', '2.6'),
'#field_prefix' => '%',
'#size' => 5,
'#description' => 'Percentage of transaction charged as paypal fee, currently 2.6% in Australia',
);
$form['paypal']['booking_paypal_transaction_fee_percentage_intl'] = array (
'#type' => 'textfield',
'#title' => t('Paypal Percentage Transaction Fee (International)'),
'#default_value' => variable_get('booking_paypal_transaction_fee_percentage_intl', '3.6'),
'#field_prefix' => '%',
'#size' => 5,
'#description' => 'Percentage of transaction charged as paypal fee for transactions that include currency conversion, currently 3.6% in Australia',
);
$form['features'] = array (
'#type' => 'fieldset',
'#title' => 'Enable/Disable Features',