WooCommerce IPN Notification - wordpress

I need some help typing to figure out what im doing wrong.
My site is setup to manage orders using WooCommerce. the site is a public site, but my Perl Script needs to be implemented as im testing a few things out and displaying some messages. The public site is called 'publicwebsite.com'. But the other site im displaying all this information and proccess it is called 'mywebsite.com'
I have setup my API credentials and setup my IPN for paypal payment. To direct the IPN to my website i have gone into the 'My Selling Tools' on the sandbox side of Paypal, and set the IPN to http://mywebsite.com/test_pl.html
when i place and order, somehow the IPN is not being directed to the URL. I went to the IPN tabe again on the Paypal side, and clicked on history, and i see that the 'Notification URL' is still set to http://publicwebsite.com/WC_Gateway_Paypal, whereas it should have been http://mywebsite.com/test_pl.html.
I cannot seem to find the place where i can change the preferences such that Woocommerce pushes the information onto the site.
Please Help.
Thanks in advance

WooCommerce will set the IPN location of each transaction so that it can be notified when an item is paid for and continue its process.
Not knowing your data flow, I would suggest looking into woocommerce available hooks and hook into the IPN notification and then send the data (and user) to your perl script.
This way you satisfy WooCommerce's condition that it needs to know about payments, and you satisfy your need to have your perl script called so that it can do additional processing.

One possible solution is to update your IPN settings in your PayPal Account. If you have a standard PayPal account here are the instructions directly from PayPal Documentation:
Go to the PayPal website and log in to your account.
Click Profile at the top of the page.
Click My selling tools.
Click Update beside "Instant payment notifications" in the "Getting paid and managing risk" section.
Enter the notification URL and select "Receive IPN messages."
Click Save.
Just in case you need it below is the PayPal Instant Payment Notification Guide. It includes an IPN simulator.
PayPal Instant Payment Notification Integration Information

Related

Custom PayPal Checkout for subscription plan

I want to build a custom PayPal checkout for a single product (subscription plan).
On successful purchase I need to save the current date +30 days to the user profile as well as upgrade the user role to "premium". This part is no problem but I'm having trouble finding how and what I need to use from PayPal.
Could someone point me in the right direction? Is the PayPal IPN service still a thing, or is it legacy?
I checked out some PayPal WordPress plugins but they offer too much esp. an own member solution or integration with WooCommerce, which I don't need. I only need a plugin that handles the checkout and gives me the chance to hook some custom actions on some events for example the successful purchase.
There's no reason to use something old like PayPal IPN. Use the current Subscriptions API, and webhooks for event notifications.
Subscriptions are documented here: https://developer.paypal.com/docs/subscriptions/integrate/
And to subscribe to webhooks for later event notification, see webhook event names for subscriptions.
The Webhook documentation mentions using REST SDKs. Those SDKs are deprecated, use HTTPS API calls.

Problems with PayPal in WooCommerce

I have correctly configured payments with PayPal in WooCommerce, sometimes I get orders and pay for PayPal and everything is fine, but sometimes some customers pay and WooCommerce does not change the status of the order to "Paid", and for that reason customers contact me to tell me that they already paid and yes.
Does anyone feel the same?
PS: This error is occasional, I do not know what it could be.
You could always just log in to your PayPal account and see if the transactions that show an incorrect status in WooCommerce do actually exist in your PayPal transaction log with the correct status. If so, then you should contact WooCommerce support for them to explain why those same transactions do not show up with the correct status in their portal. If WooCommerce tells you that it's an issue with PayPal (and thus, there is nothing to be corrected at their side), then open a case with PayPal support and they can look into the logs being sent from WooCommerce's API calls into PayPal to confirm whether or not they are doing it properly.
PayPal Standard that comes with WooCommerce uses IPN to update the order status. Unfortunately, their IPN integration is not great, and it often fails.
If you use my PayPal for WooCommerce instead, and setup Express Checkout, this problem will not happen. Also, you'll have a lot more features and functionality.

Woocommerce orders not being received by PayPal, but email suggests otherwise

