John Doe
John Doe

Reputation: 277

What is the Adaptive Payments URL for HTTP redirect?

I have working code that returns a paykey for paypal's adaptive payments API, however I can't seem to find what url to redirect to in the REST documentation.

This is the one I found in a tutorial:

$url = 'https://www.paypal.com/webapps/adaptivepayment/flow/pay?paykey=' . $verb['payKey'];
header('Location: ' . $url);

Which gives the error message: "This transaction has already been approved. Please visit your PayPal Account Overview to see the details."

I got the Paykey to work in an iframe, but that was being buggy so I decided to use a redirect for now, but I can't seem to find the url.

Upvotes: 2

Views: 438

Answers (1)

James G.
James G.

Reputation: 2904

For the sandbox API it is: https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_ap-payment&paykey=AP-...

For the Live API it is: https://www.paypal.com/cgi-bin/webscr?cmd=_ap-payment&paykey=AP-...

with the end of the paykey where the ...s are.

Upvotes: 1

Related Questions