Instantiate SDK

Velocity iOS Software Development Kit Integration Guide

Instantiating SDK is common for all payment methods. To integrate the SDK for a card payment, store card, APM, or wallet, complete the following steps:

  1. Add repository address for CPD SDK.
  2. Add the following URL: ssh://git[CPD-provided URL]
  3. Add the following CPD pods in the project pod file:
    1. pod ‘cpmbase’, ‘x.x.x’
    2. pod 'mpoint', 'x.x.x'
      Note: The versions of these files are updated at regular intervals. You can contact the technical team of CPD to check if you have the latest version.

To install the SDK, install the pods.

🚧

Note: You must provide a public key to access the CPD repository.

Implement the following delegate classes:

  • mPointDelegate
  • mPoint3DSecureDelegate
  • mPointWalletLoginDelegate
  • mPointWalletDelegate
  • mPointFraudDelegate
  • mPointSchemeOwnerDelegate
  • mPointForeignExchangeDelegate
  • mPointFraudDelegate
  • mPointTravelFundDelegate
  • mPointInstallmentPlansDelegate

To instantiate the SDK, you must ensure that you have all the prerequisites for SDK integration.

Instantiate the SDK by providing the appropriate configuration details as shown in the following code sample:

let mpoint = mPointManager.init(url: NSURL.init(string: "https://[CLIENT URL].velocity.cellpointdigital.net")! as URL, 
    delegate: self as mPointDelegate, 
    username: [USERNAME], 
    password: [PASSWORD], 
    clientid: [CLIENT ID], 
    account: [ACCOUNT], 
    callbackurl:nil, 
    mode: mPointOutputMode.MPOINT_OUTPUT_MODE_NONE, 
    database: nil)

🚧

Note: Code samples in this document are taken from our application to give you an idea of how to integrate or call any given method on mPoint SDK.

You need to implement your own classes wherever required.