Google Checkout

From PhpCOIN Documentation

Jump to: navigation, search

Using Google Checkout as a payment method is a simple process:

  1. Goto https://checkout.google.com/seller/ and set yourself up with an account
  2. Log into phpCOIN on your website as an admin
  3. Add the vendor
  4. Add PayLinks


Admin -> Vendors

If Google Checkout exists in the list of available vendors, you can simply edit the existing record. If it does not exist, then click [Add New] to add Google Checkout as a payment method that you will accept. The info should look like the following:

Vendor ID:  	(will be auto-completed by phpCOIN)
Status:  	On (Off to disable this payment method)
Vendor Name:  	Google Checkout (for the drop-down lists)
Buy Return Param Name:  	google (notice it is lowercase)
Buy Return Param Value:  	1
URL / Website:  https://checkout.google.com/seller
Use IPN:  	No
Notes:  	(whatever you want, this is for your eyes only)


Admin -> PayLinks

Select the PayLink you want to edit, or click [Create New] to create a new one. Paste the following code into the "order link" field, changing the parameters shown in bold:

Vendor Product Id:  	(Auto-created by phpCOIN)
Vendor ID:  	(From the drop-down, choose "Google Checkout")
Product ID:  	(From the drop-down, choose the product that this
               PayLink applies to)
Description:  	Google Checkout Product x (for listing)
Order Link:  	(This is for the "pay link" html provided by
               Google Checkout, such as:
<form method="POST"
 action="https://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/MERCHANT_ID"
 accept-charset="utf-8">
<input type="hidden" name="item_name_1" value="<prod_name>"/>
<input type="hidden" name="item_description_1" value="<prod_desc>"/>
<input type="hidden" name="item_quantity_1" value="1"/>
<input type="hidden" name="item_price_1" value="<total_amt>"/>
<input type="hidden" name="item_currency_1" value="USD"/>
<input type="hidden" name="ship_method_name_1" value="Web"/>
<input type="hidden" name="ship_method_price_1" value="0"/>
<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.edit-cart-url"
  value="<return_link_cancel>"/>
<input type="hidden"
  name="checkout-flow-support.merchant-checkout-flow-support.continue-shopping-url"
  value="<return_link_buy>"/>
<input type="hidden" name="_charset" value="utf-8"/>
<input type="image" name="Google Checkout" alt="Fast checkout through Google"
 src="http://checkout.google.com/buttons/checkout.gif?merchant_id=MERCHANT_ID
 &w=180&h=46&style=white&variant=text&loc=en_US" height="46" width="180"/>
</form>

In the above PayLink, the <> tells phpCOIN that it should replace the variable name with the actual value at run-time. For example, leaving <total_amt> means that phpCOIN will enter the actual order total cost when it displays an order PayLink. It also means that you could move your site to another URL entirely but would not need to adjust your PayLinks.

The sample link will return the customer back to your site upon payment completion so the orders module can finish processing (by calling the WHM add-on to create the server account, for example) if the customer clicks the [return] link on Google Checkout. If you want guaranteed payment automation you need to consider implementing the Google Checkout HTTP API or the XML API system



Lather, Rinse, Repeat

Repeat the above steps as many times as necessary, so that you end up with one PayLink for each product or service that will allow PayPal as a payment method.

Personal tools

Inscrita el Registro Mercantil de Mallorca Tomo 2140, Hoja No. PM-51034, Folio 135
This website owned and operated by: Technology Services RPVW S.L. CIF# B57345084
Avda Constitucion 48 Bajos Alaro 07340 Baleares SPAIN
Tel:+34 971518362    Fax: +34 971518368    eMail: support@phpcoin.com