response is not coming for my return url

znv51powt
Contributor
Contributor

Hi! I work in the sandbox. I send to

https://svcs.sandbox.paypal.com/AdaptivePayments/Pay

I get answer from PayPal:

{"responseEnvelope":{"timestamp":"2016-10-20T21:47:50.360-07:00","ack":"Success","correlationId":"fdb13f9bae29f","build":"26220497"},"payKey":"AP-2AD23957S5267231P","paymentExecStatus":"CREATED"}

 

But PayPal don't send $_POST on my return url.

Why?

Login to Me Too
12 REPLIES 12

angelleye
Advisor
Advisor

After making the call to the Pay API you need to use the PayKey you get back to redirect the user to PayPal so they can login and complete the payment.  

 

For example, I have this basic sample setup that runs the Pay request and dumps out the result:  http://paypal.angelleye.com/paypal-php-library/samples/Pay.php

 

You'll see it includes a RedirectURL, and if you copy/paste that URL in your browser address bar you'll see it sends you over to PayPal where you could complete the payment using a sandbox buyer account (assuming that the sandbox isn't down, which unfortunately is happening a lot lately.)

 

Until that redirect and completed checkout happens the payment doesn't occur.

 

Also, in your example you used CREATE instead of PAY or PAY_PRIMARY, so this will require a call to ExecutePayment API to process the payment even after the person signs in and approves it.

Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
Login to Me Too

znv51powt
Contributor
Contributor

Hi! thank you. I redirect user on page for payment with payKey, he makes the payment and I don't get IPN-message.

Maybe URL for IPN HTTPS and not HTTP ?

Login to Me Too

angelleye
Advisor
Advisor

IPN with Adaptive Payments is a little different.  There is an app specific IPN that you would trigger using the ipnNotificationUrl parameter in the Pay request, or there is a transaction specific IPN that would be triggered by the receiver account's profile settings.

 

You could use one, the other, or both.  What is it exactly you're trying to do?

Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
Login to Me Too

znv51powt
Contributor
Contributor

I use IPN url from the receiver account's profile settings. This url is HTTP, not HTTPS.

Login to Me Too

angelleye
Advisor
Advisor

Troubleshooting IPN is an entirely different subject from this thread, and would be a pretty lengthy conversation in and of itself, but I can quickly provide this article I wrote a while back on how to test PayPal IPN.  If you follow all the steps there you should be able to find your problem.

Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
Login to Me Too

znv51powt
Contributor
Contributor

Ok, thank you, I try it!

Login to Me Too

znv51powt
Contributor
Contributor

https://www.angelleye.com/test-paypal-ipn/  -  Server not found

 

I get empty $_POST on my returm url: https://pay4links.com/pay-pal/success

 

I try https://developer.paypal.com/developer/ipnSimulator: on url https://pay4links.com/pay-pal/success

 

and ! get this answer: IPN was not sent, and the handshake was not verified. Please review your information.

 

Help me!!!

Login to Me Too

angelleye
Advisor
Advisor

Not sure why you'd be getting a server not found error.  That URL is definitely valid and active.  

 

You've got some sort of an error going on in your IPN script keeping it from completing.  Check your PHP error logs and you should details about what exactly is failing.  

 

That guide I linked to goes into more detail.  Give it another shot.

Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
Login to Me Too

MTS_Ciaran
Moderator
Moderator

I just tested the script you are using and got a HTTP 400 which pretty much means the code you are using is not prepared to receive the IPN post:

 

"<h1>Bad Request (#400)</h1>"

 

Can you grab the sample code here and give it a go? 

https://github.com/paypal/ipn-code-samples

 

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.