0
我在我的網站上有Google Checkout「立即購買」按鈕。這很簡單,我要做的就是產生HTML表單這樣的訂單信息:是否可以使用HTML表單製作PayPal「立即購買」按鈕?
<form action="https://checkout.google.com/cws/v2/Merchant/xxxxxxxxxx/checkoutForm" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm">
<input name="item_name_1" type="hidden" value="Some Stuff">
<input name="item_description_1" type="hidden" value="Product">
<input name="item_quantity_1" type="hidden" value="1">
<input name="item_price_1" type="hidden" value="0.25">
<input name="item_currency_1" type="hidden" value="GBP">
<input name="item_name_2" type="hidden" value="Delivery">
<input name="item_description_2" type="hidden" value="standard">
<input name="item_quantity_2" type="hidden" value="1">
<input name="item_price_2" type="hidden" value="2.5">
<input name="item_currency_2" type="hidden" value="GBP">
<input name="_charset_" type="hidden" value="utf-8">
<input alt="" src="https://checkout.google.com/buttons/buy.gif?merchant_id=xxxxxxxxxx&w=117&h=48&style=white&variant=text&loc=en_US" type="image">
</form>
按比特PHP的生成這種形式,它相當瑣碎放在一起。有沒有以同樣的方式創建PayPal按鈕的方法?有些客戶請求了它,但我沒有時間研究複雜的API,並且靜態保存的按鈕不好(客戶填寫了一個短訂單,然後生成按鈕)。