For v1.3.8a:
/includes/modules/payment/paypal/paypal_curl.php
around line 114 you have a section of code that looks like the following.
Add the additional lines, as shown:```
function SetExpressCheckout($amount, $returnUrl, $cancelUrl, $optional = array()) {
$values = array_merge($optional, array('AMT' => $amount,
'RETURNURL' => urlencode($returnUrl),
'CANCELURL' => urlencode($cancelUrl)));
if ($this->_mode == 'payflow') {
$values = array_merge($values, array('ACTION' => 'S', /* ACTION=S denotes SetExpressCheckout */
'TENDER' => 'P',
'TRXTYPE' => $this->_trxtype,
'RETURNURL' => $returnUrl,
'CANCELURL' => $cancelUrl));
} elseif ($this->_mode == 'nvp') {
if (!isset($values['PAYMENTACTION'])) $values['PAYMENTACTION'] = ($this->_trxtype == 'S' ? 'Sale' : 'Authorization');
}
[B] // convert country code key to proper key name for paypal 2.0 (needed when sending express checkout via payflow gateway, due to PayPal field naming inconsistency)
if ($this->_mode == 'payflow') {
if (!isset($values['SHIPTOCOUNTRY']) && isset($values['SHIPTOCOUNTRYCODE'])) {
$values['SHIPTOCOUNTRY'] = $values['SHIPTOCOUNTRYCODE'];
unset($values['SHIPTOCOUNTRYCODE']);
}
}[/B]
// allow page-styling support -- see language file for definitions
if (defined('MODULE_PAYMENT_PAYPALWPP_PAGE_STYLE')) $values['PAGESTYLE'] = MODULE_PAYMENT_PAYPALWPP_PAGE_STYLE;
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.