10

I'm testing a simple paypal paying script whisch works fine except that it's not calling my notify_url and I don't understand why. The url is reachable and even the sandbox IPN testing gives a positive result. Even stranger, on the same domain I have an other script that is working briliantly. Code is not identical, but it's using the same method.

This is the html of the form used to send paymento to Paypal:

form id="ppcheckout" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" name="pp">
  <input type="hidden" value="_xclick" name="cmd">
  <input id="business" type="hidden" value="xxx@gmail.com" name="business">
  <input id="currency_code" type="hidden" value="EUR" name="currency_code">
  <input type="hidden" value="http://www.mydomain.com/dir/ipn.php" name="notify_url">
  <input id="return" type="hidden" value="http://www.mydomain.com/dir/" name="return">
  <input id="cancel_return" type="hidden" value="http://www.mydomain.com/dir/" name="cancel_return">
  <input type="hidden" value="1" name="amount">
  <input type="hidden" value="Order from mysite" name="item_name">
  <input type="hidden" value="1" name="invoice">
</form>

Can't realy figure out what's wrong or missing. Does someone have an idea?

Thanks Bye

rpravisani
  • 141
  • 1
  • 1
  • 11

6 Answers6

6

I hope you are not testing paypal on LOCALHOST. That wont work, you need to test it online, in a web server, you can code using localhost but have to upload it to the SERVER so as to test it completely.

Here is a link that might help in configuring paypal - How to Set Up PayPal Integration with PHP & MySQL

Knights
  • 1,467
  • 1
  • 16
  • 24
6

You need to edit the Instant Payment Notification (IPN) settings in your PayPal Sandbox business account.

  1. Log into Sandbox business account.
  2. Go to the Profile page and click on Instant Payment Notification preferences link.
  3. Set Notification URL and enable the IPN message.

Full tutorial can be found from here - PayPal IPN / Notify URL is not working on Sandbox Account

JoyGuru
  • 1,803
  • 20
  • 11
  • 2
    This type of transaction is not tied to a PayPal account. It simply joins a buyer and seller and a PayPal transaction and then it’s supposed to contact the notify URL afterwards so there are no settings he would need to change and his PayPal business account. Correct me if I’m wrong – pogeybait Feb 19 '18 at 19:31
  • This really saved me. – Petar Vasilev Jul 11 '19 at 16:24
3

Have you verified your sandbox account's email?

This link sounds similar to your problem, and that fixed it for him.

WildJoe
  • 5,740
  • 3
  • 26
  • 30
1

Checked for Queued IPN messages.

Hover over your profile Icon -> 
Account Settings -> 
(on Left) Notifications -> 
Instant Payment Notifications (Click Update) -> 
Search for IPN History

Now check whether the messages are queued or failed etc. It well might be paypal sandbox encounter's spikes and can't deliver the messages.

This is a direct link to IPN History

Cristian E.
  • 3,116
  • 7
  • 31
  • 61
0

I had a hard time getting the sandbox to work as well. I would try to test it on paypal and confirm that sandbox is not doing something goofy

Nick
  • 1
  • I tried the IPN Simulator on the sandbox site and it's having no problem. Same for script used by ecommerce hosted on same domain and using the same logic... – rpravisani Aug 28 '12 at 06:11
0

I had the same issue my login check was creating problem when paypal hit back to notify_url. I passed user session id in notify_url as query string and every thing works fine for me. Paypal on localhost won't work.

Using below link you can download paypal IPN class

http://www.micahcarrick.com/php-paypal-ipn-integration-class.html

Sanjeev Chauhan
  • 3,977
  • 3
  • 24
  • 30