Paypal - DoExpressCheckoutPayment null pointer
Posted
by
user969894
on Stack Overflow
See other posts from Stack Overflow
or by user969894
Published on 2011-11-18T17:36:56Z
Indexed on
2011/11/18
17:51 UTC
Read the original article
Hit count: 305
String nvpstr = "&TOKEN=" + token + "&PAYERID=" + payerID + "&PAYMENTREQUEST_0_PAYMENTACTION=" + paymentType
+ "&PAYMENTREQUEST_0_AMT=" + finalPaymentAmount + "&PAYMENTREQUEST_0_CURRENCYCODE=" + currencyCodeType
+ "&IPADDRESS=" + serverName;
Having done an earlier call to SetExpressCheckout, I had to change a few parameter names because Paypal had changed it in the documentation but not in the code from the integration wizard.
Now for DoExpressCheckoutPayment I've modified a few but I get a null pointer at strAck:
HashMap nvp = httpcall("DoExpressCheckoutPayment", nvpstr);
String strAck = nvp.get("ACK").toString();
if (strAck.equalsIgnoreCase("Success")) {
return nvp;
}
Not sure what is wrong, any suggestions for debugging this or possible solutions?
© Stack Overflow or respective owner