How to resend PayPal ipn data? - paypal

Because of some reason, I lost a PayPal IPN data log. Does PayPal have an option to resend the ipn data or what can I do? Is it possible at all?

Yes, as long as it's been less than 28 days since the IPN was generated. Log in to your PayPal account; then, depending on what your account layout is, do one of the following:
(Most business accounts in the live environment) Click on Profile >> Profile and settings >> My selling tools. Find Instant payment notifications and click the Update link directly to the right of it. Then, find the link that says IPN History page and click on it.
(Older Website Payments Pro accounts) Click on Profile, then click Instant Payment Notification preferences (under the Selling preferences heading). Find the link that says IPN History page and click on it.
(Most business accounts in the sandbox, some business accounts in the live environment) Go to History >> IPN History.
This will bring you to a page that will let you search for any IPNs that were generated for your account within the last 28 days. Once you find the IPN in question, click the checkbox to the left of it, then click "Resend Selected".
A couple of things to note:
PayPal will only resend the IPNs to the same endpoint they were originally sent to. If you screwed up the URL, too bad.
The IPN may not be sent instantly. The resend request is placed into a queue (like all other IPNs) and processed later. In most cases, you should see the IPN sent within a few seconds to a few minutes.

Related

Paypal: Pending payments with Express Checkout

I have implemented Paypal Express Checkout on my website. So far everything seems to work in my sandbox, except that the payments are not processed. Every payment is "pending".
The only reason I get is
RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION
in the API response after executing the payment via API.
I cannot find any documentation on the reason, does anyone know how to fix it?
You have probably already solved the problem, but maybe someone else has similar problem.
I believe the reason for this is because the payments are in a currency that you do not hold, you need to configure your Payment Receiving Preferences in your PayPal account. Otherwise, your payment status might be pending until you manually approve the payment in your PayPal account.
Log in to your PayPal business account at www.paypal.com. Click the profile icon (Profile menu) on the top right side of the page. From the Business Profile menu, select Profile and Settings. (Note: If you do not see the profile icon on the top right, select Profile which appears in the top menu when the My Account tab is selected.)
From the left menu, click My selling tools.
In/under the Getting paid and managing my risk section, click the Update link for the Block Payments item.
Update Allow payments sent to me in a currency I do not hold to "Yes, accept and convert them to U.S. Dollars") and click Save.

Paypal IPN not firing?

I have a question about Paypal IPN, I was wondering when does the IPN activate and send it's message to my website.
I currently have my website that has a buy button. When the client buy the service, he is directed to paypal. Once he pay the service, nothing happen. In order for me to receive the IPN notification, the user has to click "Return to merchant website" or whatever the link is, then I receive the IPN notification.
Is it normal, does it work like that for everyone?
Cause right now, most people when they are done with the payment, just close the website and I don't receive any notification.
Thanks for any help !
Your question leaves a lot of missing information so I will go through each option for you:
Read here about how to setup a sandbox account if you don't already have one: https://developer.paypal.com/docs/classic/lifecycle/sb_create-accounts/
Bare in mind that your sandbox account is entirely separate in every way from your live paypal account. All settings will need to be checked and customised as needed.
Set up your IPN URL on your sandbox account Here: https://www.sandbox.paypal.com/uk/cgi-bin/webscr?cmd=_profile-ipn-notify
Once set up, you then need to download and set your code (PHP or something else) to the listener (referenced in the above sandbox profile link). You can find IPN code examples here: https://github.com/paypal/ipn-code-samples
When that's all set you need to set your listener to using the sandbox mode and then log in to your live account and then run the IPN simulator from here: https://developer.paypal.com/developer/ipnSimulator/
Paypal will send messages to your IPN listener and you need to do something with the messages, typically output them into some sort of log file. Any issues, you can read Paypals feedback and IPN data/delivery information here https://www.sandbox.paypal.com/uk/cgi-bin/webscr?cmd=_display-ipns-history&nav=0.3.4 [Found from History->ipnHistory on the Paypal menu] and it should list them out. You can resend any failed or queued or undelivered messages.
Paypal is a terribly documented and terribly structured system for coding with. I hate it. Use Stripe.
I love bullet points.
Paypal claims they will try and resend failed/queued IPNs 16 times over 5 days. I have yet to see this, you need to resend them manually (at least, sandbox ones)
Please remember all the settings and changes you have made to your Sandbox account will need to be also made to your live account before you make your payment system live!
Solution
My return_URL is the location of my IPN.php file which take care of the data sent and received. My problem is that the IPN is only firing when I click the "Return to merchant website" and not when the payment is actually completed
What you have done, from reading your comments, is set your IPN page to being your return from paypal page, this is NOT the way IPN is supposed to work, the IPN page should never be visited by the customer, only ever by Paypal.
Read through my anwser (points 2,3,4) and set up your IPN web link as I have described above, your return_url value should be a basic page to say to the customer "transaction complete". The IPN page is defined on your paypal accounts (sandbox and live) as I stated above.
This will fix your problem.

