Search code examples
paypalpaypal-sandboxpaypal-ipn

Paypal IPNs not sending/being received on sandbox


I'm trying to use Paypal IPNs on the sandbox. I have a form that submits an express checkout:

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
  <input type="hidden" name="cmd" value="_xclick" />
  <input type="hidden" name="business" value="[email protected]" />
  <input type="hidden" name="item_name" value="Item 3" />
  <input type="hidden" name="item_number" value="3" />
  <input type="hidden" name="amount" value="5.00" />
  <input type="hidden" name="shipping" value="0.00" />
  <input type="hidden" name="no_shipping" value="1" />
  <input type="hidden" name="cn" value="Comments" />
  <input type="hidden" name="currency_code" value="GBP" />
  <input type="hidden" name="lc" value="GB" />
  <input type="hidden" name="bn" value="PP-BuyNowBF" />
  <input type="hidden" name="test_ipn" value="1" />
  <input type="hidden" name="return" value="http://myhost/my-return-url" />
  <input type="hidden" name="rm" value="2" />
  <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynow_SM.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" />
  <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
</form>

The payment goes through fine with my sandbox buyer account, however the IPN notifications are failing. When I click on the IPN messages in the sandbox I see that the correct notification endpoint is configured, however the message has failed, the http response code is blank, and IPN typeTransaction = "made". My logs show that my IPN endpoint hasn't received any messages (I know the endpoint is up because i've tried sending a manual POST). The message paypal is trying to send is:

handling_amount=0.00&payer_id=442H4KP3WRC9E&ipn_track_id=989ff3ead6a80&shipping=0.00
&charset=windows-1252&payment_gross=
&verify_sign=ABKgD9bUbQF9WahZwd8aOs6tdcUGAteKcEga-DtOd5oNAkSSSLAh33xt
&item_name=Item 3&test_ipn=1&txn_type=web_accept
&receiver_id=4W89DC8YDWBUG&payment_fee=&mc_currency=GBP&transaction_subject=
&custom=&protection_eligibility=Ineligible&payer_status=verified
&first_name=atest&mc_gross=5.00&payment_date=14:46:44 Aug 05, 2013 PDT
&payment_status=Completed&quantity=1&[email protected]
&item_number=3&last_name=buyer&txn_id=91L22343JY671341E&mc_fee=0.40
&resend=true&payment_type=instant&notify_version=3.7&[email protected]
&[email protected]&tax=0.00&residence_country=US

I've tried resending the IPN multiple times, and have also tried the IPN simulator too but this just spins until the connection resets. Is this a problem with Paypal's sandbox IPN system, or have I forgotten something/am sending the wrong data on my form submit?

If it's a problem with the sandbox IPN messaging system, what other options do I have for testing aside from on live?


Solution

  • As above, the solution was to use standard ports (80/443) rather than non-standard 8080/8443