fix confirmation form to handle stripe
This commit is contained in:
@@ -128,6 +128,7 @@ function booking_admin() {
|
||||
'#collapsible' => TRUE,
|
||||
//'#collapsed' => TRUE,
|
||||
);
|
||||
/*
|
||||
$form['paypal']['booking_use_paypal'] = array(
|
||||
'#type' => 'radios',
|
||||
'#title' => t('Use Paypal? (DEPRECATED)'),
|
||||
@@ -138,6 +139,7 @@ function booking_admin() {
|
||||
),
|
||||
'#default_value' => variable_get('booking_use_paypal', 0)
|
||||
);
|
||||
*/
|
||||
$form['paypal']['booking_paypal_account'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Specify Paypal Account Address'),
|
||||
@@ -494,7 +496,7 @@ function booking_admin() {
|
||||
),
|
||||
'#default_value' => variable_get('booking_enable_tshirts', 0)
|
||||
);
|
||||
|
||||
/*
|
||||
$form['regn_options']['booking_enable_passport'] = array(
|
||||
'#type' => 'radios',
|
||||
'#title' => t('Enable passport information? (DEPRECATED)'),
|
||||
@@ -505,6 +507,7 @@ function booking_admin() {
|
||||
),
|
||||
'#default_value' => variable_get('booking_enable_passport', 0)
|
||||
);
|
||||
*/
|
||||
$form['regn_options']['booking_enable_helpareas'] = array(
|
||||
'#type' => 'radios',
|
||||
'#title' => t('Enable help area questions?'),
|
||||
|
@@ -45,11 +45,18 @@ function booking_confirm_page() {
|
||||
//populate tokens
|
||||
$tokens = booking_define_personspecific_tokens($node);
|
||||
|
||||
//add in the paypal forms as tokens
|
||||
//if paypal is enabled then add tokens for it
|
||||
if ($payment_processor_type == 0) {
|
||||
$tokens['paypal-deposit-form'] = _booking_paypal_form($node, $invoiceid, $tokens['paypal-deposit-amount'], "Pay Deposit");
|
||||
$tokens['paypal-total-form'] = _booking_paypal_form($node, $invoiceid, $tokens['paypal-total-amount'], "Pay Full Amount");
|
||||
|
||||
//watchdog('booking', 'Paypal form "@info"', array ('@info' => var_export($tokens['paypal-total-form'], TRUE)));
|
||||
}
|
||||
//if stripe is enabled
|
||||
elseif ($payment_processor_type == 1) {
|
||||
//@todo confirm that the deposit amount is correct for a stripe deposit
|
||||
$tokens['stripe-deposit-form'] = _booking_stripe_form($node, $invoiceid, $tokens['stripe-deposit-amount'], "Pay Deposit");
|
||||
$tokens['stripe-total-form'] = _booking_stripe_form($node, $invoiceid, $tokens['payment-required'], "Pay Balance");
|
||||
}
|
||||
|
||||
//check if this registration will be on the waiting list
|
||||
if (_booking_check_bookings_full() == True || $node->booking_status == 2) {
|
||||
|
@@ -828,9 +828,11 @@ function _booking_deposit_amount($person, $include_fees = TRUE) {
|
||||
//if we're using paypal or stripe, add the transaction fee
|
||||
$payment_processor_type = variable_get('booking_payment_processor', 0);
|
||||
if ($include_fees == TRUE) {
|
||||
//paypal is enabled
|
||||
if ($payment_processor_type == 0) {
|
||||
$amount_owing = _booking_add_paypal_fees($deposit->booking_price, $person->booking_country);
|
||||
}
|
||||
//stripe is enabled
|
||||
elseif ($payment_processor_type == 1) {
|
||||
$amount_owing = _booking_add_stripe_fees($deposit->booking_price, $person->booking_country);
|
||||
}
|
||||
|
@@ -350,6 +350,7 @@ function booking_menu() {
|
||||
);
|
||||
|
||||
//show flight info report only if we have passport info enabled
|
||||
//now deprecated
|
||||
if (variable_get('booking_enable_passport', 0) == 1)
|
||||
{
|
||||
$items['admin/booking/flights'] = array(
|
||||
|
Reference in New Issue
Block a user