Having a nightmare with this and cannot find a solution anywhere - the only similar issues I find are the exact opposite problem!
Placing an order using PayPal (standard) at checkout puts the order 'On hold' in wp, but completes on the front end and the user even receives the PayPal receipt so are none the wiser. In the PayPal business account there is nothing.
Interestingly, PayPal express checkout works fine! So the account is definitely setup correctly. Something I have noticed is that the receipt from the express checkout transaction and from the standard have different Merchant names - the standard one (the one not working)has the name#emailaddress.com rather than the merchant name. This would suggest that this is the issue, but I've been into the business settings and checked this as well as the Woocommerce settings and everything is in order.
Any ideas? Thanks in advance!
For Woocommerce PayPal standard you have to enable Auto return url and Notification url(Instant payment notification) which will update the order status on your woocommerce. Refer the following URL link: https://docs.woocommerce.com/document/paypal-standard/ and enable both Auto return & Instant payment notification settings on the Merchant/Business PayPal account. Please note that Merchant PayPal account is not linked with any other website.
PayPal Express checkout is recommended: https://woocommerce.com/products/woocommerce-gateway-paypal-express-checkout/
I would recommend you just stick with Express Checkout. It has many more features and options than PayPal Standard. I would recommend the PayPal for WooCommerce, though, which is the one PayPal reps would recommend as well if you talk to them.

Paypal website payment standard not returning to return url from Sandbox test account

I am using Paypal Website Standard integration with Asp.Net and my problem is even after payment is successful, paypal is not returning me to my thank-you.aspx page. I have already set return-url in code as
sbForm.Append("<input type=\"hidden\" name=\"return\" value=\"" + successUrl + "\">");
means, I have created form mark-up using Code-Behind. Success url is absolute reachable (I can copy url and paste in browser, it works). I have my sand-box settings as below:
Profile -> Selling Tools
Under Selling Online -> Website Payment Preferences
Auto Return: On
Return URL: http://mywebsite/thank-you.aspx
Payment Data Transfer: Off
PayPal Account Optional:On
Contact Telephone:Off (PayPal recommends this option)
Support giropay and bank transfer payments:No
However it return to cancel page without fail if I cancel payment.
Edit
Taking reference if this, I set PayPal Account Optional:Off but no luck.
Edit
When I click the link after payment success message on Paypal's success page, I can go back and debug but it not returning any QueryString with the key name tx which results always Fail\n response.
With Payments Standard, enabling auto-return with a return URL should redirect, but it can sometimes take up to 10 seconds or so for the redirection to happen. That's why there is no guarantee users will make it to your thank you page even when it's all configured and working well.
If you need to ensure users end up at your site and there's no chance they wouldn't reach your thank you page then you'll want to use the Express Checkout API instead of Payments Standard.
The Express Checkout flow doesn't get completed until the user is back at your site (where you make the final API call) so you can rest assured you'll always end up on your thank you page.
Even still, if you're trying to automate procedures like updating your database, sending email notifications, etc. you'll want to use Instant Payment Notification (IPN).
IPN's are triggered instantly, so you can automate procedures in real-time. It also allows you to handle things like pending payments that have cleared (which you wouldn't want to deliver or ship right away), disputes, refunds, etc.
Turned Payment Data Transfer On and get it worked

How do I fetch the Transaction ID from PayPal website to my web site?

I am using Paypal sandbox testing module in my Shopping cart site. I have test account in paypal sandbox. i am sending amount to paypal. After payment success when retun back to my web page I want to get transaction id and amount.Kindly help me.
You probably want to use Paypal IPN. You can get the Paypal transaction id, amount, and a slew of other information, using Paypal IPN. Basically, this is where Paypal will do an https post back to your site after a transaction, and send all of the info for the transaction. See https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNIntro/ for info.
You need to specify redirect url.You can have two urls one for success and other for failure.Thats how i implemented it in one of my project (Dont have it now with me for reference).
Take a look here or here.This link has an sample project.It may help.

Resources