2011-09-29 32 views
0

基本上我想要一個功能下載代碼mywebsite。谷歌結帳數碼產品

我查了下面的鏈接,瞭解谷歌結賬數碼產品。 https://checkout.google.com/support/sell/bin/answer.py?answer=39011

我創建了數字產品按鈕從沙盒數字產品使用此鏈接.HTML代碼重定向到像往常一樣谷歌結帳。

但它沒有給我任何支付後的任何下載鏈接。 ??

<form action="https://sandbox.google.com/checkout/api/checkout/v2/checkoutForm/Merchant/859574590497884" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm" target="_top"> 
<input name="item_name_1" type="hidden" value="mycode"/> 
<input name="item_description_1" type="hidden" value="this item is all about my code"/> 
<input name="item_quantity_1" type="hidden" value="1"/> 
<input name="item_price_1" type="hidden" value="1251.0"/> 
<input name="item_currency_1" type="hidden" value="USD"/> 
<input name="shopping-cart.items.item-1.digital-content.description" type="hidden" value="Please read this instructions.."/> 
<input name="shopping-cart.items.item-1.digital-content.url" type="hidden" value="http://www.xxxxxxxx.in/xxxxxxxx/xxxxxx/20110929034224791156.pdf"/> 
<input name="_charset_" type="hidden" value="utf-8"/> 
<input alt="" src="https://sandbox.google.com/checkout/buttons/buy.gif?merchant_id=859574590497884&amp;w=117&amp;h=48&amp;style=white&amp;variant=text&amp;loc=en_US" type="image"/> 

回答

1

您需要使用continue_url

<input type="hidden" name="continue_url" value="http://www.example.com/download"/> 
+0

感謝約翰回答...用戶將能夠下載該產品,每次他想要的。對 ?有沒有什麼辦法可以通過它只能訪問一次... – vikas

+0

這將需要你在你的最後實施某種控制。通常這是通過在下載URL中附加一個唯一的令牌來完成的,當它被用戶拉取時,它被標記爲下載。然後,下次有人嘗試使用該URL時,可以檢查數據庫以查看它是否有效,如果不是,則可以拒絕該數據庫。 –

+0

請參閱[此問題](http://webmasters.stackexchange.com/questions/11237/how-do-i-prevent-users-from-accessing-a-page-more-then-once/11238#11238)for更多關於這個 –