Using PayPal NVP PHP API. When a payment is submitted $ACK response equals "FAILURE" with the long message "THIS TRANSACTION CANNOT BE PROCESSED. PLEASE ENTER A VALID CREDIT CARD NUMBER AND TYPE.".... however the payment does go through. I end up getting paid multiply times because of the Failure response error. Does anybody have any experience with this?
It sounds to me like you must somehow have duplicate API hits happening, where the first one includes all the correct details and processes the payment, but then you have one following that up which is empty and returning the error, and that's the result people are seeing on the site.
I would make sure you have logging setup of some kind so you can see all of the API requests and responses, and then when you run a test order check to see if you're getting more logs than you expect.
Related
I really need help because I don't know what to do at this point. I developed a website where the new user need to pay for sign up, I set the correct paypal form button and about the money everything works ok, the problem is that I can't update my database. I'm using these files (they are provided on gitHub and also in the official Paypal guide there's a link to them): "PaypalIPN.php" and "example_usage.php". I also added to my Ubuntu cloud server (where is my website) the cert/cacert.pem, I don't know if I had to do but in the first file seems to be required.
I tried to run a IPN simulator but it doesn't work, I looked for the same problem and I found that there may be a problem with the simulator, so I made some real transactions (I've read that live production test is run correctly with that code).
Therefore:
the transaction money is ok;
in the Instant payment notification history there are all test I made and in message ID I can read the correct data passed in the IPN message, the IPN type is "Transaction executed" and the response code is 200. I noticed that in "example_usage.php" the 200 response code was out of the if ($verified) so, just for my last test, I put that inside the if and yes, the response was again that;
I tried my code for update the mongodb database with fake data and obviously it works.
How is it possible? Please, help me and thank you.
Did you verify the correct URL is showing in the IPN History details? Sometimes people are using a button that uses notify_url to override the PayPal account setting, and then IPNs are working, but they're going to a different place than expected. So check that first.
If the IPN is indeed going to the URL you expect, and it's returning a 200 OK, that means it's receiving and completing the script successfully. If you aren't seeing the expected result in your database then you must have some sort of a logic problem with your code that needs to be addressed. You need to build in some trackers to log files or send yourself emails as it does each step of your script to see if that portion of code is actually getting hit like you think it is.
I put together this article for how to test PayPal IPN a while back that has proven helpful for many people. If you follow the steps there you should be able to track down the problem.
I am using PayPal API of php. It was ok since 2 years but now its creating problems for some customers. Some of the orders are fine but for few users, the transaction is completed but API doesn't response (throw empty response).
I don't think it will be because of code issue. I am unable to track the issue. Anyone know, why it's showing the random behavior.
The interesting thing is, for the same customer, doing the second time transaction, it works fine. Totally random behavior. Please need expert suggestion.
Please contact PayPal Merchant Technical Support, provide with your PayPal account and API request example which go empty response.
https://www.paypal-techsupport.com/
We are using opencart-1.5.6 and installed authorize.net(AIM) and PayPal as the payment gateway.But while we checkout using authorize.net, the card is processed and cash is deducted from credit card successfully, but the page is not redirecting to the confirmation page.Mail is sent successfully to admin and also purchase status is also set as completed.But the page still stuck in showing a please wait message.
System is working in the sandbox mode and issue happens when its live.
I would greatly appreciate if you can help.
As SankarV is recommending, exploring the response for the confirm AJAX request is the best bet - there might be no direct error in console, but since AJAX response contains invalid JSON due to possible PHP errors being printed out, the redirect to a success page could not be performed. So again, explore the AJAX response for the confirm request and come back with anything suspicious within it.
And though some entry_company might not take place in the checkout, since it is echoed somewhere while not instantiated, the PHP Notice is raised thus making the JSON response invalid...
I integrated PayPal to a custom website. Post integration, did a transaction test. All params seemed to pass through correctly. Made the transaction payment (for trial basis kept amount as low as $ 0.02) and PayPal perfectly executed it and redirected it to the url that i had defined for success trn. However, neither does the seller paypal account show the turn nor has $0.02 been debited from the buyer's paypal id.
Kindly let me know of the mistake if any. Under what circumstances is such a thing expected.
P.S: The balance in the sellers account is $0. Is it possible that because of the negative value, the turn did not go through? ($ +0.02 - $0.3) : 0.3 being the commissions
It could be a number of things.
Try catching the response sent by paypal and putting it into a log file.
Simply do this:
ob_start();
print_r($_POST);
$data = ob_get_clean();
file_put_contents('log.txt',$data,FILE_APPEND);
This will help you in determining what the problem is. A lot of times, the transaction is in "pending" mode.
i have a big Problem.
I build my own Shop and now i'm trying to integrate Paypal.
I successfully integrated Paypal with Sandbox. Now that I'm changing to the Live Mode an Error appears:
API Error 10411 - This Express Checkout session has expired. Token value is no longer valid.
It doesn't make any sense..
Normaly this Error appears if the client needs to much time to complete the transaction, but i don't need more than 30 seconds.
Actually everything works until reaching the return-Site, here comes the answer "FAILURE" and this error message.
The strange thing is, that everything works fine with Sandbox, but in the Live-mode my token is invalid. I checked the API Name, Password and Signature almost a hundred times and it should work.
Does anybody has any ideas why this Error appears?
Thanks for your help!
I had the same problem.
My mistake was :
- SetExpressCheckout was made toward paypal sandbox
- GetExpressCheckoutDetails was made toward real Prod Paypal
So double check that the Token you get from PaypalSandBox is used with PaypalSandbox (and same thing for real Paypal)
i had the same issue, and i was in sandbox mode when checking the token. so always be sure to test against the LIVE system and not the sandbox