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:

SDK Integration Checklist

Before you start the SDK integration process, ensure you have the following:

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:

  1. 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'
    
  2. 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)