This Cartridge enables merchants to use Google Checkout with epages shops. It creates a new feature "GoogleCheckout" and a payment type with the same name.
. /etc/default/epages cd $EPAGES_CARTRIDGES/DE_EPAGES/GoogleCheckout $PERL Makefile.PL make install STORE=Store make register
The image above shows the flow of the checkout process. When the customer presses the Google Checkout button, epages builds an xml structure containing the shopping cart data and makes an http post request containing the xml structure as content.
The payment system then checks the XML and, if the check is successful, returns an xml structure containing the redirect url. In case of failure, the http response
code is set to 404 and the error text is returned in the result xml. In success case, epages redirects the customer's browser to the redirect url which contains an
identification of the shopping cart. To identify notifications later on, the GUID of the payment lineitem will be sent in the merchant-private-data tag. The customer now
finishes the transaction by entering address and credit card information.
For a complete Google Checkout API documentation, refer to the Google Checkout Developer's Guide.
For details to Google Adwords, see here.
Due to technical restrictions on the Google Checkout side, some workarounds had to be implemented:
See an example of a basket xml structure below:
<?xml version='1.0' encoding='UTF-8'?> <checkout-shopping-cart xmlns='http://checkout.google.com/schema/2'> <shopping-cart> <merchant-private-data>45A20C77-6ED1-F96E-2497-AC141803BF98</merchant-private-data> <items> <item> <item-name>Buch über Forellenangeln</item-name> <item-description /> <unit-price currency='GBP'>11</unit-price> <quantity>1</quantity> <merchant-item-id>433767</merchant-item-id> </item> <item> <item-name>Musky Killer</item-name> <item-description>20 piece 3/4 oz. Mepps Musky Killer with a gold/brown trout blade, a black/white tail, and a treble hook.</item-description> <unit-price currency='GBP'>97.95</unit-price> <quantity>1</quantity> <merchant-item-id>MuskyKiller</merchant-item-id> <tax-table-selector>normal</tax-table-selector> </item> <item> <item-name>10 Pfund</item-name> <item-description /> <unit-price currency='GBP'>-1.39</unit-price> <quantity>1</quantity> </item> <item> <item-name>10 Pfund</item-name> <item-description /> <unit-price currency='GBP'>-8.61</unit-price> <quantity>1</quantity> <tax-table-selector>normal</tax-table-selector> </item> <item> <item-name>Global Value Discount</item-name> <item-description /> <unit-price currency='GBP'>-0.3</unit-price> <quantity>1</quantity> </item> <item> <item-name>Global Value Discount</item-name> <item-description /> <unit-price currency='GBP'>-2.67</unit-price> <quantity>1</quantity> <tax-table-selector>normal</tax-table-selector> </item> <item> <item-name>Payment Discount</item-name> <item-description /> <unit-price currency='GBP'>-0.27</unit-price> <quantity>1</quantity> </item> <item> <item-name>Payment Discount</item-name> <item-description /> <unit-price currency='GBP'>-1.72</unit-price> <quantity>1</quantity> <tax-table-selector>normal</tax-table-selector> </item> </items> </shopping-cart> <checkout-flow-support> <merchant-checkout-flow-support> <edit-cart-url>https://isptest2.epages.de/epages/DemoShop2.sf/;Currency=GBP;SessionID=7bc9a8c60036811d64aee62efc7a4809?ObjectID=8919</continue-shopping-url> <continue-shopping-url>https://isptest2.epages.de/epages/DemoShop2.sf</continue-shopping-url> <request-buyer-phone-number>false</request-buyer-phone-number> <shipping-methods> <flat-rate-shipping name='Brieftaube'> <price currency='GBP'>3.75</price> </flat-rate-shipping> </shipping-methods> <tax-tables> <default-tax-table> <tax-rules> <default-tax-rule> <shipping-taxed>true</shipping-taxed> <rate>0.07</rate> <tax-area> <world-area /> </tax-area> </default-tax-rule> </tax-rules> </default-tax-table> <alternate-tax-tables> <alternate-tax-table name='normal'> <alternate-tax-rules> <alternate-tax-rule> <rate>0.19</rate> <tax-area> <world-area /> </tax-area> </alternate-tax-rule> </alternate-tax-rules> </alternate-tax-table> </alternate-tax-tables> </tax-tables> </merchant-checkout-flow-support> </checkout-flow-support> </checkout-shopping-cart>
Epages will be notified by asynchronus notifications about new orders, order state changes, the results of the risk check as well as payment and shipping activities. Notifications will be sent as http post requests with xml structures as content. They will be posted to the callback url configured for the merchant account. At the moment we only handle new-order-notification, order-state-changed-notification, and risk-information-notification. All other notifications will be ignored. When a new-order-notification arrives, the basket addresses are set and the order is created. For the other notifications, epages will determine the correct order by the google-order-number, update the corresponding fields of the payment lineitem and set the order states.
We send the following fulfillment commands to Google:
add-merchant-data
process-order
deliver-order
add-tracking-data
archive-order
unarchive-order