notify_url not working in new paypal - paypal-sandbox

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">

Related

How to find connection breakdown or misconfiguration

I have a client with a Wordpress website. The contact form stopped sending, so I found a plugin called Mail Integration for Office 365/Outlook that could use his MS365 email to send all email from the website using that account.
I installed the plugin and followed the instructions to create an Azure AD App Registration and configure the plugin with the appropriate data from the App Registration. I tried submitting the contact form and there were no errors on the page (it gave me a success message), but the email never arrived in my inbox (yes, I checked spam). I installed a different form plugin, WP Forms, and put it on a test page. The call to admin-ajax appears to be going through successfully, receiving json with success and a confirmation message (which it outputs to the page).
So I searched the plugin's support forum where the creator mentioned using the plugin Check & Log Email to test that the emails are sending. I installed/activated the plugin and sent a test email. It shows it as sent successfully. It never arrived in my inbox (yes, I checked spam).
I have checked the error logs and didn't see anything helpful.
To fix the issue, I first need to find it:
Do I need to complete additional configuration that I've just missed?
How do I find out if the plugin can even connect to the App Registration? It doesn't have a Test Connection feature, which it clearly needs. The reviews on the plugin page are all positive and recent, so it's working for other people.
How do I troubleshoot this from the Azure Active Directory side to make sure it's receiving data?
Please help! Thanks.

Testing PayPal Donations with a Sandbox Account

I have a WordPress form that processes data and redirects to this url to complete the PayPal donation
https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=sb-5mepe4127835%40business.example.com&currency_code=USD&amount= <amount>&return=http://example.local/about
However, when I submit the form I receive this error from PayPal
We can't complete your donation. This organization's account is inactive.
What am I missing? The reason I have it setup this way is because I want WordPress to save the form data and send a thank you/confirmation email after the payment is complete.
https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=sb-5mepe4127835%40business.example.com&currency_code=USD&amount=&return=http://example.local/about
When testing with any sandbox account, change the domain to point to the www.sandbox.paypal.com sandbox environment , i.e.
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_donations&business=sb-5mepe4127835%40business.example.com&currency_code=USD&amount=&return=http://example.local/about

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 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

Preventing Spoofing with Paypal

I have a scenario where i need to have a user checkout through PayPal and then once we receive the payment then we create a membership record in our membership site. The PayPal requires a "return" field when you submit the form button that will take the user back to our page once the order has been successfully processed. On that page is where we actually track the sale and fire a chunk of javascript to track the sale.
So my question is this, how can i make sure that the return page comes from PayPal and is not spoofed by a user in the system. I know there is a way to use the notify_url to have PayPal post back to our system, but in this case i have to run a chunk of javascript. Is there an easy way to do this, or would i have to write some looping/timeout function that checks to see if the notify post has come through?
Im using .net to do the posting to paypal
You need to have PayPal call a script on your site in order to prevent spoofing. Anything that goes through the client/browser is open to the user for modification, so only things that come directly to your server from PayPal are secure.

Resources