cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to pay with PayPal if added product with zero price.

Contributor

Not able to pay with PayPal if added product with zero price.

Hi,

During the implementation of the project for our clients, we have run into the scenario where they would like to have line items with a zero price. However when we add only this kind of product to the bag, and have shipping method with value different than zero, we are facing this issue when we are placing the order with PayPal for the customers who already have saved account.

Replication steps:

  • Place the order using a new account for PayPal and select to save the account.
  • Add product with zero price to the basket.
  • Proceed to placing of the order with saved account in previous step.

Outcome:

  • The order cannot be placed because API is returning error responses
    Error message: The totals of the cart item amounts do not match order amounts.

However if a customer is placing the order with a new account (without saving the account) then they are able to place the order.

Bellow you can see the request and response

 

REQUEST :

BUTTONSOURCE=Demandware_EC_v4
SHIPTONAME=***********
IPADDRESS=**********
RISKSESSIONCORRELATIONID=a8aa87804aad15aded1dc4c77b_f7aa8
L_NAME0=Côtes de Provence Rosé
SIGNATURE=*****
L_AMT0=0
SHIPTOSTREET2=Street 2
SHIPTOSTATE=NSW
L_DESC0=Complex, elegant and restrained, our Côtes de Provence Rosé 2016 displays refined cherry, raspberry and strawberry fruit flavou
SHIPPINGAMT=15.99
REFERENCEID=B-98S53******
ITEMAMT=0
PWD=*****
PAYMENTACTION=Sale
SHIPTOZIP=1111
SHIPTOCITY=Suburb
AMT=15.99
SHIPTOSTREET=Street 1
USER=******************
SHIPTOCOUNTRYCODE=AU
SHIPDISCAMT=0
CURRENCYCODE=AUD
INVNUM=DEV10058351
PAYMENTTYPE=Any
VERSION=121.0
METHOD=DoReferenceTransaction
L_NUMBER0=8022816
L_QTY0=1
SHIPTOPHONENU[Removed. Phone #s not permitted]/p>

 

RESPONSE :

TIMESTAMP=2019-06-20T07:58:58Z
CORRELATIONID=6df66a0622a27
ACK=FailureWithWarning
VERSION=121.0
BUILD=000000
L_ERRORCODE0=10413
L_ERRORCODE1=11812
L_ERRORCODE2=10004
L_SHORTMESSAGE0=Transaction refused because of an invalid argument. See additional error messages for details.
L_SHORTMESSAGE1=Invalid Data
L_SHORTMESSAGE2=Invalid Data
L_LONGMESSAGE0=The totals of the cart item amounts do not match order amounts.
L_LONGMESSAGE1=The value of Description parameter has been truncated.
L_LONGMESSAGE2=This transaction cannot be processed.
L_SEVERITYCODE0=Error
L_SEVERITYCODE1=Warning
L_SEVERITYCODE2=Error

 

We are assuming that the problem is with API which is not taking in account the products with zero value.

 

From request we can see the following :
L_AMT0=0
ITEMAMT=0
SHIPPINGAMT=15.99
AMT=15.99

which adds up fine.

 

Another scenario in which customer is not able to place the order is when they have one product which is zero amount, and others which are not, and they have checked that they want to save this new account.

 

Can you kindly suggest us what could be possible solution to this problem, and is there some more info in you error logs for this kind of errors, or maybe there is a problem with API.

 

Thanks in advance.

 

Best regards,
Petar

3 REPLIES 3
Highlighted
Advisor

Re: Not able to pay with PayPal if added product with zero price.

PayPal is not going to accept a 0.00 line item.  For this type of an order you would have the following options.

 

When I run into this I typically leave the itemized details out of the PayPal request and send nothing but the AMT (grand total).  Then I use my local system for itemized details as necessary.

Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
Contributor

Re: Not able to pay with PayPal if added product with zero price.

Hi @angelleye ,

 

I was doing this before and I have not succeed in to place the order again, maybe I'm making a mistake in request ? 

 

Request:

 

BUTTONSOURCE=Demandware_EC_v4
SHIPTOCITY=asd
AMT=5
SHIPTONAME=********
IPADDRESS=*********
SHIPTOSTREET=Address
RISKSESSIONCORRELATIONID=690a89e8612f009beaf5a30120_27a70
USER=t******oo.com
SHIPTOCOUNTRYCODE=AU
SHIPDISCAMT=0
SIGNATURE=*****
CURRENCYCODE=AUD
INVNUM=DEV10061111
PAYMENTTYPE=Any
SHIPTOSTREET2=Addr
SHIPTOSTATE=NSW
VERSION=121.0
METHOD=DoReferenceTransaction
SHIPPINGAMT=5
REFERENCEID=B-98S531358R8260447
PWD=*****
PAYMENTACTION=Sale
SHIPTOPHONENU[Removed. Phone #s not permitted]/span>
SHIPTOZIP=1234

 

 

Response:

TIMESTAMP=2019-06-27T09:14:56Z
CORRELATIONID=b09f6608632fd
ACK=Failure
VERSION=121.0
BUILD=53072421
L_ERRORCODE0=10413
L_ERRORCODE1=10004
L_SHORTMESSAGE0=Transaction refused because of an invalid argument. See additional error messages for details.
L_SHORTMESSAGE1=Invalid Data
L_LONGMESSAGE0=The totals of the cart item amounts do not match order amounts.
L_LONGMESSAGE1=This transaction cannot be processed.
L_SEVERITYCODE0=Error
L_SEVERITYCODE1=Error

 

Best regards!

Advisor

Re: Not able to pay with PayPal if added product with zero price.

Get rid of SHIPDISCAMT and SHIPPINGAMT and see if that helps. So you should only pass AMT.

Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!