Problem Description:
Ecstore payment is made using PayPal, the payment is not supported when the order is settled.
Problem and Code Analysis:
1, first must ensure that the default currency is the PayPal-supported currency, PayPal is currently paying
["Supportcurrency"]=>Array(17) { ["USD"]=>string(3) "USD" ["CAD"]=>string(3) "CAD" ["EUR"]=>string(3) "EUR" ["GBP"]=>string(3) "GBP" ["JPY"]=>string(3) "JPY" ["AUD"]=>string(3) "AUD" ["NZD"]=>string(3) "NZD" ["CHF"]=>string(3) "CHF" ["HKD"]=>string(3) "HKD" ["SGD"]=>string(3) "SGD" ["SEK"]=>string(3) "SEK" ["DKK"]=>string(3) "DKK" ["PLZ"]=>string(3) "PLZ" ["NOK"]=>string(3) "NOK" ["HUF"]=>string(3) "HUF" ["CSK"]=>string(3) "CSK" ["CNY"]=>string(3) "CNY" }
2, tracking code Discovery Payment Logic is this, first take out the open and the current payment currency without conflict payment method, and then the user selected payment method. Success jumps to the payment platform with the payment method selected to pay.
Since it is Jiangzi, trace this idea. There are two possible types of possibilities:
A, procedures to determine the opening of the payment method problems;
B. Problem occurs when processing user chooses payment method current default payment currency no conflict
3, tracking code found the problem: B, in the processing user choice payment method The current default payment currency no conflict in the event of a problem
The problem is now: Getlistbycode in ectools\model\payment\cfgs.php ($cur _code= ' CNY ', $platform =array (' ispc ', ' Iscommon ') method
Public functionGetlistbycode ($cur _code= ' CNY ',$platform=Array(' ISPC ', ' Iscommon ')) { $arr _payments=$this->getlist (' * ',Array(' status ' = ' true ', ' platform ' =$platform, ' is_frontend ' =true)); $currency=$this->app->model (' Currency '); $arrDefCurrency=$currency-Getdefault (); foreach($arr _payments as $key=$paymentinfo) { Switch($paymentinfo[' Support_cur ']) { Case' 1 ':if($cur _code! = ' CNY ') { unset($arr _payments[$key]); } Break; Case' 2 '://if ($cur _code! = ' CNY ')/* This will pay the PayPal discard off, so the changes will be closed */ if(false) { unset($arr _payments[$key]); } Break; Case' 3 ':if($arrDefCurrency[' Cur_code ']! =$cur _code) { unset($arr _payments[$key]); } Break; Case' 4 ': Break; default: Break; } } return $arr _payments; }
If you have a better welcome to the exchange.
Respecting the original, please keep the link: http://www.cnblogs.com/seafood/p/4229311.html
Ecstore payment using PayPal is not supported for this payment