process(); if ($_SESSION['3Dsecure_transactionId'] == '') { // validate if the card enrolled lookup requirements have been met if ($_SESSION['3Dsecure_requires_lookup'] == true && strcasecmp('Y', $_SESSION['3Dsecure_enroll_lookup_attempted']) != 0) { // enrollment lookup was required for the card type, but was not completed $error = ERROR_PAYMENT_FAILURE_TEXT; $messageStack->add_session('checkout_payment', $error . '', 'error'); $redirectPage = zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false); } else { // enrollment lookup was either not required for the card type or was required and completed $redirectPage = zen_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', true); } } else { ///////////////////////////////////////////////////////////////////////////////////////// // Retrieve the PaRes and MD values from the Card Issuer's Form POST to this Term URL page. // If you like, the MD data passed to the Card Issuer could contain the TransactionId // that would enable you to reestablish the transaction session. This would be the // alternative to using the Client Session Cookies ///////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////// // If the PaRes is Not Empty then process the cmpi_authenticate message ///////////////////////////////////////////////////////////////////////////////////////// if (isset($_POST["PaRes"]) && $_POST["PaRes"] != '') { $authenticate_data_array = array('transaction_id' => $_SESSION['3Dsecure_transactionId'], 'payload' => $_POST["PaRes"]); if (is_object($$payment_module)) { $authenticate_resp_array = $$payment_module->get3DSecureAuthenticateResponse($authenticate_data_array); } $shouldContinue = $authenticate_resp_array['continue_flag']; $auth_status = $authenticate_resp_array['auth_status']; $sig_status = $authenticate_resp_array['sig_status']; $error_no = $authenticate_resp_array['error_no']; $error_desc = $authenticate_resp_array['error_desc']; $auth_xid = $authenticate_resp_array['auth_xid']; $auth_cavv = $authenticate_resp_array['auth_cavv']; $auth_eci = $authenticate_resp_array['auth_eci']; $_POST['paypalwpp_cc_number'] = $authenticate_resp_array['cc3d_card_number']; $_POST['paypalwpp_cc_checkcode'] = $authenticate_resp_array['cc3d_checkcode']; $_POST['paypalwpp_cc_expires_month'] = $authenticate_resp_array['cc3d_exp_month']; $_POST['paypalwpp_cc_expires_year'] = $authenticate_resp_array['cc3d_exp_year']; $merchantData = unserialize($_SESSION['3Dsecure_merchantData']); $_POST['paypalwpp_cc_issue_month'] = $merchantData['im']; $_POST['paypalwpp_cc_issue_year'] = $merchantData['iy']; $_POST['paypalwpp_cc_issuenumber'] = $merchantData['in']; $_POST['paypalwpp_cc_firstname'] = $merchantData['fn']; $_POST['paypalwpp_cc_lastname'] = $merchantData['ln']; $_SESSION['3Dsecure_auth_status'] = $auth_status; $_SESSION['3Dsecure_auth_xid'] = $auth_xid; $_SESSION['3Dsecure_auth_cavv'] = $auth_cavv; $_SESSION['3Dsecure_auth_eci'] = $auth_eci; unset($_SESSION['3Dsecure_transactionId']); ///////////////////////////////////////////////////////////////////////////////////////// // Determine if the result was Successful or Error // // If the Authentication results (PAResStatus) is a Y or A, and the SignatureVerification is Y, then // the Payer Authentication was successful. The Authorization Message should be processed, // and the User taken to a Order Confirmation location. // ///////////////////////////////////////////////////////////////////////////////////////// // If the following condition is met, then the authentication result was acceptable. ///////////////////////////////////////////////////////////////////////////////////////// if (strcasecmp("Y", $shouldContinue) == 0) { //////////////////////////////////////////////////////////////////// // Business rules are set to continue to authorization //////////////////////////////////////////////////////////////////// $redirectPage = zen_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false); } else { //////////////////////////////////////////////////////////////////// // Business rules are set to prompt for another form of payment //////////////////////////////////////////////////////////////////// $error = $$payment_module->get_authentication_error(); $messageStack->add_session('checkout_payment', $error . '', 'error'); $redirectPage = zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false); } } else { //////////////////////////////////////////////////////////////////// // Business rules are set to continue to authorization //////////////////////////////////////////////////////////////////// $redirectPage = zen_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', true, false); } } header("Cache-Control: max-age=1"); // stores for only 1 second, which prevents page from being re-displayed ?> Payer Authentication Window

Processing. Please wait.

This may take a few moments...

pre_confirmation_check(); // output the appropriate POST vars so form can be processed for submission to gateway echo $$payment_module->process_button(); ?>