Integration for Wallets
Velocity Android Software Development Kit Integration Guide
The integration workflow of an Android device with SDK for a wallet transaction depends on the wallet used for a transaction. This section provides an example of Google Pay™ wallet integration.
Before you start integrating a wallet, go through the list of prerequisites.
To integrate the SDK for a wallet payment, check for the following:
- Integration modes available - Android SDK, Web or Rest API, and Hosted Payment Page.
- List of supported payment methods by country - https://support.google.com/pay/answer/7454247
SDK Integration Checklist
Before you start the SDK integration process, ensure you have the following:
- The base and mPoint SDKs of CPD for Google Pay Integration
- Client configuration details
- Google Android Integration checklist:
https://developers.google.com/pay/api/android/guides/test-and-deploy/integration-checklist
Application Configurations
Make the following configurations in your mobile application before you start integrating the SDK for wallet transactions.
Organize the Setup
To organize the setup, complete the following steps:
- Add dependencies in build.gradle file.
implementation 'com.google.android.gms:play-services-wallet:18.0.0' implementation 'com.android.support:appcompat-v7:24.1.1'
- Update AndroidManifest.xml to enable Google Pay API.
<application ... ... <!-- Enables the Google Pay API --> <meta-data android:name="com.google.android.gms.wallet.api.enabled" android:value="true" />
Create Request Object
The mPoint SDK provides mPoint class to create request object based on the client configuration details. The request object is required to initiate the payment process.
this._mpoint = mPoint(URL ("[CPD provided URL]"),
this,
"username",[USERNAME]
"password", [PASSWORD]
clientid, [CLIENT ID]
accountid, [ACCOUNT ID]
null,
context,
null,
RecordMap<String, String> (),
arrayOf(ClientInfo.IDENTIFIERS.DEVICEID)
this._mpoint.mode = mPoint.OUTPUT_MODE.NONE)
Updated 3 months ago