reorganise functions into appropriate files

This commit is contained in:
2016-06-18 14:04:38 +10:00
parent 1e912f526c
commit ee350ed26b
3 changed files with 69 additions and 148 deletions

View File

@@ -1288,49 +1288,4 @@ function _booking_form_submit_post_triggers($node)
//just send a notification email
_booking_regn_notifyonly_email($node, FALSE);
}
}
/**
* Landing page after returning from paypal
*/
function booking_payment_completed_page()
{
//get some configuration information
global $event;
$output = "";
$return_array = array();
/*
$parameters = drupal_get_query_parameters();
//check if we got a transaction token from paypal
if (isset($parameters['token'])) {
//check to make sure the value is something we're expecting
$paypal_token = $parameters['token'];
if (! preg_match('/^[0-9A-Fa-f\-]+$/', $paypal_token)) {
//parameter from url is not what we were expecting so ignore it and just use the site-wide tokens for this page
$tokens = booking_define_tokens();
}
else {
//query the payments table to find the attendee that this paypal token belongs to
}
}
*/
//set the page title
$bookingTitle = !empty($event->booking_eventname) ? $event->booking_eventname : 'Event';
drupal_set_title($bookingTitle . ' Registration Completed');
$input = variable_get('booking_regn_completed_page');
watchdog('booking_debug', "<pre>Paypal landing page token:\n@info</pre>", array('@info' => print_r($input['value'] , true)));
$output = token_replace($input['value'], booking_define_tokens());
$return_array[] = array(
'paragraph' => array(
'#type' => 'markup',
'#markup' => $output
)
);
return $return_array;
}