Buy Now Button not passing shipping variable

BartKeith
Contributor
Contributor

 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>
Login to Me Too
1 REPLY 1

angelleye
Advisor
Advisor
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!
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.