Stefan
Stefan

Reputation: 772

PayPal API charging card but returning error

Please excuse me if this is a newbie question but I have never worked with any sort of credit card API before and I am, well, pretty much a newbie...

I have a script with "PayPal integrated" heh, and its not working. When I run a card on the PayPal Sandbox, the transaction seems to go through, my sandbox account gets credited the amount but the script returns this error:


TIMESTAMP:  2011-04-25T14:03:42Z
CORRELATIONID:  5e727288789fb
ACK:  SuccessWithWarning
L_LONGMESSAGE0:  This transaction has been completed, but the total of items in the cart did not match the total of all items.
AMT:  25.00
CURRENCYCODE:  EUR
AVSCODE:  X
TRANSACTIONID:  4MM79765A4836914N

I understand the error message, but I am not sure where to begin looking in order to try and rectify it. Sorry if this question is blurry, I am pretty lost and hoping that someone could just help get me pointed in the right direction here? Thanks in advance!

Upvotes: 0

Views: 716

Answers (2)

Chandresh M
Chandresh M

Reputation: 3828

you are suppose to called this function-
$httpParsedResponseAr = PPHttpPost('DoDirectPayment', $nvpStr);

where

$nvpStr =   &PAYMENTACTION=$paymentType&AMT=$amount&CREDITCARDTYPE=$creditCardType&ACCT=$creditCardNumber".
            "&EXPDATE=$padDateMonth$expDateYear&CVV2=$cvv2Number&FIRSTNAME=$firstName&LASTNAME=$lastName".
            "&STREET=$address1&CITY=$city&STATE=$state&ZIP=$zip&COUNTRYCODE=$country&CURRENCYCODE=$currencyID";

Some parameters may diff for your payment process,

so you can try this. Thanks.

Upvotes: 0

Chandresh M
Chandresh M

Reputation: 3828

"In your request string you may have use &L_COST0=18.00& for amount". which may create problem for transaction, The variable for line item is L_AMTn so in this case it should be &L_AMT0=18.00&.

Just try this if needed. otherwise send the request string you had pass for more detail view.

Thanks.

Upvotes: 1

Related Questions