When an Order is placed, registered notification about transaction complete on Paypal is not updated automatically in comment history.
Whenever we Refund the amount from Paypal, registered notification about refunded amount is not updated automatically in comment history.
If the order is in "Payment Review" status at the time order placing, then it should be automatically changed to "Processing" status whenever the funds got cleared from PayPal. Currently this is not syncing automatically from PayPal and we have to click on "Get Payment Update" to check the status.
Preconditions
Magento 2.2.4
PHP 7.1.18
PayPal Express enabled in-checkout payment methods(for sandbox mode)
Steps to reproduce
STEP:1 place order on magento store.
STEP:2 Go to https://www.sandbox.paypal.com
STEP:3 open recent order history
STEP:4 issue refund
Expected result
paypal transaction status maintain in magento admin order view page in comment history section and also refund comment should be visbile on order view page in comment history section.
Actual result
there is no sync between paypal and magento store. any activity which done in paypal panel ,not reflect in magento admin panel.
below the screenshot of magento 2.1.7 admin order view page when the order is placed from paypal expree checkout .
enter image description here
i got the solution of my problem by changing some settings in my paypal sandbox account.below i mentioned steps.
Steps to Set-up IPN listener
Step1: LogIn with paypal business account at https://www.sandbox.paypal.com
Step2: In the Profile menu on the top right, click Profile and Settings .
Step3: click My selling tools .
Step4: Click the Update link in the Instant payment notifications row , in the Getting paid and managing my risk section.
Step5: Click Choose IPN Settings to specify your listener's URL and activate the listener.
Step6: Specify the URL for your listener in the Notification URL field .
i.e servername/paypal/ipn/index.
Step7: Click Receive IPN messages (Enabled) to enable your listener.
Step8: Click Save .
Step9: Click Back to Profile Summary to return to the Profile after activating your listener. You also can click Edit settings to modify your notification URL or disable your listener. You can click Turn Off IPN to reset your IPN preferences.
Related
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.
i want get transaction id from paypal after customer already paid by paypal account to update my database Please Help.
if you want to get the transaction ID from your PayPal account just login into your PayPal account and go to the "Transaction History", now next to each transaction you can click on details and you can see the transaction ID. If you mean to get this detail through customized code please explain in details your request, Thanks, Andre.
IPN is a message service that notifies you of events related to PayPal transactions. You can use it to automate your back-office and administrative functions and get information on transactions.
In order to use this feature you need first to activate it on your account.
1) Access your PayPal account (www.paypal.com)
2) Click on Profile
3) Click on Instant Payment Notification Preferences
**Please note that if you have new Layout on your PayPal account you need to click on My selling preferences and then on Update just beside Instant payments notifications
4) Click on Choose IPN Settings
5) Add a Notification URL (you must have a listener ready, examples below)
6) Make sure to check IPN messages on Receive IPN messages (Enabled)
7) Click on Save
Make sure also to check every value of the variable notify_url (if you use WPS) in every PayPal button or PAYMENTREQUEST_n_NOTIFYURL (if you use Express Checkout). Their value can overwrite the value you wrote on your PayPal profile for Notification URL.
Please find below some useful links:
Instant Payment Notification:
https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNIntro/
Setting up IPN:
https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNSetup/
I need a solution to prevent visitors to reach pay-pal return url ( success page ) if they did not pay or paid but want to visit again .
How can I make a visitor see this returl url only 1 time right after paid via pay-pal ?
Thank you for your helps
You have to enable auto return in your PayPal account, otherwise it will ignore the return field.
From the documentation (updated to reflect new layout):
Auto Return is turned off by default. To turn on Auto Return:
1 - Log in to your PayPal account at https://www.paypal.com. The My Account Overview page appears.
2 - Click the Profile subtab. The Profile Summary page appears.
3 - Click the My Selling Tools link in the left column.
4 - Under the Selling Online section, click the Update link in the row for Website Preferences. The Website Payment Preferences page appears
5 - Under Auto Return for Website Payments, click the On radio button to enable Auto Return.
6 - In the Return URL field, enter the URL to which you want your payers redirected after they complete their payments. NOTE: PayPal checks the Return URL that you enter. If the URL is not properly formatted or cannot be validated, PayPal will not activate Auto Return.
7 - Scroll to the bottom of the page, and click the Save button.
IPN is for instant payment notification. It will give you more reliable/useful information than what you'll get from auto-return.
Documentation for IPN is here: https://www.x.com/sites/default/files/ipnguide.pdf
Online Documentation for IPN: https://developer.paypal.com/docs/classic/ipn/gs_IPN/
The general procedure is that you pass a notify_url parameter with the request, and set up a page which handles and validates IPN notifications, and PayPal will send requests to that page to notify you when payments/refunds/etc. go through. That IPN handler page would then be the correct place to update the database to mark orders as having been paid.
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:
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?