paypal IPN notifyURL calls wrong url - asp.net

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.

Related

Using IPN to verify successful payment on PayPal

I'm using PayPal hosted pages for payments on my site. I pass return url when creating SECURETOKEN used in iframe url. After client successful payment, I get browser postback from PayPal on return url passed when SECURETOKEN was created. What happens from time to time is that user close tab before I get postback, saying transaction is approved, and I can't mark it as approved in my local DB.
Workaround was to create IPN listener, and update my local records when I receive valid IPN request.
Now the issue is, I miss some params that I'm getting in iframe postback, that are mandatory, such as ACC, EXPTIME, PNREF.
As far as I can read, IPN will NEVER send those data in it's request. Can this be overridden within paypal manager? If not, can anyone suggest any solution to this problem?
Thanks
I managed to do this by enabling Silent POST url feature in my paypal manager, so same server to server postback will be fired regardless of client closing browser, after payment is accepted.

using PayPal IPN with WhooCommerce

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

PayPal IPN Sandbox response always INVALID

I'm trying to implement PayPals IPN on my website in asp.net using C#. I am using the sample code given by PayPal found here: https://cms.paypal.com/cms_content/GB/en_GB/files/developer/IPN_ASP_NET_C.txt
I have enabled IPN on my account with the URL of the ipn on my site.
The URL used in the code as you can see in the link above is the sandox url for paypal testing.
I am using the IPN Simulator and It's giving me "IPN sent successfully response" but on my website it displays invalid every time.
I have also tried displaying the strRequest string in a Label and all it shows me is "&cmd=_notify-validate" without quotes. I thought it was meant to add that part on to the rest of the returned data from PayPal.
Here is my button:
This is the button I'm using
<script src="paypal-button.min.js?merchant=myemail"
data-button="buynow"
data-name="name"
data-quantity="1"
data-amount="00.50"
data-currency="GBP"
data-shipping="0"
data-tax="0"
data-env="sandbox"
data-return="http://site.net/thankyou.aspx"
></script>
What is going wrong?
UPDATE:
So.. to recap.
I have 2 sandbox accounts. One business and the other personal. I enabled ipn on the business account. On my website I have the button shown above. The ipn page has the exact same code as the sample code given for the IPN in asp.net from paypal. I got the to website, click the buy now button and make the purchase using the personal account to the sandbox business account. The payment shows as complete and shows as sent with code 200 in the ipn history for the business account but when i check the label i entered on the ipn page it shows the word invalid.
Thanks!

PayPal asynchronous notification

Now information about the successful transaction I get with a redirect the user back to my site from paypal. And then I make additional requests to api paypal.
But if the user cancels the redirect to my site, for some reason, I do not get the information about the transaction.
Is there an asynchronous notification from Paypal for Website Payments Standard or Express Checkout?
Instant Payment Notification (IPN) works for all payment methods through PayPal. The Developer.PayPal.com document you linked is a list of variables for the Express Checkout feature and it is telling you that you can only pass the NOTIFYURL variable successfully in the DoExpressCheckoutPayment API call.
In Payments Standard transactions you'll use the notify_url variable.
You can also just enable IPN within your account to have an IPN post sent to your notification page when any payment completes - regardless of whether or not you define a URL in the button code or API request (the URL you define in the code will always override what is set in your account).

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