In my listener method for Paypal Instant Payment Notification I very occasionally receive a null valued payment_status. This is supposed to be set to a string value like "completed", "pending", "refunded" etc. Neither do I subsequently get a completed status sent in any follow up IPN; as a result, I don't do any server side processing and the users can't access their purchased items.
Perhaps I should return a BadRequest and the IPN will get sent again?
Anyone know what's going on?
Related
I'm using Express Checkout, and the response from DoExpressCheckout returns the following parameters:
PAYMENTINFO_0_PAYMENTTYPE = INSTANT
PAYMENTINFO_0_PAYMENTSTATUS = COMPLETED_FUNDS_HELD
PENDINGREASON = NONE
REASONCODE = NONE
HOLDDECISION = PAYMENTHOLD
However, the IPN that's sent along doesn't make any reference to the funds being held. The payment_status is set as Completed and there's no mention of a parameter that might signify an issue in the documentation for the IPN values.
How can I ensure that I only react once the payment has been taken out of review, and is no longer being held?
(Note: I need to resolve how to handle this in the IPN, not the underlying problem with the account, as this is a historical issue that I need to prevent from happening again for any reason)
IPN are showing the transaction status during the time it was happen, in your case, the payment are done, completed which means, the money was initiated from the buyer account into your account, but due to some issues/reasons the transfer of the said money was pending. Some security check has caused the transaction funds being held
In IPN payment status, it was showing that COMPLETED_FUNDS_HELD which means there is a money come into your account but then it was held due to some reason where only PayPal knows.
This payment will be release in a few days, and until that time, if you handling the payment carefully from your website dashboard order, it shouldn't be any issue because normally PayPal only hold it for a few days.
Until this time, I written this, PayPal hasn't got any solution for this type of held because it was an account related issue where IPN are not feed to the get the update.
In the documentation for IPN, it says things like "Check email address to make sure that this is not a spoof". But I cannot see what to do when that is the case, and how I tell PayPal I want to reject a transaction. E.g. do I sent back a 400 instead of a 200? Or alter the POST data in some other way?
Or do I just ignore the message? (The problem with that is that PayPal will keep re-trying, which is wasted bandwidth for us, but also means it takes longer for the user to hear about the payment failure.)
Background: I realize sending it back to PayPal and getting the VERIFIED message back handles most security issues. But in my case, there is some unique ID information in the custom field. If that is missing, or does not validate against the DB, I want to reject the payment. I want my customer to see it failed, so they know to go and use a fresh form. The alternative is to accept the payment, and then have to involve a manual process trying to work out who the payment came from, and then possibly do a manual refund. (Other reasons to do this might be that the inventory has sold out in the split second between them seeing a product on the site and clicking BUY.)
The payment didn't fail. PayPal is notifying you that the payment succeeded: not asking you whether you want to accept it. You can't reject it at this stage.
Simple send back a 200 code to let Paypal know you received the IPN, otherwise Paypal will try to send the IPN response repeatedly.
IPN is Instant Payment Notification. After the payment paypal notify you the result of the payment. Check if connection VERIFIED, and next if if the payment is Completed and mark the result in the database.
If you say to PayPal the ipn address in the cart, Paypal send you the notification. You can't say to paypal: "yes please, send me a notification" and when receive say "why you send this?" If you put ipn in cart form you can provide a ipn url with code 200, not 404. Or remove ipn value in the cart form
How can we validate a payment Success/failure using response Token from Paypal in PayPal Express Check Out.
The DoExpressCheckoutPayment response (if Successful) will include a PAYMENTINFO_n_PAYMENTSTATUS parameter that you can check to see if the payment associated with the API call is actually completed or not.
If this param has a value of "Completed" then you know you're good to go. It could be "Pending", though, in cases where an e-check is used for payment, fraud filters flag the transaction, etc.
Because of this it is recommended that you use Instant Payment Notification (IPN) in order to handle all post-transaction processing tasks like updating your database, sending email notifications, etc.
PayPal responds with a message, such as the one shown below. Note the status, which should include ACK set to Success, and a token that is used in subsequent steps.
TIMESTAMP=2007%2d04%2d05T23%3a23%3a07Z
&CORRELATIONID=63cdac0b67b50
&ACK=Success
&VERSION=XX%2e000000
&BUILD=1%2e0006
&TOKEN=EC%2d1NK66318YB717835M
Source
I am using PayPal's IPN service to confirm payment. My listener is checking the payment_status variable hoping to find "Completed". I don't want to do anything in my database unless the payment comes back "Completed". My question is, what if it does not come back with that status? Will PayPal continue to communicate with my listener until it is complete? For example, the status could come back as "Processed", which appears to be a step before "Completed". Below is a link to a document with all of the variables:
https://www.paypalobjects.com/webstatic/en_US/developer/docs/pdf/ipnguide.pdf
On page 10:
Because IPN messages can be sent at various stages in a transaction’s progress, make sure
that the transaction’s payment status is “completed” before enabling shipment of
merchandise or allowing the download of digital media.
So yes, I think PayPal will always give you an IPN with Completed status.
I have done some scouring but cannot find a definitive answer for this!
I get "VERIFIED" and "Pending" so i can put my orders from "placed" to "in-progress" but need the complete / failed so i can then transfer to "paid" and "cancelled".
Anyone have anything definitive on this, or is it a waiting game until test payments are complete (not using sandbox).
If the payment has a “Pending” status, you receive another IPN when the payment clears, fails, or is denied.
Also, here are some good things to check once you receive Payment_staus=completed
Check that the "txn_id" is not a duplicate to prevent a fraudster
from using reusing an old, completed transaction
Validate that the "receiver_email" is an email address registered in
your PayPal account, to prevent the payment from being sent to a
fraudster's account
Check other transaction details such as the item number and price to
confirm that the price has not been changed
You get another IPN (not a 'resend'), same txn_id, with payment_status='Completed'.