add some debugging to balance payment page

This commit is contained in:
Nathan Coad
2016-07-22 15:54:40 +10:00
parent dd9e4ac822
commit 07078de79b

View File

@@ -47,22 +47,22 @@ function booking_balance_page() {
// @todo - use admin variable booking_payment_processor to determine which of these to calculate // @todo - use admin variable booking_payment_processor to determine which of these to calculate
$tokens['paypal-total-form'] = _booking_paypal_form($node, $invoiceid, $tokens['paypal-total-amount'], "Pay Balance"); $tokens['paypal-total-form'] = _booking_paypal_form($node, $invoiceid, $tokens['paypal-total-amount'], "Pay Balance");
$tokens['stripe-total-form'] = _booking_stripe_form($node, $invoiceid, $tokens['payment-required'], "Pay Balance"); $tokens['stripe-total-form'] = _booking_stripe_form($node, $invoiceid, $tokens['payment-required'], "Pay Balance");
watchdog('booking_debug', "<pre>Balance page tokens:\n@info</pre>", array('@info' => print_r( $tokens, true)));
//Calculate the amount outstanding //Calculate the amount outstanding
//watchdog('booking', 'Booking Balance form calculating amount owing'); //watchdog('booking', 'Booking Balance form calculating amount owing');
//$amount_owing = _booking_amount_owing($person->nid); //$amount_owing = _booking_amount_owing($person->nid);
//If the amount outstanding is zero, then display information to that effect. //If the amount outstanding is zero, then display information to that effect.
if ($tokens['paypal-total-amount'] == 0) //@todo don't rely on the paypal token in case stripe is being used
{ if ($tokens['payment-required'] == 0) {
$output = token_replace(variable_get('booking_regn_balance_page_paid'), $tokens); $output = token_replace(variable_get('booking_regn_balance_page_paid'), $tokens);
} }
else else {
{
$output = token_replace(variable_get('booking_regn_balance_page'), $tokens); $output = token_replace(variable_get('booking_regn_balance_page'), $tokens);
//optional additional text for married people //optional additional text for married people
if ($node->booking_married == 'Y') if ($node->booking_married == 'Y') {
$output .= token_replace(variable_get('booking_regn_balance_married_text'), $tokens); $output .= token_replace(variable_get('booking_regn_balance_married_text'), $tokens);
}
} }
//put all the bits together //put all the bits together