Buy Now Button return not working
DoctorB
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Jul-24-2017
09:46 AM
I'm an issue with my Buy Now button return address. It seems that Paypal isn't seeing it and it is redirecting to the Auto Return url entered into the account instead.
This is currently just set up with sandbox accounts for testing purposes.
Here's my form:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="POST" target="_blank">
<input type="hidden" name="hosted_button_id" value="DXSG8TKUPB4RQ">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="notify_url" value="mysite.com/IPN">
<input type="hidden" name="custom" value="THIS IS A TEST">
<input type="hidden" name="return" value="mysite.com/thanks.html">
<input type="hidden" name="rm" value="2">
</form>
Just a note, and I'm not sure if it makes a difference but, I am dynamically building and sending this form with javascript. Here's the code for that:
var _getHiddenInput = function(name, value){
var input = document.createElement("input");
input.setAttribute("type", "hidden");
input.setAttribute("name", name);
input.setAttribute("value", value);
return input;
};
var form = document.createElement("form"); form.setAttribute("action", PAYPAL_LINK); form.setAttribute("method", "POST"); form.setAttribute("target", "_blank"); form.appendChild(_getHiddenInput("hosted_button_id", SANDBOX ? "DXSG8TKUPB4RQ" : hostedButtonId)); form.appendChild(_getHiddenInput("cmd", "_s-xclick")); form.appendChild(_getHiddenInput("notify_url", notifyUrl)); form.appendChild(_getHiddenInput("custom", custom)); //This is a pass-through attribute from Paypal. form.appendChild(_getHiddenInput("return", nextPage)); form.appendChild(_getHiddenInput("rm", "2")); document.body.appendChild(form); form.submit();
I appreciate your responses and help.
2 REPLIES 2
JCarpenter
New Community Member
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug-17-2017
12:31 PM
Any resolution to this issue? I'm having the same problem. It seems to me that it used to work.
ZoneF
Member
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb-28-2018
09:20 PM
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- Dispute denied with provided tracking number. in About Protections
- Absent-minded buyer in Selling on eBay
- I must send an item which i didn't received back to the seller to receive a refund?? in About Protections
- How do I verify a purchase made through a Payapal button? in About Payments
- funds transferred via paypal as gift, hung up in recipient's account in About Payments