Ecstore payment using PayPal is not supported for this payment

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.