Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 




...

  • Import the certificate for sandbox.google.com into ofbiztrust.jks% keytool -import -alias sandbox.google.com-1 -file sandbox.cer -keypass changeit -storetype jks -keystore ofbiztrust.jks -storepass changeit
  • Import the certificate for checkout.google.com into ofbiztrust.jks% keytool -import -alias sandbox.google.com-1 -file sandbox.cer -keypass changeit -storetype jks -keystore ofbiztrust.jks -storepass changeit

Configure

Configurations are don in hot-deploy/googlecheckout/config/googleCheckout.properties

##your merchantId - sandbox will be different than live

Use 

  • After updating the properties file, restart OFBiz
  • in your ecomerce application, create a request-uri; for example:

<request-map uri="google">
  <security auth="false" https="false"/>
  <event type="service" invoke="transmitRequest"/>
  <response type="view" name="success" value="google"/>
</request-map>