Zen Cart Logo
Forums / PayPal Express Checkout support / 10413 Transaction refused because of an invalid argument

10413 Transaction refused because of an invalid argument

Locked

Views: 6,684

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
10 Aug 2009, 4:47 AM
#1
billyboy avatar

billyboy

New Zenner

Join Date:
May 2007
Posts:
55
Plugin Contributions:
0

10413 Transaction refused because of an invalid argument

This is happening to me also.

I have my Shipping Charges (postage) set to the Flat rate ... if that helps solve the problem.

I went to this thread, but it seems to be unresolved

10 Aug 2009, 3:55 PM
#2
billyboy avatar

billyboy

New Zenner

Join Date:
May 2007
Posts:
55
Plugin Contributions:
0

Re: 10413 Transaction refused because of an invalid argument

Would appreciate some help on this,

thx guys

10 Aug 2009, 6:14 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 10413 Transaction refused because of an invalid argument

The problem occurs as a result of trying to add up all the charges on the line-item details of the order, including products, attributes, shipping, coupons, and taxes, in conjunction with all the tax rates and shipping rules configured in your store as well as the taxation mode (tax-included in pricing vs not), etc.

Without all those exact details and debug logs from failed transactions, it's impossible to help you.

13 Aug 2009, 3:37 PM
#4
billyboy avatar

billyboy

New Zenner

Join Date:
May 2007
Posts:
55
Plugin Contributions:
0

Re: 10413 Transaction refused because of an invalid argument

DrByte:

The problem occurs as a result of trying to add up all the charges on the line-item details of the order, including products, attributes, shipping, coupons, and taxes, in conjunction with all the tax rates and shipping rules configured in your store as well as the taxation mode (tax-included in pricing vs not), etc.

Without all those exact details and debug logs from failed transactions, it's impossible to help you.

I dont know what I did, but it seems to be working now. Thx

5 Sep 2009, 11:13 PM
#5
lsenft avatar

lsenft

New Zenner

Join Date:
Jan 2005
Posts:
19
Plugin Contributions:
0

Re: 10413 Transaction refused because of an invalid argument

This comes from a code bug in the PayPal module. I'm using a one line fix:

/includes/modules/payment/paypalwpp.php
add this on line 534:```
// LS PATCH - remove commas so number_format doesn't screw up values over 1000
$options['AMT'] = str_replace(',', '', $options['AMT']);

so it looks like this:```
// LS PATCH - remove commas so number_format doesn't screw up values over 1000
$options['AMT'] = str_replace(',', '', $options['AMT']);

      $response = $doPayPal->DoExpressCheckoutPayment($_SESSION['paypal_ec_token'],
                                                      $_SESSION['paypal_ec_payer_id'],
                                                      number_format((isset($options['AMT']) ? $options['AMT'] : $order_amount), 2),
                                                      $options);
26 Sep 2009, 4:56 AM
#6
manutd98 avatar

manutd98

New Zenner

Join Date:
Nov 2008
Posts:
32
Plugin Contributions:
0

Re: 10413 Transaction refused because of an invalid argument

I got the same error on my store so I am trying the fix posted by lsenft

28 Sep 2009, 2:19 AM
#7
stagebrace avatar

stagebrace

Totally Zenned

Join Date:
Jan 2005
Location:
Tennessee
Posts:
985
Plugin Contributions:
0

Re: 10413 Transaction refused because of an invalid argument

The PayPal API allows for a comma.

2 Oct 2009, 2:15 AM
#9
didee avatar

didee

Zen Follower

Join Date:
Jan 2009
Location:
Queensland, Australia
Posts:
115
Plugin Contributions:
0

Re: 10413 Transaction refused because of an invalid argument

I am also having this problem. A customer is getting a little frustrated as she is trying to order 3 items and says The cost continues to show a total of $0.00. paypal notified me and it says....10413 Transaction refused because of an invalid argument. See additional error messages for details. - The totals of the cart item amounts do not match order amounts.

18 Nov 2009, 10:42 AM
#10
treasurebags avatar

treasurebags

New Zenner

Join Date:
Nov 2009
Posts:
1
Plugin Contributions:
0

Re: 10413 Transaction refused because of an invalid argument

Attn: DrByte, I updated paypalwpp.php to include your changes listed in your link (which I notice the thread has been closed on hence I am posting here) and this partially fixed my issue (Thank you!)

Unfortunately it only fixed the 10413 error for transactions that include a coupon. If no coupon is used I still get the 10413 error.

