Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15
  1. #11
    Join Date
    Jan 2004
    Posts
    58,265
    Blog Entries
    3
    Plugin Contributions
    106

    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!
    Donations always welcome: www.zen-cart.com/donate

    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
    58,265
    Blog Entries
    3
    Plugin Contributions
    106

    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!
    Donations always welcome: www.zen-cart.com/donate

    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. 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
  2. function replace_accents(), Japanese, PayPal
    By CrystalKoi in forum Bug Reports
    Replies: 8
    Last Post: 19 Jul 2009, 02:06 PM
  3. If a choose canadian currency give me error 10401
    By icikite in forum PayPal Express Checkout support
    Replies: 6
    Last Post: 19 Apr 2009, 08:14 PM
  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
  5. error code 10401 - Not happy setup?
    By PingPing in forum PayPal Express Checkout support
    Replies: 3
    Last Post: 10 Mar 2008, 10:49 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
  •