function payment_webform_page_finish in Payment for Webform 7
Menu page callback to call after a payment reference payment has finished.
Return value
integer|array
1 string reference to 'payment_webform_page_finish'
- payment_webform_menu in ./
payment_webform.module - Implements hook_menu().
File
- ./
payment_webform.module, line 243 - Hook implementations and shared functions.
Code
function payment_webform_page_finish() {
$pid = $_SESSION['payment_webform_pid'];
unset($_SESSION['payment_webform_pid']);
$payment = entity_load_single('payment', $pid);
$node = node_load(payment_webform_load_nid($pid));
drupal_set_title(node_page_title($node));
return array(
'#type' => 'markup',
'#markup' => t('Your payment is %status. You can now <span class="paymentreference-window-close">close this window</span>.', array(
'%status' => payment_status_info($payment
->getStatus()->status, TRUE)->title,
)),
'#attached' => array(
'js' => array(
drupal_get_path('module', 'paymentreference') . '/js/paymentreference.js',
),
),
);
}