Hope you are not too over this topic as I would really appreciate your thoughts (and would be happy to send link to log files if it would tempt you to look into it again).

Further...if I turn tax and shipping off in order totals module, it works fine...Paypal that is. Unfortunately this means my coupon customers are not charged shipping or tax though.

So if I remove tax and shipping from coupon it will probably work...ah gees, sorry, hope I can delete this

18 Nov 2009, 12:48 PM
#11
kthiru100 avatar

kthiru100

New Zenner

Join Date:
Dec 2008
Posts:
4
Plugin Contributions:
0

Re: 10413 Transaction refused because of an invalid argument

Hello,

I have using paypal payment pro. My store default currency is HKD. When i use this currency and make purchase 10413 Transaction refused error displayed. I have also enable the debug in paypal. this is paypal error log

Nov-18-2009 06:29:55
getLineItemDetails 3
LineItemDetails:
Details:Array
(
[ITEMAMT] => 12245
[SHIPPINGAMT] => 14.9
[AMT] => 12259.9
[L_NUMBER0] =>
[L_QTY0] => 1
[L_NAME0] => CHANEL Horsehair * Quilted Lambskin Shoulder Bag
[L_AMT0] => 12245
[L_TAXAMT0] => 0
)

DEFAULT_CURRENCY = HKD
SESSION['currency'] = HKD
order->info['currency'] = HKD
$currencies->currencies[$_SESSION['currency']]['value'] = 1.00000000
currencies Object
(
[currencies] => Array
(
[USD] => Array
(
[title] => US Dollar
[symbol_left] => USD $
[symbol_right] =>
[decimal_point] => .
[thousands_point] => ,
[decimal_places] => 2
[value] => 0.12903300
)

        [EUR] => Array
            (
                [title] => Euro
                [symbol_left] => €
                [symbol_right] => 
                [decimal_point] => .
                [thousands_point] => ,
                [decimal_places] => 2
                [value] => 0.08622830
            )

        [GBP] => Array
            (
                [title] => GB Pound
                [symbol_left] => £
                [symbol_right] => 
                [decimal_point] => .
                [thousands_point] => ,
                [decimal_places] => 2
                [value] => 0.07654340
            )

        [CAD] => Array
            (
                [title] => Canadian Dollar
                [symbol_left] => $
                [symbol_right] => 
                [decimal_point] => .
                [thousands_point] => ,
                [decimal_places] => 2
                [value] => 0.13531999
            )

        [AUD] => Array
            (
                [title] => Australian Dollar
                [symbol_left] => AUD $
                [symbol_right] => 
                [decimal_point] => .
                [thousands_point] => ,
                [decimal_places] => 2
                [value] => 0.13813099
            )

        [HKD] => Array
            (
                [title] => Hong Kong Dollar
                [symbol_left] => HKD $
                [symbol_right] => 
                [decimal_point] => .
                [thousands_point] => ,
                [decimal_places] => 2
                [value] => 1.00000000
            )

    )

[observers] => Array
    (
    )

)

=================================

Nov-18-2009 06:29:55
getLineItemDetails 7
checking subtotals...
itemamt: 12,245.00
taxamt:
shippingamt: 14.90
handlingamt:

subtotal: 12,259.90
AMT: 12,259.90

difference: 0 (abs+rounded: 0)

Nov-18-2009 06:29:55
getLineItemDetails 8
subtotals balance - okay

Nov-18-2009 06:29:55
before_process - DP-1
Beginning DP mode

Nov-18-2009 06:29:55
before_process - DP-4
optionsAll: Array
(
[ITEMAMT] => 12,245.00
[SHIPPINGAMT] => 14.90
[AMT] => 12,259.90
[L_NUMBER0] =>
[L_QTY0] => 1
[L_NAME0] => CHANEL Horsehair * Quilted Lambskin Shoulder Bag
[L_AMT0] => 12,245.00
[L_TAXAMT0] => 0.00
[STREET] => Bharathiyar street
[ZIP] => 641037
[CITY] => Cbe
[STATE] =>
[COUNTRYCODE] => IN
[EXPDATE] => 112010
[EMAIL] => kthiru100######################
[PHONENUM] => 0422-4351316
[BUTTONSOURCE] => ZenCart-DP_us
[CURRENCY] => USD
[IPADDRESS] => 122.165.56.39
[CARDISSUE] =>
)

optionsNVP: Array
(
[PAYMENTACTION] => Sale
)

