Integrating SDK

Velocity Android Software Development Kit Integration Guide

This section provides information on how to integrate payments using CellPoint Velocity SDK. See subsections Instantiate SDK and Initialize Payment for further information.

Velocity SDK enables asynchronous communication using the delegate/interface pattern. The SDK enables your mobile application to implement the methods defined by mPoint payment interface.

To integrate payment methods using the Velocity SDK, complete the following steps:

  1. Integrate the SDK using the CPD credentials for communicating with Velocity POP.

    1. Add the SDK path in Gradle file with specific version provided by CPD.
      Note: The versions of these files are updated at regular intervals. Check with the CPD technical team if you have the latest version.
    2. Add nexus repository path in Gradle file
    3. Run Gradle Build command.
    allprojects {
        		repositories {
    maven {
    url = uri("https://nexus.cellpointmobile.com/content/repositories/internal")
    credentials {
    username = "default-read"
    password = "CPMRead4321"
    }
    }
    }
    }
    
  2. Instantiate the SDK using the CPD credentials for communicating with Velocity POP.

  3. Initialize a payment using the SDK, which involves the following tasks:

    1. Invoke the initialize method on the SDK instance.
    2. Handle the SDK call back through the selected payment method.
    3. Construct the graphical user interface (GUI) for enabling customers to make payment using their selected payment method.
      Note: Instantiating and initializing a payment are common to all payment methods such as card payment, save cards, APM, and wallet.
  4. Implement the following interfaces:

    1. mPointWalletDelegate
    2. mPointSchemeOwnerDelegate
    3. mPoint3DSecureDelegate
    4. mPointDelegate
    5. mPointWebViewDelegate
    6. mPointSchemeOwnerDelegate
    7. mPointForeignExchangeDelegate
    8. mPointGetBalanceDelegate

You can authorize a payment with an SDK for one of the following payment methods:

  • Card payment
  • APM
  • Wallet
  • Aggregators
  • Offline Payments
  • Vouchers
  • Split Payment

🚧

Note: CPD recommends you implement the following call back error methods for error handling in your application:

  • handleStatus is called for high-level errors when the back-end rejects the request and returns one or more status codes giving the reason, or for operations that do not return any data, where the back-end returns the operation status.
  • handleError is called for low-level errors such as network connectivity problems.

🚧

Note: For handling web-view redirects, SDK supports devices with Android 5.0 (application programming interface, or API, level 21) and above only.