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:
Code:
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');
}
// 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']);
}
}
// allow page-styling support -- see language file for definitions
if (defined('MODULE_PAYMENT_PAYPALWPP_PAGE_STYLE')) $values['PAGESTYLE'] = MODULE_PAYMENT_PAYPALWPP_PAGE_STYLE;