optionsShipArray
(
[SHIPTONAME] => Thiru Krishnan
[SHIPTOSTREET] => Bharathiyar street
[SHIPTOCITY] => Cbe
[SHIPTOZIP] => 641037
[SHIPTOSTATE] => Cbe
[SHIPTOCOUNTRYCODE] => IN
)

Rest of data:
1,581.93 11 10 Thiru Krishnan MasterCard

Nov-18-2009 06:29:55
before_process - DP-5
resultset:
Array
(
[TIMESTAMP] => 2009-11-18T12:29:55Z
[CORRELATIONID] => 7d2c3f24bbfbd
[ACK] => Failure
[VERSION] => 2.3
[BUILD] => 1113251
[L_ERRORCODE0] => 10413
[L_SHORTMESSAGE0] => Transaction refused because of an invalid argument. See additional error messages for details.
[L_LONGMESSAGE0] => The totals of the cart item amounts do not match order amounts.
[L_SEVERITYCODE0] => Error
[AMT] => 12259.90
[CURRENCYCODE] => USD
[CURL_ERRORS] =>
)

=================================

Nov-18-2009 06:29:56
termEC-2
BEFORE: Token Data:

Nov-18-2009 06:29:56
termEC-10
Redirecting to checkout_payment - Stack: checkout_payment
Message: 10413 <!-- --> Transaction refused because of an invalid argument. See additional error messages for details. - The totals of the cart item amounts do not match order amounts.
Session Data: Array
(
[securityToken] => 974c01dd9e7d8ecfea4c485512628b8d
[customers_host_address] => ABTS-TN-Static-039.56.165.122.airtelbroadband.in
[cartID] => 73963
[cart] => shoppingCart Object
(
[contents] => Array
(
[253] => Array
(
[qty] => 1
)

            )

        [total] => 12245
        [weight] => 0
        [cartID] => 73963
        [content_type] => physical
        [free_shipping_item] => 1
        [free_shipping_weight] => 0
        [free_shipping_price] => 12245
        [observers] => Array
            (
            )

    )

[navigation] => navigationHistory Object
    (
        [path] => Array
            (
                [0] => Array
                    (
                        [page] => login
                        [mode] => NONSSL
                        [get] => Array
                            (
                                [action] => process
                            )

                        [post] => Array
                            (
                            )

                    )

                [1] => Array
                    (
                        [page] => index
                        [mode] => NONSSL
                        [get] => Array
                            (
                                [cPath] => 2_42
                                [sort] => 20a
                                [action] => multiple_products_add_product
                            )

                        [post] => Array
                            (
                            )

                    )

                [2] => Array
                    (
                        [page] => shopping_cart
                        [mode] => NONSSL
                        [get] => Array
                            (
                                [sort] => 20a
                            )

                        [post] => Array
                            (
                            )

                    )

                [3] => Array
                    (
                        [page] => checkout_shipping
                        [mode] => NONSSL
                        [get] => 
                        [post] => Array
                            (
                            )

                    )

                [4] => Array
                    (
                        [page] => checkout_payment
                        [mode] => NONSSL
                        [get] => 
                        [post] => Array
                            (
                            )

                    )

                [5] => Array
                    (
                        [page] => checkout_confirmation
                        [mode] => NONSSL
                        [get] => 
                        [post] => Array
                            (
                            )

                    )

                [6] => Array
                    (
                        [page] => checkout_process
                        [mode] => NONSSL
                        [get] => 
                        [post] => Array
                            (
                            )

                    )

            )

        [snapshot] => Array
            (
            )

        [observers] => Array
            (
            )

    )

[check_valid] => true
[language] => english
[languages_id] => 1
[languages_code] => en
[currency] => HKD
[today_is] => 2009-11-18
[updateExpirations] => 1
[session_counter] => 1
[customers_ip_address] => 122.165.56.39
[new_products_id_in_cart] => 253
[valid_to_checkout] => 1
[cart_errors] => 
[customer_id] => 1
[customer_default_address_id] => 1
[customers_authorization] => 0
[customer_first_name] => Thiru
[customer_last_name] => Krishnan
[customer_country_id] => 99
[customer_zone_id] => 0
[messageToStack] => Array
    (
        [0] => Array
            (
                [class] => checkout_payment
                [text] => 10413 <!--  -->  Transaction refused because of an invalid argument. See additional error messages for details. - The totals of the cart item amounts do not match order amounts.
                [type] => error
            )

    )

[sendto] => 1
[payment] => paypaldp
[shipping] => Array
    (
        [id] => airmail_airmail
        [title] => EMS (Weight: 0 KG.<br>Delivery Time:  7-12 Days)
        [cost] => 14.9
    )

[billto] => 1
[cot_gv] => 0
[comments] => 
[paypal_ec_markflow] => 1

)

