Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15
  1. #11
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Japanese Yen and Paypal - JPY error 10401

    And just to confirm ... you're *only* testing this with PayPal, right? Which modules?
    .

    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.

  2. #12
    Join Date
    Apr 2007
    Posts
    182
    Plugin Contributions
    0

    Default Re: Japanese Yen and Paypal - JPY error 10401

    Yes Just PayPal, express checkout and normal paypal checkout. Next I will go to websites payment pro. I am also sure this applies to any other currency that works like this.

    -PayPal Website Payments Pro
    -PayPal Express Checkout

  3. #13
    Join Date
    Apr 2007
    Posts
    182
    Plugin Contributions
    0

    Default Re: Japanese Yen and Paypal - JPY error 10401

    Hi DrByte, (I always feel you should be an evil character in MegaMan or something with that name...:-) )

    Know you are busy, but did you come up with any solution for this problem or should we just come up with a fix?

    Let me know, no push on you, just thought your fix might be better than mine since you know ZC a bit better than me.

    Thanks,
    Shaun

  4. #14
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Japanese Yen and Paypal - JPY error 10401

    To properly allow the PayPal module to handle JPY without submitting a decimal point and fractions, I recommend this replacement for the calc_order_amount() function in /includes/modules/payment/paypalwpp.php:
    Code:
      /**
       * Calculate the amount based on acceptable currencies
       */
      function calc_order_amount($amount, $paypalCurrency, $applyFormatting = false) {
        global $currencies;
        $amount = ($amount) * $currencies->get_value($paypalCurrency);
        if ($paypalCurrency == 'JPY') {
          $amount = (int)$amount;
          $applyFormatting = FALSE;
        }
        return ($applyFormatting ? number_format($amount, $currencies->get_decimal_places($paypalCurrency)) : $amount);
      }
    .

    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.

  5. #15
    Join Date
    Apr 2007
    Posts
    182
    Plugin Contributions
    0

    Default Re: Japanese Yen and Paypal - JPY error 10401

    Hi Dr. Byte,

    That works.

    Thanks,

    Shaun

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v150 10401 error - Paypal SetExpressCheckout has [AMT] => 0.00 when total cart is NOT 0
    By Sathu in forum PayPal Express Checkout support
    Replies: 2
    Last Post: 19 Oct 2012, 10:53 PM
  2. v150 10401 Error - Paypal Express Checkout - CNY currency
    By ShanghaiLad in forum PayPal Express Checkout support
    Replies: 8
    Last Post: 12 Oct 2012, 02:22 PM
  3. PayPal Express Error 10401 when using JPY currency on my site
    By explorer1979 in forum PayPal Express Checkout support
    Replies: 13
    Last Post: 4 Dec 2009, 05:22 AM
  4. PayPal Express Checkout Errors 10401, 11059, 10426 with JPY
    By _prd_ in forum PayPal Express Checkout support
    Replies: 2
    Last Post: 6 Oct 2008, 10:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR