0
我試圖爲我的網站創建Google付款付款。在這個環節Google Checkout「XML代碼併發送客戶端到服務器」Ruby on Rails
https://developers.google.com/checkout/developer/interactive_demo
我創造了我的代碼怎麼會一個演示,這裏是我的選擇
然後在網頁生成的代碼:
<!-- Sell digital goods with description-based delivery of download instructions (with tax, no shipping) -->
<?xml version="1.0" encoding="UTF-8"?>
<checkout-shopping-cart xmlns="http://checkout.google.com/schema/2">
<shopping-cart>
<items>
<item>
<item-name>Super Software 5000</item-name>
<item-description>Super Software 5000 improves download speeds.</item-description>
<unit-price currency="USD">1.00</unit-price>
<quantity>1</quantity>
<digital-content>
<display-disposition>OPTIMISTIC</display-disposition>
<description>
It may take up to 24 hours to process your new storage. You will
be able to see your increased storage on your
<a href="http://login.example.com">account page</a>.
</description>
</digital-content>
</item>
</items>
</shopping-cart>
<checkout-flow-support>
<merchant-checkout-flow-support/>
</checkout-flow-support>
</checkout-shopping-cart>
<!-- No tax code -->
<!-- No shipping code -->
You need to encode and sign the above XML code before posting it.
任何人都可以解釋對我來說,我必須做的這個XML代碼我必須把它放在我的rails項目上?
我知道這個代碼,進入我的觀點,但我必須把XML?感謝您的幫助
<form method="POST"
action="https://sandbox.google.com/checkout/api/checkout/v2/checkout/Merchant/REPLACE_WITH_YOUR_SANDBOX_MERCHANT_ID">
<input type="hidden" name="cart" value="REPLACE_WITH_ENCODED_CART">
<input type="hidden" name="signature" value="REPLACE_WITH_SIGNATURE">
<!-- Button code -->
<input type="image" name="Google Checkout"
alt="Fast checkout through Google"
src="http://sandbox.google.com/checkout/buttons/checkout.gif?merchant_id=REPLACE_WITH_YOUR_SANDBOX_MERCHANT_ID&w=180&h=46&style=white&variant=text&loc=en_US"
height="46"
width="180">
</form>