Shifting to production mode
If your integration is correctly completed, you will successfully create a Google Pay transaction in test environment.
You must now get your development validated via Google.
- Google provides a checklist:
- Once all the points in the checklist are validated, you must fill the following form to request the shift into production mode:
- When Google asks you for your production application, modify the onCreate method of your Activity as follows:
... builder.setEnvironment(WalletConstants.ENVIRONMENT_PRODUCTION) ...
If you are using the sample code, change the value of the PAYMENT_MODE variable to PRODUCTION in the MainActivity.kt file.
- Then, modify the createPayment call made by your merchant server in order to use the production key in the SOAP HEADER generation.
- Modify the value of the mode header in your createPayment method as follows:
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Enveloppe xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://v5.ws.vads.lyra.com/" xmlns:ns2="http://v5.ws.vads.lyra.com/Header/"> <SOAP-ENV:Header> <ns2:shopId>70258842</ns2:shopId> <ns2:requestId>b2e0beab-371e-4751-9aa7-20d69daac1ac</ns2:requestId> <ns2:timestamp>2018-07-09T12:37:51Z</ns2:timestamp> <ns2:mode>PRODUCTION</ns2:mode> <ns2:authToken>x7JqR7QLDRc4bsM57nOyf5xzKqlalEqPmeai1EAOZDM=</ns2:authToken> </SOAP-ENV:Header>
- Send your application configured in production mode to Google to complete the last tests.The application must be signed with the release key. The debug key will not work in the production environment.
- After receiving an authorization from Google, enable Google Pay payments in the Google Pay Developer Profile for this application, then deploy the application in the Google Play Store.For more details, see the application deployment process:
||After shifting into production mode, if you make a call with the WalletConstants.ENVIRONMENT_TEST, the following message will appear on the Google Pay bottom sheet:
"Unrecognized app. Please make sure that you trust this app before proceeding."