Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default [Done 1.5.0] Hungarian Forint... not working

    Every once in a while, I get 1, or 2 or 10 emails in a row (from my zencart shopping cart) saying the following:

    ALERT: PayPal Express Checkout Error (10401)
    10401 Transaction refused because of an invalid argument. See additional
    error messages for details. - Order total is invalid.

    It only happens when a customer chooses the Hungarian Forint as their currency and then uses the PayPal express checkout.

    I phoned PayPal and they confirmed its all good on their end (id. I have the HUF currency activated), and for whatever reason, my shopping cart software is passing an invalid format.

    At first I thought it was a simple matter that the HUF uses no decimal - it is an integer format currency. But then the Yen (JPY) shouldn't work either, and it works just fine. The only difference I could see between the JPY and the HUF is the thousands seperator (HUF uses . and JPY uses ,) but I tried changing that to "," or none and it didn't help.

    Any thoughts?

  2. #2
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: Hungarian Forint... not working

    I did notice another difference between HUF and JPY... HUF uses a right hand symbol, which I have as " Ft". OK, so that's it, right Wrong. The Czech Koruna (CZK) uses the same thing (" Kc") and it works fine.

  3. #3
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: Hungarian Forint... not working

    Nothing at all? Fine... I'll move it to bugs.

  4. #4
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Hungarian Forint... not working

    I posted it elsewhere last week but it got no attention. I think its a bug. I've looked at it as much as I can and I see no rhyme nor reason why the Hungarian currency isn't working with PayPal but all other currencies are. PayPal insists its not on their end.

    Any ideas? Original post: http://www.zen-cart.com/forum/showthread.php?t=176219

  5. #5
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: Hungarian Forint... not working

    Moderator's note - both threads merged here.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Hungarian Forint... not working

    It would help to see the PayPal debug logs recorded by your server for that transaction, assuming they're enabled. Namely the PayPal_CURL_xxxx.log files.
    .

    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.

  7. #7
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: Hungarian Forint... not working

    Thanks... I didn't know what logs to look at. A month later, I don't want to dig through logs to find it, so I did a test transaction now and here is the result:

    Code:
    2011-04-10 06:34:48
    -------------------
    (live transaction) --> https://api-3t.paypal.com/nvp
    Request Headers: 
    Array
    (
        [0] => Content-Type: text/namevalue
        [1] => X-VPS-Timeout: 45
        [2] => X-VPS-VIT-Client-Type: PHP/cURL
        [3] => X-VPS-VIT-Integration-Product: PHP::Zen Cart(tm) - PayPal/NVP
        [4] => X-VPS-VIT-Integration-Version: 1.3.9f
    )
    
    
    Request Parameters: {SetExpressCheckout} 
    Array
    (
        [LOCALECODE] => CA
        [PAYMENTACTION] => Sale
        [ALLOWNOTE] => 1
        [LANDINGPAGE] => Billing
        [AMT] => 7,453.80
        [RETURNURL] => https://www.FAKEDOMAIN.com/shop/ipn_main_handler.php?type=ec
        [CANCELURL] => https://www.FAKEDOMAIN.com/shop/index.php?main_page=login&ec_cancel=1
        [PAGESTYLE] => Primary
        [METHOD] => SetExpressCheckout
        [CURRENCYCODE] => HUF
        [USER] => steven_api1.FAKEDOMAIN.com
        [PWD] => ****************
        [VERSION] => 60.0
        [SIGNATURE] => ****************************************************guWU
    )
    
    
    Response: 
    Array
    (
        [TIMESTAMP] => 2011-04-10T05:34:49Z
        [CORRELATIONID] => a11defd326e99
        [ACK] => Failure
        [VERSION] => 60.0
        [BUILD] => 1824201
        [L_ERRORCODE0] => 10401
        [L_SHORTMESSAGE0] => Transaction refused because of an invalid argument. See additional error messages for details.
        [L_LONGMESSAGE0] => Order total is invalid.
        [L_SEVERITYCODE0] => Error
        [CURL_ERRORS] => 
    )
    
    
    SetExpressCheckout, Elapsed: 964ms -- Failure
    And right away I think I see the problem. The amount is shown as having a decimal value, when that is not possible for this currency. However, the JPY does it correctly, as you can see with this test:

    Code:
    2011-04-10 06:39:33
    -------------------
    (live transaction) --> https://api-3t.paypal.com/nvp
    Request Headers: 
    Array
    (
        [0] => Content-Type: text/namevalue
        [1] => X-VPS-Timeout: 45
        [2] => X-VPS-VIT-Client-Type: PHP/cURL
        [3] => X-VPS-VIT-Integration-Product: PHP::Zen Cart(tm) - PayPal/NVP
        [4] => X-VPS-VIT-Integration-Version: 1.3.9f
    )
    
    
    Request Parameters: {SetExpressCheckout} 
    Array
    (
        [LOCALECODE] => CA
        [PAYMENTACTION] => Sale
        [ALLOWNOTE] => 1
        [LANDINGPAGE] => Billing
        [AMT] => 3,474.00
        [RETURNURL] => https://www.FAKEDOMAIN.com/shop/ipn_main_handler.php?type=ec
        [CANCELURL] => https://www.FAKEDOMAIN.com/shop/index.php?main_page=login&ec_cancel=1
        [PAGESTYLE] => Primary
        [METHOD] => SetExpressCheckout
        [CURRENCYCODE] => JPY
        [USER] => steven_api1.FAKEDOMAIN.com
        [PWD] => ****************
        [VERSION] => 60.0
        [SIGNATURE] => ****************************************************guWU
    )
    
    
    Response: 
    Array
    (
        [TOKEN] => EC-3J265139L9568884C
        [TIMESTAMP] => 2011-04-10T05:39:34Z
        [CORRELATIONID] => e3dee601dec49
        [ACK] => Success
        [VERSION] => 60.0
        [BUILD] => 1824201
        [CURL_ERRORS] => 
    )
    
    
    SetExpressCheckout, Elapsed: 891ms -- Success
    So is it just a minor bug in the system where JPY was correctly set to eliminate any non-zero decimal value and HUF wasn't?

    - Steven

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Hungarian Forint... not working

    Quote Originally Posted by s_mack View Post
    So is it just a minor bug in the system where JPY was correctly set to eliminate any non-zero decimal value and HUF wasn't?
    Quite possibly. It's proven difficult to find a definitive list of non-zero-decimal currencies.
    Indeed in v1.3.9h (I note yours is 1.3.9f) we added support to protect against problematic currency updates when "0 decimals" were listed, as well as specify JPY handling because we knew about the JPY issues.
    You could apply similar logic in your PayPal module for HUF if you like.
    We'll probably drop the currency-specific handling in 1.5.0 in favor of checking whether "0 decimals" has been specified instead.
    .

    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.

  9. #9
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: Hungarian Forint... not working

    Quote Originally Posted by DrByte View Post
    You could apply similar logic in your PayPal module for HUF if you like.
    Thank you, and any hints on where to look would be appreciated.

  10. #10
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: Hungarian Forint... not working

    I am curious why a specified 0-decimal currency was ever sent to PayPal as a 2-decimal? Even the JPY, according to the logs anyway, is sent with two zeros appended. Shouldn't it simply be sent as an integer?

    Anyway, here is one list of ISO 4217 that specifies all currencies and their formats. The trick with it is that some currencies have multiple formats with no hint as to which is the "proper" or "most current" (however you want to view it) format and some have mistakes. For example, the Mozambique Metical has a 2-decimal version and an integer version, both with the same name and both recognized under ISO 4217 (one as the MZM and one as the MZN). In this particular case, a secondary search turns up the specifics: Due to hyper-inflation, the MZM was replaced by the MZN at a rate of 1000:1 in 2006 and it is in a transitional period where both are valid until 2012. The mistake, in this case, is that it shows MZN as being a zero-decimal format, which is not true. MZN does have centavo coins, as shown in Wikipedia and confirmed on the Bank of Mozambique's website (I was curious)... so you're right, that it is difficult to find a truly definitive listing.... but then again, how many of us accept the Mozambique Metical?

    Lol.. how many of us accept the HUF? I would say many times more... simply because it is a valid PayPal currency.

    - Steven

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v155 [Done v155a] Admin, alt_nav not working
    By torvista in forum Bug Reports
    Replies: 13
    Last Post: 3 Nov 2016, 07:26 PM
  2. Replies: 25
    Last Post: 7 Apr 2011, 05:41 AM
  3. Replies: 4
    Last Post: 11 May 2010, 07:25 AM
  4. [Done v1.3.8] Forgot your password link is not working!!
    By Boss Of The Bosses in forum Bug Reports
    Replies: 21
    Last Post: 3 Sep 2008, 09:52 PM
  5. [Done v1.3.7.1] #indexHomeBody - not working
    By Woodymon in forum Bug Reports
    Replies: 16
    Last Post: 30 Jan 2008, 08:23 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