Where is the 'IPN History' on the new PayPal website?

Just been trying to find the new IPN History link on the new PayPal website and I can't see it anywhere.
Are they still supporting this?
The current PayPal for Business interface only provides a way to access IPN History if you have manually configured IPN in your PayPal account settings. In this case, you'd go to [your name] > Account Settings > Notifications > Instant Payment Notifications (click Update here), then the explanatory text there will include a link to the IPN History page.
However, that link would not appear if you have not manually configured IPN -- e.g., when your ecommerce platform automatically transmits IPN parameters to PayPal for each checkout. While you could manually enable IPN with a dummy Notification URL in order to get the IPN History link, this could result in PayPal completely disabling IPN for your PayPal account if they try sending any actual notifications to that dummy URL.
In that case, you can use this link to access IPN History directly once you're already logged into PayPal:
https://www.paypal.com/cgi-bin/webscr?cmd=_display-ipns-history
Note that if you have not manually configured IPN in PayPal, you will see a notice in IPN History saying, "The IPN feature is turned off. You must turn on IPN in order to create history data." That notice is irrelevant if your ecommerce platform specs IPN dynamically for each checkout; in that scenario, you can still view/search your IPN History without manually turning on IPN there.
More menu -> Site map -> Transactions -> IPN History
2020
Sitemap (Footer) -> Instant Payment Notification (IPN) history (under "Transactions")
It's still available in the same place. If you want to navigate to it
Log in
Profile link (white bar up top)
IPN settings
History link on this page
Currently it's directly at https://www.paypal.com/us/cgi-bin/webscr?cmd=_profile-ipn-notify (provided you're logged in)
In the latest UI: Settings > My Selling Tools > Instant Payment Notifications click "Update". You will see a link there called "IPN History page".
As of May 2022, it's still convoluted.
TL;DR:
For IPN History, try https://www.paypal.com/us/cgi-bin/webscr?cmd=_display-ipns-history
For IPN Settings, try https://www.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-ipn-notify
Also, a few reminders:
PayPal IPN is a completely separate feature from PayPal Webhooks.
Even though it's the exact same concept (argh!).
PayPal IPN is associated with your normal/business PaypPal account. It is is not a part of the PayPal Developer experience.
Also, PayPal IPN is now clearly deprecated, if not effectively obsolete, so if your application code is still reliant on PayPal IPN you really should update it to use PayPal Developer APIs and the Webhook service instead.
Anyway, here's the steps I took to find it today on 1st May, 20222:
Start off on your PayPal Business Account Dashboard page:
https://www.paypal.com/mep/dashboard
It should look like this:
Don't confuse this with the Developer Not
Use the top-left menu to go to Account Settings:
https://www.paypal.com/businessmanage/account/accountAccess
On the Account Settings page, look for "Notifications" in the left-side menu:
https://www.paypal.com/businessmanage/account/notifications
Then you'll see the link to PayPal Instant Payment Notifications.
Annoyingly, they don't use the term "IPN" so Ctrl+Fing for that won't work.
Click the "Update" link (even though we aren't updating anything: we just want to see IPN History), and you'll be taken to a page belonging to Olde PayPal just with a new header:
https://www.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-ipn-notify
And the link to the History page is disguised in the page's text:
https://www.paypal.com/us/cgi-bin/webscr?cmd=_display-ipns-history
And you'll be welcomed back-in-time to 2005 with a page that looks like this:

Paypal response slow

This is the process flow of a customer buying our service:
Create campaign
Select a payment method (credit card or paypal). User selects paypal
User is redirected to www.paypal.com and makes the payment
User is redirected to www.mywebsite.com/dashboard (return_url)
User sees his new campaign on the dashboard
When using the sandbox everything is working fine. When using the real service, when the user is redirected to www.mywebsite.com/dashboard, then the new campaign doesn't show up among the records.
I made extensive testing and found that with the live service PayPal gives me the response about 5-10 seconds later than when I am using the sandbox. So when the user is redirected to the his dashboard, the new purchase is not yet inserted into the database that's why it doesn't show up! They need to manually hit F5 after a couple of seconds to display the new record.
What can I do about it?
EDIT
I managed to bring up this delay problem with the sandbox as well. I found that there is a difference between the demo and the live payment:
In the sandbox, after the payment I see a window with the title Your payment is complete saying that I completed the payment, this is the transaction code, and the details will be sent to my email address soon, with two options: Back to the seller account (Back to [sandbox seller account]) and go to the paypal account overview. When I click the first one, it opens another window with the title Thanks for your order saying
Your payment of $0.99 USD is complete
If you are not redirected within 10 seconds, click here.
In the live system after I click Pay Now and the payment is complete, then the first screen does not show up, meaning right after the payment the Thanks for your order page is seen then I am redirected to my website (dashboard) within a few seconds.
How could I generate this delay problem in the sandbox?
In the sandbox when the screen shows up about the completed payment when I click quickly the Back to the seller account link, then I click quickly the click here link on the next screen in order to skip the redirection time, the new purchase does not show up on my dashboard on my website, because the data is not yet written into the database.
So the loading of the Your payment is complete window in the sandbox plus the time I click the Back to the seller account link is enough for paypal to give me the necessary data and for me to insert it into the database.
I guess the solution could be to activate that first screen in the live system, but how? What do you think?
I thought the solution would be to turn off Auto return but I can't. When I turn it off and click Save, I receive an error You have not turned on Auto Return. You must turn on Auto Return in order for Payment Data Transfer to work properly.
Start with adding Payment Data Transfer and Auto Return to PayPal Payment Data Transfer Information.
This is from the official PayPal Documentation:
Payment Data Transfer allows you to receive notification of successful payments as they are made. To use Payment Data Transfer, you need to turn on Auto Return. Here's how:
Log in to your PayPal account.
Click Profile.
Click My selling tools.
Click Update near "Website preferences".
Select On under "Auto Return for Website Payments", and enter your Return URL below.
Select On under "Payment Data Transfer".
Click Save.
The identity token will then appear in the Website Payment Preferences page of your PayPal account under the "Payment Data Transfer" section. For security purposes, we do not email you the identity token.
You'll need to pass this identity token along with the transaction token to us so you can receive confirmation that the payment is complete.
The slow load can be caused be a number of factors. One of which may be code related. Can you please post some code if you have already enabled Payment Data Transfer, and Auto return?

PayPal Sandbox links go to live PayPal site

I can log into the developer.paypal.com site with my PayPal credentials. When I then enter the sandbox as my seller account, all of the links in the menu system takes me to the live PayPal site, instead of the sandbox. I have been able to hack the url and prepend "sandbox." and in some cases that gets me into the IPN history and Recurring Payment Profiles. I can live with that work around if I need to.
My main issue right now is that I can't access any transaction history for my seller account. It goes to the transaction history on the live PayPal site, and shows me the transaction history for the PayPal account that I initially used to log into the developer site.
This is really holding up my project.
Any one have any insights?
I've tried things like deleting cookies, but nothing has worked so far.
It is (unfortunately) common for the sandbox to be broken in the ways you describe. However, this should not be holding up your project -- the sandbox is mainly useful for checkout/API testing, and there is very little need to review transaction history in the web interface.
I too have the same very annoying problem. I need to list the transactions because sometimes I want to delete them (they are recurring payments) so I am in control of which IPNs actually go to my test website.
After playing around with the sandbox, I have found that at first, the "history" link will send you directly to the live paypal site but if you first select "Withdraw", then the nav menu will display the correct "history" link (i.e. https://www.sandbox.paypal.com/fr/cgi-bin/webscr?cmd=%5fhistory&nav=0%2e3)
The screen will give you access to the 20 latest transactions; I haven't found yet how one moves to the next page without being sent to the live Paypal site.
If I delete the seller test account, will it cancel all the existing future recurring payments?
Cheers.