How to recreate the IPN from PayPal? - paypal

We had an error in one of our scripts and even if the notify_url from PayPal was called properly, our system was not able to record it since it had errors.
Therefore we have several transactions in PayPal that were not added to our Data Base, is there any way to recreate PayPal's IPN or re-execute the notify_url for each transaction?
Thanks!
FYI: we are using Website Payments Standard.

Go into your PayPal profile, then into Instant Payment Notification Preferences. You'll see a link there for IPN history. You can see all of the IPN's that have been sent by PayPal to your system and their status. You can select IPN's from this history list resend them as needed so your system can process them accordingly.

Related

PayPal IPN email issues

I've been getting daily emails from PayPal for the last week, telling me that PayPal IPN's are failing to a specific address. I've changed the listening address in the PayPal IPN panel to the one listed on my site for the plugin it communicates with. But the emails still keep coming. Can anyone offer a solution?screenshot of email here
I changed the IPN address listed in PayPal's IPN panel. This made no difference.
The IPN url configured in the account is only used if no notify_url is specified at transaction time. If all your transactions specify their own notify_url, the URL configured there has no effect.
So, for new transactions, need to change the URL your integration is specifying at checkout time when it creates the payment attempt/redirects the payer over to PayPal.
For previous transactions and subscription payments that specified a different URL at transaction time, there is no way to change nor update that URL. An old one will continue to be used for refunds and future subscription payments.

After modifying the PayPal IPN URL, still using old IPN listener URL for some notifications

I'm working on a project which has PayPal integration. We have two PayPal accounts for payment and choose the PayPal account based on the type of users. We previously had two IPN listeners for the two different PayPal accounts. Previously our IPN was pointed to "https://www.old-domain1.com/paypal/ipnhandler" and "https://www.old-domain2.com/paypal/ipnhandler". Yesterday we have updated two websites into one and we started to use a common IPN to this address "https://www.new-domain.com/paypalipn/paypal/IpnHandler" to the new project.
We have added the common IPN URL on both PayPal accounts. But we could see PayPal is still sending the IPN to the old IPN handler for the old recurring payment. Our old IPN handler URLs are not currently working and we don't have the option to update the payment if PayPal is still sending the notification to the old URL. For some users, it worked correctly. For some users PayPal still using the old IPN URL. Why does this happen?
Now we have one IPN listener for two different PayPal accounts. Is this related to the problem?
If a URL was specified as part of setting up the transaction (i.e. by the software/site when the user was redirected to PayPal), that transaction-level specification supersedes any setting in the PayPal account. It is now set in stone for anything related to that transaction/recurring profile, and cannot be changed.

paypal integration types confusion

I new to paypal integration in asp.net . I found very difficult to understand the paypal api .
I under stood two types -
inline html form ( i.e is also called buy button )
payflow api
my questions are :
which one must be used for recurring payment ( subcription packages for end user)?
in first type , few sites suggested to use IPN for confirmation of payment. I want to know is it neccessary since without using IPN, also using notify_url we can confirm the payment success (as per my knowledge notify_url returns to your site when payment is completed at paypal site)?
for recurring payment , do i need to store user account details (i.e credt card or paypal account ) in my databas?
please do reply with you suggestion .
Thanks
1) You can do it with both, actually. If you want to stick with basic HTML forms then you'd be using Payments Standard, and they call it "Subscriptions". You can easily create a Subscription button from within your PayPal account.
If you're using the API then they call it Recurring Payments (or Recurring Billing). You would use Express Checkout for the PayPal signups, and Payments Pro if you want to handle credit cards directly on your site without any redirect to PayPal.
IPN is useful regardless of what integration method you're using, however, don't get it confused with PDT. PDT sends data back to your site's thank you page, or whatever final page you setup for it, and it only works with Payments Standard. When PDT is configured on Payments Standard, even with Auto-Return enabled, there is no guarantee the user will make it back to your return URL. IPN is very similar, but data will always be POSTed to your IPN listener regardless of whether or not the user makes it back to your site.
You'll also want to use IPN to handle updates for future payments on a subscription / recurring profile. For example, the actual payments, cancelations, suspensions, reactivations, etc.
The notify_url parameter you mentioned is used for IPN. Again, though, this is separate from PDT. A common mistake I've seen many times is when people have their PDT and IPN both set to the same URL. Then when people do make it back to your thank you page, the code actually runs twice. Once from the user actually hitting it, and once again from PayPal's IPN server hitting it. So make sure to avoid that sort of thing.
3) No, you will never save credit card details to your server. The subscription / recurring system handles that using the data that PayPal saves on their servers.

