using PayPal IPN with WhooCommerce - wordpress

I have a web store which for it I defined an IPN in paypal.
lets say the address is: www.x.x .
This is working great.
Recently I lunched another website with woocommerce web shop.
The IPN that should be running hasn't changed.
However for some reason, it doesn't work from the new site.
When I see the history of transcations in paypal...
I see that the Notification URL is diffrent that what is defined in Paypal.
Now it goes to:
https://My_Site/wc-api/WC_Gateway_Papal/
Why it doesn't go to www.x.x as it should? and how do I fix it?
Why does URL defined in Paypal are overwritten?!

Basically there are two ways of defining the IPN URL : one set in PayPal , second website will send it to PayPal via the code as a variable . If the IPN URL is sent via variable then it will override the URL mentioned in account .
So in your case the URL is being sent from WC to PayPal and hence over writing it .

What you will look for is a variable "notify_url" (or NOTIFYURL if using our APIs) and the value of that variable will be the URL Paypal will use for IPN on the specific website.
As Eshan says, if the variable is present, it will override your Paypal account settings so you can remove that line with the variable and in that case, Paypal will then use the IPN URL defined in your Paypal account.
Hope that helps.
Regards,
Florian

Related

PayPal WooCommerce Connect multiple websites with one PayPal account

I have two brands, each with their own website. Website A is already using PayPal, now I want to connect Website B, but I can only specify one return URL in PayPal.
Is it possible to connect multiple WooCommerce stores to one PayPal Account? If so, how does it work? Does WooCommerce sends its own overwrite for the return url?
Does WooCommerce sends its own overwrite for the return url?
The PayPal payment method you have configured in woocommerce may or may not use a return URL. If it does, it will specify it when it sets up the transaction. The setting in your PayPal account is irrelevant.

WordPress Plugin Development - Post request

Am developing wordpress plugin that makes donation, through lcoal online payment providers. After payment complete a post request should be sent to the website.
My question is how to make specific wordpress page receive post request using the plugin i created
Indeed, this question is unclear.
But to what I understand, you want that a specific page that would be provided by a user of your plugin, be called upon completion of the payment.
Your plugin would allow entering that page in the plugin's configuration.
If it's that, as an example, Paypal does it : See https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/step_3/, Take customers to this URL when they finish checkout : They call back the URL passed to their site, upon payment completion.
In your case, you must see with your local online payment provider if he supports that feature and call it with such URL as parameter.

paypal IPN notifyURL calls wrong url

I am using paypal standard payment done by HTML variables. I have set up IPN url and turned it ON in my profile.
url in profile : http://example.com/IPNHandler.aspx
But I got one more payment page where I need to create different IPN handler and called this URL in "notify_URL" from code.
redirecturl += "&notify_url = http://example.com/IPNHandler2.aspx"
As per the paypal documentation default url in profile gets overridden if we send the notify_url to the paypal. It was working fine till last month, but last month when I tried the second payment its IPN messages sent to first URL in the profile which is "http://example.com/IPNHandler.aspx". Seems "notify_URL" is not working anymore.
Can anyone help me please.

notify_url not working in new paypal

I have registered to paypal on live on https://www.paypal.com. Not verified for live.
I can login to https://developer.paypal.com with above login detail.
Here I go for sandbox accounts, I have created two account, one business and one personal.
(Sandbox account are verified)
I am trying for payment integration with Paypal with html form.
I have specified the notify_url, payment goes all right but no notification in notify_url.
I have double checked the notify_url, its working fine.
Anybody there, what seems to be wrong here?
Are you using buttons created and saved to a PayPal account? You may not be able to define a notify_url value through a hosted button. IPN may also be disabled in the account.
Log into the seller account receiving the payment, enable IPN, and set a URL for the post to be sent to. From the "Instant Payment Notification Preferences" section (where you enable IPN) you can view the IPN History which shows you the last 28 days of IPN posts sent for that account.
I've run into the same problem. A buy now hosted button was saved without errors, but a notify_url was not notified by paypal.
There is a work around, you can specify a notify_url in your profile globally.
paypal docs
For future reference: I just had the same problem. This caused it in my case:
I have been testing on the development server. This server was not accessible for IPs outside of our company (for security purposes). So the IPN-call from paypal never came trough to the IPN-script on the development server.
Took me one day to figure that out...
If you already done the test of the IPN via the simulator https://developer.paypal.com/developer/ipnSimulator/ and checked if it's OK?
Have you checked you set the "pixel" in your HTML form? If it's missing, the notify_url won't work. This solution worked for me.
For Sandbox, use : <img alt="" src="https://www.sandbox.paypal.com/fr_FR/i/scr/pixel.gif" width="1" height="1">

Paypal integration without IPN

I want to integrate paypal buy now button and get feedback from paypal in a school project, but i don't want to use IPN because the computer running the website will not be accessible from outside.
Are there any options for doing this?
You don't have to enable IPN to have buy now buttons on Paypal, it's completely optional. The buy now button will still take you to the correct page on Paypal so the purchase can be made. IPN only allows you to get feedback from Paypal when this happens.
Well, I need to get some information
when a successful payment is made.
Paypal can notify you by mail when something has happened.
Apologies for the bump. Just adding this in case anyone else needs it:
Use "rm=2". (input type hidden, name=rm, value=2)
https://merchant.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables
Return method. The FORM METHOD used to send data to the URL specified by the return variable after payment completion. Allowable values:
0 – all shopping cart transactions use the GET method
1 – the payer’s browser is redirected to the return URL by the GET method, and no transaction variables are sent
2 – the payer’s browser is redirected to the return URL by the POST method, and all transaction variables are also posted

Resources