PHP ASP PAYPAL 按重量计算运费的方法
要使用此接口,首先应该登录到paypal > 用户信息 > 运费计算 > 设定用重量计算运费。只适用于美国的帐号。
<form target=”_self” action=”https://www.paypal.com/cgi-bin/webscr” method=”post”>
<!– –>
<input type=”hidden” name=”on0″ value=”Size”>Select Candle Size:
<SELECT name=”os0″>
<OPTION value=”Small” selected>Small Candle – $4.00 – Weight .25 lb</OPTION>
<OPTION value=”Medium”>Medium Candle – $5.00 – Weight .75 lb</OPTION>
<OPTION value=”Large”>Large Candle – $6.00 – Weight .85 lb</OPTION>
</SELECT>
<br><br>
<input type=”hidden” name=”on1″ value=”Scent”>Select Scent:
<SELECT name=”os1″>
<OPTION value=”Vanilla” selected>Vanilla</OPTION>
<OPTION value=”Lavender”>Lavender</OPTION>
<OPTION value=”Apple Pie”>Apple Pie</OPTION>
</SELECT>
<br><br>
<INPUT onclick=CalculateOrder(this.form) type=”image” alt=”Make payments with PayPal – it’s fast, free and secure!”
src=”https://www.paypal.com//en_US/i/btn/x-click-but22.gif” border=0 name=”submit”>
<input type=”hidden” name=”add” value=”1″>
<input type=”hidden” name=”cmd” value=”_cart”>
<input type=”hidden” name=”business” value=”youremail@youremail.com”>
<input type=”hidden” name=”item_name” value=”Widget Candle”>
<input type=”hidden” name=”amount”>
<input type=”hidden” name=”item_number”>
<input type=”hidden” name=”no_shipping” value=”2″>
<input type=”hidden” name=”weight”>
<input type=”hidden” name=”weight_unit” value=”lbs”>
<input type=”hidden” name=”shopping_url” value=”http://www.yourwebsite.com/your_page.html”>
<input type=”hidden” name=”return” value=”http://www.yourwebsite.com/successorder.html”>
<input type=”hidden” name=”currency_code” value=”USD”>
<input type=”hidden” name=”lc” value=”US”>
<input type=”hidden” name=”bn” value=”PP-ShopCartBF:x-click-but22.gif:NonHosted”>
</FORM>