Buy Now Button not passing shipping variable
BartKeith
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Jul-31-2017
08:49 AM
I have created a Buy Now button and I want to password the Quantity and Shipping cost from the button code. The quantity variable works OK but the shipping variable does not. The shipping cost is not being passed to PayPal. In the Merchant Profile Shipping calculations I have tried the following but neither work:
1. No shipping calculation
2. Shipping calculation with amount of zero and the "Use the shipping fee in the transaction instead of my calculator's settings:" set to YES.
Here is the code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> <input name="cmd" type="hidden" value="_s-xclick" /> <input name="hosted_button_id" type="hidden" value="U3B6JHGJ6ARY6" /> <input id="shipping" type="hidden" name="shipping" value="7.00"> Quantity: <select name="quantity" id="quantity" style="width: 50px; margin-left: 3px;" onchange="setshipping(this.value)"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> </select><br /> <input alt="PayPal - The safer, easier way to pay online!" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" type="image" /> <img src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" alt="" width="1" height="1" border="0" /> </form>
1 REPLY 1
angelleye
Advisor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug-01-2017
08:55 PM
When using a hosted button you cannot override parameters from the button's HTML. You would have to adjust that from within the hosted button settings in the PayPal account. If you need to set dynamic shipping then you'll have to use a non-hosted button.
Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
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
- Error: "Unable to change shipping method. Please try again." in PayPal popup in REST APIs
- OnShippingAddressChange() function does not provide shipping addresses lines in REST APIs
- Checkout Button Multi-Item Shipping Discount in PayPal Payments Standard
- Customers miss the shipping address during checkout with add to cart button. in PayPal Payments Standard
- Error "unsupported variable shipping2" in create button, advanced variables section in PayPal Payments Standard