Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / PayPal 10413 failure code but order is completed

PayPal 10413 failure code but order is completed

Views: 1,188

Results 1 to 6 of 6
9 Aug 2014, 1:02 PM
#1
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

PayPal 10413 failure code but order is completed

The forum threads found are older than v1.5.3.

I'm seeing several PayPal logs indicating 10413 failures after upgrading from v1.3.9H to v1.5.3 using zen-cart-v1.5.3-(hotfix1)-07192014

PP logging was not enabled and only a single logfile for each failed transaction is in the logs folder.

I'm assuming before the customer login because the most recent failure does not contain any customer data.

Just compared** orders with PP logs.

The most recent PP log with the 10413 error coincides with an successful order for the same amount, same time except** the PayPal error log was generated prior to shipping being added to the total; otherwise, the totals matched.

So, in this particular case, the order was actually completed even though a PP failure was logged.

9 Aug 2014, 6:51 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: PayPal 10413 failure code but order is completed

It's possible that the code intercepted the error and resubmitted the transaction, or redirected the customer back to paypal to make whatever adjustments were needed to complete the transaction.

If you enable logging then you'll have more information to inspect the next time it happens.

10 Aug 2014, 12:05 AM
#3
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: PayPal 10413 failure code but order is completed

Logging enabled.
2 test orders entered. 1st logged in as customer. 2nd use EC for checkout.
Both test orders contained fractional units. Both test orders required sales tax calculations. Both orders required shipping.

4 paypal logs generated for each order
1st CURL contained failure notice
2nd CURL-EC
3rd labeled /paypalwpp_Paypal_Action_EC-xxxxxxxxxxx
4th CURL-EC

It probably does little for me to summarize my interpretation of the log files, so they are attached

[Attachment no longer available]

19 Aug 2014, 10:19 PM
#4
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: PayPal 10413 failure code but order is completed

DrByte:

It's possible that the code intercepted the error and resubmitted the transaction, or redirected the customer back to paypal to make whatever adjustments were needed to complete the transaction.

If you enable logging then you'll have more information to inspect the next time it happens.

I don't think the customer can adjust anything to change the error.

[TIMESTAMP] => 2014-08-19T19:10:07Z
[CORRELATIONID] => 9e4e8abb1b051
[ACK] => Failure
[VERSION] => 61.0
[BUILD] => 12364540
[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
[CURL_ERRORS] =>

19 Aug 2014, 10:46 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: PayPal 10413 failure code but order is completed

Right, but Zen Cart knows that PayPal likes different arithmetic, and so if they calculate tax differently and a 10413 is thrown, the tax portion of each line is removed and collapsed into a general tax subtotal and resubmitted. And if a 10413 is thrown after that, then all line-items are removed and just one final purchase amount is resubmitted. If either of those goes through then the purchase completes fine.

19 Aug 2014, 11:30 PM
#6
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: PayPal 10413 failure code but order is completed

Thank you.

The log only seems to be generated when fractional items are being purchased, so that must be the cause.

Thanks again.