PayPal express checkout handling "pending payments" with IPN

I cant find anny clear documentations about this.
If you use paypal express checkout, when a payment is pending what happens next?
Does paypal sends you by IPN an update if the states changes, do you have options?
Let say you do an DoExpressCheckoutPayment (with NVP)
and you get this:
&PAYMENTSTATUS=Pending
&PENDINGREASON= ECHECK //The payment is pending because it was made by an eCheck that has not yet cleared.
&REASONCODE=None
So you've made the payment and you want to wait until its cleared? What should you do next.
Update Some (external documentation) I found only sugest you could use (IPN?) to handle pending payments.
"If the Do Express Checkout Payment PENDINGREASON response is a value
other than none or completed , the payment is pending. Typically,
this means the customer has paid with aneCheck. In such a case, funds
are not guaranteed, and you should not ship or deliver items or
services until the payment has successfully completed. NOTE:
PayPal recommends that you block eChecks as a payment method if you
are unable tohandle pending state payments.To find out the status of a
pending payment, you can:
Submit an Inquiry transaction.
Check the status using PayPal Manager. See PayPal Manager online help
for details."
The paypal sandbox seems to have the option to check IPN messages for the express checkout type. The only correlation (if its ment to be used this way) between the DoExpressCheckoutPayment and the IPN seems you can use the "custom" field to keep track of a pending status. The txn_id (ipn) isn't given in DoExpressCheckoutPayment (nvp). Does any one have any experience with this?
The transaction ID is most certainly given in DoExpressCheckoutPayment, even if the PAYMENTSTATUS=Pending. A pending payment is still a transaction.
So yes, you would be notified via IPN when the transaction is completed. This typically takes a few working days.
Once it has completed, you can correlate the transaction from DoExpressCheckoutPayment to the IPN you will have received via the txn_id in the IPN.
Note: If you want to test a 'Pending' payment in the PayPal Sandbox, simply go to https://developer.paypal.com/ > Test account and click on 'Payment review' for the seller account you're testing with.
Once payment review is enabled on that seller account, any transactions it receives will be in a 'Pending' state.
Simply disable payment review to release the tranasctions afterwards.
I thought i'd add my two pence worth of thoughts to this.
I was getting a pending return status using Express Checkout via the dotNet SDK, according to the doc's and examples I should have been getting an 'approved' status.
I couldn't figure out why but it turned out to be because I was passing through a new currency, in our case 'GBP'. I had to log in as the facilitator sandbox account and decide what to do with the new currency.. convert it or setup a new balance in the currency. Once I did this, and set it as the default action, the pending return status no longer occurred.
hope that helps someone!
One thing not noted here and I haven't found anything else to confirm.. is that Paypal Express API doesn't support passing in the NOTIFYURL with the code. So you have to use the hardcoded IPN url set in your paypal account. This of course causes issues because you need a common callback file that can redirect to the individual payment options.
For example, if you are using Paypal Express AND Paypal Advanced.. Neither of those properly support a notifyurl passed in using the code. Paypal Advanced claims to, but it doesn't seem to work. So there needs to be a common IPN callback file that handles the redirection to each.
Unless someone else can confirm a working notify url for Express Checkout variable that can be passed in the code?

Checking if paypal payment was successful

I have downloaded sample code from paypal to allow me to use parallel payments via their sandbox accounts. When I run parallel.php, I get redirected to paypal's sandbox login page.
How am I supposed to know "server side" that the payment has been made successfully, so I can update my database records?
I believe you have to work with PayPals IPN system. This will basically send a confirmation to your server that tells you it has gone through.
https://www.paypal.com/ipn
Paypal lets you register a notification url which is part of the IPN (instant payment notification IIRC) system. So if someone pays by a delayed payment (such as a bank transfer) the transaction will update days later. You need to have an application (web page) on your server that can be called by Paypal with transaction details to update a payment.
You'll need to create an initial transaction record in your system when paypal redirects back to you so refer to their documentation for that. I'd also recommend looking at either OSCommerce or Zen cart for an idea of how they do it as they support the same kind of thing.