Paypal is one of the largest e-payment service provider in the world.
In a recent project, I was tasked to implement Paypal payment solution
for the first time. The site specifically required Paypal's Direct
Payment solution through APIs. Everything was going fine until I hit the
"10001 - Timeout processing request" error. My attempted solutions
ranged from playing around with cURL parameters as suggested Here
to attempting transaction on the live Paypal URL using a valid card
number. However, none of it worked. Then I used code that I borrowed
from one of Smashing Magazine's article and upon closer inspection I
found that the expiry date format of my credit card was wrong. Paypal's
DoDirectPayment API expects expiry date to be without any separators
(072017 instead of 07/2017 or 07-2017). Once i got that right, my
transaction went through without a hitch.
Bottom Line: when using Paypal, one has to be very careful about that format in which the data is being sent.
Here is a link to a working example of my code.You ll have to put in API credentials in it though :P.
Paypal Direct Payment Code
Bottom Line: when using Paypal, one has to be very careful about that format in which the data is being sent.
Here is a link to a working example of my code.You ll have to put in API credentials in it though :P.
Paypal Direct Payment Code
No comments:
Post a Comment