=================================

Please help to fix this problem.

Thanks in advance

7 Dec 2009, 10:48 AM
#12
kthiru100 avatar

kthiru100

New Zenner

Join Date:
Dec 2008
Posts:
4
Plugin Contributions:
0

Re: 10413 Transaction refused because of an invalid argument

Hello,
I have fixed the problem. the problem is in currency setup. we should setup the USD value is 1.0000. The currency values only based on USD and we can set any thing currency as default currency. Now the paypal works fine.
Thanks.

9 Dec 2009, 3:22 PM
#13
nialler avatar

nialler

New Zenner

Join Date:
Nov 2009
Posts:
14
Plugin Contributions:
0

Re: 10413 Transaction refused because of an invalid argument

I am currently having this problem and have spent nearly two days reading forum threads and trying fixes.

I have made the change as suggested by Dr Byte which in his own words is "A workaround which has produced **moderate **success is this:"

http://www.zen-cart.com/forum/showthread.php?p=786569#post786569

Unfortunetly for me moderate won't keep me in a job!

Does anybody have an absolute definite answer to this problem? And if so rather than pointing me to a 12 page discussion on another yet thread on this topic can you please just post the final solution here??

Zen Cart v1.3.8a/v1.3.8

I am seeing negative values in the payment logs as per below, whether this is alarming or not i don't know.

Details:Array
(
[ITEMAMT] => 16
[HANDLINGAMT] => -2.09
[SHIPPINGAMT] => 0
[TAXAMT] => 2.09
[AMT] => 16
)

I can supply full logs on request.

9 Dec 2009, 5:54 PM
#14
stagebrace avatar

stagebrace

Totally Zenned

Join Date:
Jan 2005
Location:
Tennessee
Posts:
985
Plugin Contributions:
0

Re: 10413 Transaction refused because of an invalid argument

The RED X, or the definitive answer? Sorry but several questions need to be answered first.
Does the issue occur with a base install of Zen Cart, or an add on, or your hosts setup, other..

You may need to perform several experimental installs to be able to turn the problem on and off.

23 Dec 2009, 10:11 PM
#15
grimfandangos avatar

grimfandangos

New Zenner

Join Date:
Oct 2009
Posts:
1
Plugin Contributions:
0

Re: 10413 Transaction refused because of an invalid argument

Hi everyone,

Just thought I'd weigh in on this topic, in my first post and all.

I've been trying to sort out this issue for about a week, and just like many others it seemed to happen for no explanation. Anyway, I applied a couple of the patches that have been submitted and none seemed to work, but I think I finally found what was causing the problem for me, and hopefully a few other people might find this helpful.

Though in hindsight it seems like a "duh" moment, what I found was I had my settings in Localisation > Currencies set to USD as default when I'm actually using AUD, but I had Modules > Payment > PPEC > Transaction Currency set to "only AUD", so PayPal was multiplying the value by the old exchange rate after the checkout. So I changed the default to AUD and set the exchange rate to 1.000, and that's fixed it for me.

The reason it never occurred to me before is that somehow I'd already had a number of transactions go through without problems. It was a simple oversight, but I may not be the only new Zenner who missed it.

Cheers,

Matt

29 Dec 2009, 11:01 AM
#16
tieshop_com_au avatar

tieshop_com_au

New Zenner

Join Date:
Mar 2009
Posts:
4
Plugin Contributions:
0

Re: 10413 Transaction refused because of an invalid argument

Hi there I'm having a problem with error 10413 too.

Here's my situation: Have a 50% off sale on at the moment, credit card transactions are working fine but Paypal Express isn't

An originally priced $35 item is purchased and best way shipping is set to a flat $8. These prices include a 10% GST so pretax prices entered into Zencart are $31.82 and $7.27. Final cost after discount should be $25.50 inc GST ($35 discounted to $17.50 plus $8 shipping).

Paypal debugging shows:

[ITEMAMT] => 17.50
[HANDLINGAMT] => 2.32
[SHIPPINGAMT] => 8.80
[TAXAMT] => 1.52
[AMT] => 25.50

Error returned is "10413 Transaction refused because of an invalid argument. See additional error messages for details. - The totals of the cart item amounts do not match order amounts."

The shipping amount of $8.80 seems to indicate that the GST is being applied twice? This doesn't occur for credit card transactions.

How can i fix this? Any help much appreciated!