...
Since we will be consuming services from Google over secure socket layer (SSL) we will need to add two certificates from google to our trusted key store, otherwise our call to Google will fail with the following error:
Panel |
---|
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target |
...
- merchantId - obtain from checkout.google.com/sell
- merchantKey - obtain from checkout.google.com/sell
- editCartUrl - OOTB, should be http://yourDomainName/ecommerce/control/viewcart
- continueShoppingUrl - should be http://yourDomainName/ecommerce
- xmlTemplateUri - default should work, if you want to change the screen, this makes it easier
- requestPhone - true/false do you want to make a phone number mandatory in order to place an order
- ##Production URL
- #basePostUrl = https://checkout.google.com/cws/v2/Merchant/
- this has changed since the last patch
- ##Sandbox URL
- basePostUrl = https://sandbox.google.com/checkout/cws/v2/Merchant/
- checkout - currently not implemented
- request - should not be changed
- diagnose = currently not implemented
...
- After updating the properties file, restart OFBiz
- in your ecomerce application, create a request-uri; for example:
Code Block |
---|
<request-map uri="google"> |
...
<security auth="false" https="false"/> |
...
<event type="service" invoke="transmitRequest"/> |
...
<response type="view" name="success" value="google"/> |
...
</request-map> |
- create a view-map that points to the redirect screen in the google component:
Code Block |
---|
<view-map name="google" type="screen" page="component://googlecheckout/widget/GoogleCheckoutScreens.xml#redirect"/>
|
- place an link with the google checkout button that points to your google uri next to where ever you have a checkout link
Code Block |
---|
<a href="<@ofbizUrl>google</@ofbizUrl>"><img src="googleButton.gif"/></a>
|