Forums / PayPal Website Payments Pro support / paypal 15008 error due to bad math

paypal 15008 error due to bad math

Views: 2,277

Results 1 to 2 of 2
9 Jun 2012, 11:04 PM
#1
tomarriola avatar

tomarriola

Zen Follower

Join Date:
Oct 2004
Posts:
206
Plugin Contributions:
0

paypal 15008 error due to bad math

I've been getting a PAYPAL 15008 error which is "This transaction has been completed, but the total of items in the cart did not match the total of all items."

After comparing the failed transaction's shopping carts it became apparent that the error was caused by certain items with qty discounts. By changing the amount of the discount I was able to make the error go away.

This error will surely pop up on certain quantities again. My fix was a bandaid.

To reproduce, create an item that costs 9.50 US dollars. Make a qty discount of 25% for 10 or more. This makes the item show as costing 7.13

Add 10 of these discounted items to your cart. Add something else to the cart and checkout. After attempting payment with paypal website payments pro, you should see the message: 15008 Invalid Data - This transaction has been completed, but the total of items in the cart did not match the total of all items.

The card is not charged and no order is entered. See error log below.

This transaction worked when the discount was changed to 20%
Tom

2012-06-09 03:55:31

(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.9e
)

Request Parameters: {DoDirectPayment}
Array
(
[ACCT] => *********4934
[AMT] => 277.76
[BUTTONSOURCE] => ZenCart-DP_us
[CARDISSUE] =>
[CITY] => phoenix
[CREDITCARDTYPE] => MasterCard
[CUSTOM] => DP-4-1339282531
[CVV2] => ***
[EMAIL] => [email protected]
[EXPDATE] => 062015
[FIRSTNAME] => tom
[INVNUM] => 4-1339282531-[CrimeScene]
[IPADDRESS] => xx.xx.xx.xx
[ITEMAMT] => 246.25
[LASTNAME] => xxxxx
[L_AMT0] => 7.13
[L_AMT1] => 175.00
[L_DESC1] => casting kit: Brown AccuTrans(78511)
[L_NAME0] => Heme Stix, blood detection test
[L_NAME1] => AccuTrans Kit

[L_NUMBER0] => P-120
[L_NUMBER1] => 1-78506
[L_QTY0] => 10
[L_QTY1] => 1
[NOTIFYURL] => https://www.crimescene.com/store/ipn_main_handler.php
[PAYMENTACTION] => Sale
[PHONENUM] => xxxxxxxxxxxx
[SHIPPINGAMT] => 8.61
[SHIPTOCITY] => phoenix
[SHIPTOCOUNTRY] => US
[SHIPTONAME] => tom xxxxxx
[SHIPTOSTATE] => AZ
[SHIPTOSTREET] => xxxxx n 11th st
[SHIPTOZIP] => 85014
[STATE] => AZ
[STREET] => 3743 n 11th st
[TAXAMT] => 22.90
[ZIP] => 85014
[METHOD] => DoDirectPayment
[CURRENCYCODE] => USD
[USER] => toma_api1.xxxxxxxxx.net
[PWD] => ****************
[VERSION] => 60.0
[SIGNATURE] => ****************************************************Q9SP
)

Response:
Array
(
[TIMESTAMP] => 2012-06-09T22:55:31Z
[CORRELATIONID] => 1c4d283c42ed7
[ACK] => FailureWithWarning
[VERSION] => 60.0
[BUILD] => 2945183
[L_ERRORCODE0] => 15008
[L_ERRORCODE1] => 10762
[L_SHORTMESSAGE0] => Invalid Data
[L_SHORTMESSAGE1] => Gateway Decline
[L_LONGMESSAGE0] => This transaction has been completed, but the total of items in the cart did not match the total of all items.
[L_LONGMESSAGE1] => This transaction cannot be processed.
[L_SEVERITYCODE0] => Warning
[L_SEVERITYCODE1] => Error
[AMT] => 277.76
[CURRENCYCODE] => USD
[CURL_ERRORS] =>
)

DoDirectPayment, Elapsed: 558ms -- FailureWithWarning

9 Jun 2012, 11:11 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: paypal 15008 error due to bad math

Bug Report records indicate that this was fixed in v1.5.0

.
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.