I am trying to get paypal working for my site. I am using Jade so the code below will not look exactly like html but renders the same.
form(id="SubmitForm", action="https://api-3t.sandbox.paypal.com/nvp")
input(type="hidden", name="USER",value="USER")
input(type="hidden", name="PWD", value="PWD")
input(type="hidden", name="SIGNATURE", value="SIGNATURE")
input(type="hidden", name="VERSION", value="89.0")
input(type="hidden", name="PAYMENTREQUEST_0_PAYMENTACTION",
value="Sale")
input(name="PAYMENTREQUEST_0_AMT", value="19.95")
input(type="hidden", name="RETURNURL",
value="https://localhost:3001/confirm")
input(type="hidden", name="CANCELURL",
value="https://localhost:3001/end")
input(type="submit", name="METHOD", value="SetExpressCheckout")
It does to paypal and returns a text string with the token instead of doing a redirect back to the confirm page I am expecting.
I see something like....
TOKEN=EC%2d33S38595GH5727152&TIMESTAMP=2012%2d07%2d11T20%3a00%3a02Z&CORRELATIONID=687adf3870d19&ACK=Success&VERSION=89%2e0&BUILD=3242673
With a url of...
If I cut and paste the token it works fine, however, I am of course trying to avoid this.
Are you sure you're using the correct URL? The fact that it starts with "api" suggests that it's intended to be called via a server-side process or AJAX and returns data (as it's doing) rather than issuing a redirect.
As the previous person mentioned, this is because what you've got is meant for an API call via a server-side process.
If all you want to do is redirect to PayPal and take a payment immediately, simply use the following URL, and replace it with your own values;
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=YOUR-EMAIL-HERE&amount=YOUR-AMOUNT-HERE&item_name=NAME-OF-YOUR-ITEM-HERE&return=YOUR-RETURN-URL&cancel_return=YOUR-CANCEL-URL