uCommerce comes with built-in support for Google Checkout payments. This guide will walk you through getting uCommerce to work with Google checkout for payment processing.
With the Google Checkout you can do authorization of payments, acquire payments, refund and cancellation of payments both via uCommerce and the back end office of your Google checkout subscription.
Add a new payment method, under “uCommerce à Settings à Orders à Payment Methods”, by right clicking the “Payment Methods” leaf and use “Create”. You can use any name you like; I have used “Google Checkout”.
Now we’re ready to configure your new payment method. Click the newly created node and select “Google Checkout” in the Service drop down list and select “Checkout” in the pipeline drop down list. Remember to fill out the rest of the required information in the rest of the Tabs.
When you’re done, click the save icon. That’s everything in the uCommerce interface.
First you need to log in to your back end office at: https://sandbox.google.com/checkout/sell/settings?upgrade%3Dtrue&hl=da&nui=1<mpl=seller
Now click integration in the left panel. You should get to a page looking like this:
In the API callback URL: you need to put “http://yoursite.com/10/PaymentProcessor.axd”.
You’ll need to replace “10” in the URL with another number that we’re going to find now.
Open “Microsoft SQL Server Manangement Studio” and log in to the database for your site.
Open a new query document by clicking the “New Query” button.
Write this line:
SELECT PaymentMethodId FROM uCommerce_Paymentmethod where name = 'Google Checkout'
and then click the execute button.
You’ll now need to replace the number the management studio gives you with the number “10” in the URL.
Now set the radio button at the callback contents to: Notification as XML.
The API Version must be set to “Version 2.5”
The notification filtering must be checked
Google Checkout comes with the ability to do automatic acquire and cancel payments. In order to make this work you need to enable a pipeline task.
To enable auto acquire edit the “ToCompletedOrder” pipeline.
To enable auto void/refund edit the “ToCancelled” pipeline.
The pipeline configuration is found in /umbraco/ucommerce/pipelines.
Simply remove “<!-- “ and “-->” at the highlighted line. These are HTML comment sections.
Now we need to edit the ”GoogleCheckout.config” file in order to match your environment.
You’ll find the configuration file at “rootdir\umbraco\UCommerce\Configuration\ GoogleCheckout.config” where rootdir is the location on your computer, where Umbraco is installed.
Parameter list for the configuration file:
This is the identification of your google checkout account. When logged in at: https://sandbox.google.com/checkout/sell/settings?upgrade%3Dtrue&hl=da&nui=1<mpl=seller
Find it at the top right corner of the page.
This is a passphrase needed in the communication between your shop and google checkout.
Find it on the integration page in the back end office at “Google Checkout”, at the right side of the page.
This URL redirects your customer back to a specific page at your site after a successful authorization.
This URL redirects your customer to the basket on your site.
Tells our system weather the application is in test mode or not. This must be set to false.
Tells our system weather the application is in debug mode or not. This must be set to false.
Ensure that uCommerce uses the same currency as your Google Checkout seller account
During our test of Google Checkout we found that transactions made with currencies other than the main currency of the seller account will always result in rejected authorizations. If you create the seller account with GBP please make sure that any test transactions are made with the same currency.
Failed transaction will appear with the message ”Cancelled by Google: Payment declined” in the seller account and the messages ”Cancelled” and ”Your order has been cancelled.” in the buyer account.
Please note that this applies to the sandbox only.
Ensure that “testMode” is set to “true” when using the Google Checkout sandbox for testing
If your GoogleCheckout.config is set to testMode=”false” Google Checkout will return HTTP code 400 bad request when accessing sandbox. Make sure that you’re operating in test mode when calling the sandbox.
The opinions expressed herein are my own personal opinions and do not represent
my employer's view in any way.