I have a Google Wallet/Checkout BuyNow button with code similar to the following (generated from the site tools):
<form action="..." id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm" target="_top">
...
<select name="item_selection_1">
<option value="1">$10 Gift Certificate</option>
... other options ...
</select>
<input name="item_option_name_1" type="hidden" value="$10 Gift Certificate"/>
<input name="item_option_price_1" type="hidden" value="10.0"/>
<input name="item_option_description_1" type="hidden" value="A $10 Gift Certificate"/>
<input name="item_option_quantity_1" type="hidden" value="1"/>
<input name="item_option_currency_1" type="hidden" value="USD"/>
<input name="shopping-cart.item-options.items.item-1.digital-content.url" type="hidden" value="https://example.com/gift-certificate?id=1234&amount=25"/>
...
<input alt="" src="https://checkout.google.com/buttons/buy.gif?merchant_id=...&w=117&h=48&style=trans&variant=text&loc=en_US" type="image"/>
...
</form>
Now, when the buyer clicks the button, they can purchase the item and are directed to the digital content URL, but I don't know how I can make the connection to the particular item they purchased. I could put a dynamic id as a URL parameter for the digital content URL, but I still can't see how to connect that to the Google Checkout order number.
For example, I'm using the Notification & Notification History APIs and see a sequence of notifications after purchase, including the notification with information about the buyer and a shopping cart:
<shopping-cart>
<items>
<item>
<digital-content>
<url>https://example.com/gift-certificate?id=1224&amount=25</url>
</digital-content>
<item-name> $25 Gift Certificate</item-name>
<item-description>A $25 Gift Certificate</item-description>
<quantity>1</quantity>
<unit-price currency="USD">25.0</unit-price>
</item>
</items>
I can see that I could parse out the id parameter from the digital-content url, but that seems messy.
Is there a nice way to just include an extra hidden form field and have that value passed through to the notification? (even with a single item BuyNow button?)
Thanks.