Skip to content

Commit

Permalink
Merge pull request #33 from haraldpdl/payment/paypal
Browse files Browse the repository at this point in the history
Support error code 10486
  • Loading branch information
haraldpdl committed Oct 8, 2013
2 parents ee5f89c + ebb117f commit ccf7676
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions catalog/includes/modules/payment/paypal_express.php
Expand Up @@ -190,6 +190,18 @@ function before_process() {
$response_array = $this->doExpressCheckoutPayment($params); $response_array = $this->doExpressCheckoutPayment($params);


if (($response_array['ACK'] != 'Success') && ($response_array['ACK'] != 'SuccessWithWarning')) { if (($response_array['ACK'] != 'Success') && ($response_array['ACK'] != 'SuccessWithWarning')) {
if ( $response_array['L_ERRORCODE0'] == '10486' ) {
if (MODULE_PAYMENT_PAYPAL_EXPRESS_TRANSACTION_SERVER == 'Live') {
$paypal_url = 'https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout';
} else {
$paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout';
}

$paypal_url .= '&token=' . $ppe_token;

tep_redirect($paypal_url);
}

tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, 'error_message=' . stripslashes($response_array['L_LONGMESSAGE0']), 'SSL')); tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, 'error_message=' . stripslashes($response_array['L_LONGMESSAGE0']), 'SSL'));
} }
} }
Expand Down

0 comments on commit ccf7676

Please sign in to comment.