globals('core.eol'); $order = $this->globals('ecom.order_summary'); // +-- // | Printable form instructions. // +-- $instructions = "After verifying your order information and clicking the 'Process Payment' button, PayPal will be contacted and instructed to charge your PayPal account the total amount shown in the order summary on this page. After PayPal accepts this transaction, you will be presented with your order confirmation."; // +-- // | Formulate our token and payerid values from the order // | proctoken field. // +-- $ppp_token = ''; $ppp_payerid = ''; if (!(empty($order['order']['proctoken']))) { list($ppp_token,$ppp_payerid) = preg_split('/\|/i', $order['order']['proctoken'], 2); } // End of if statement. // +-- // | Set up the olpform array. // +-- $olpform = array('namespace' => 'gwprocinternal', 'button' => 'Process Payment', 'gateway' => $order['gateway']['id'], 'orderid' => $order['order']['id'], 'gwurl' => '', 'fields' => array()); // +-- // | Create the HIDDEN fields for the form. // +-- $olpform['fields']['HIDDEN'][] = array('name' => 'TransactionID', 'value' => $order['order']['id']); $olpform['fields']['HIDDEN'][] = array('name' => 'OrderTotal', 'value' => $order['order']['ordertotal']); $olpform['fields']['HIDDEN'][] = array('name' => 'ppp_token', 'value' => $ppp_token); $olpform['fields']['HIDDEN'][] = array('name' => 'ppp_payerid', 'value' => $ppp_payerid); // +-- // | Create the DISPLAY fields for the form. // +-- $olpform['fields']['DISPLAY'][] = array('type' => 'PAYFORMCONTINUE', 'params' => array('name' => 'ecom_continue', 'required' => 1, 'display' => 'Process Order Through PayPal', 'desc' => $instructions, 'option' => 'I authorize the full amount of this order to be paid via PayPal.')); // +-- // | Globalize the $olpform array and return. // +-- $this->globals('ecom.olpform',$olpform); ?>