Overview

Welcome to Quikwallet mobile SDK documentation. This document describes the steps for technical integration process between merchant's app and Quikwallet SDK for enabling online transactions. Quikwallet supports multiple integration methods.

Quikwallet Payment Gateway

Quikwallet offers electronic payment services to merchant mobile clients/websites through its partnerships with various banks and payment instrument companies. Through Quikwallet, the customers would be able to make electronic payments through a variety of modes which are mentioned below:

  • Credit cards
  • Debit cards
  • Online net banking accounts

Server Side

Generating Hash

You can generate signature using the secret key provided to you. Go to this link and perform following steps:

  • Enter your mobile number into the message field.
  • Enter the partner secret in the Secret Key field.
  • Select the digest algorith to SHA256.
  • Click on Compute HMAC.

Signature = HMAC-SHA256[users mobile number and secret key]

There will be server level details that will be provided to you[secret key and partner id], which you will use to access our server from your server.


Client Side

To start off the integration process, you would be provided a test setup by Quikwallet where you would be given a test merchant account and test credit card credentials to have a first-hand experience of the overall transaction flow. Here, you can make transaction request in our sample app (pointed to the testing server). Next step is to integrate the SDK code with your app. Once the testing is complete, you should be ready to point your app to the Quikwallet production server for some real transactions

Test Credentials

You should start with test keys (which targets test server) . Please use the following test account (on UAT server):

Partner ID: 10

Signature: 55c657c645cfe150f1dad8e891366789211f0397e6b5626cb3b2c8c608390bff

Mobile : 8762070029

Pre requisite

Before proceeding further with this document make sure that you have read above mentioned steps about server side requirements.

You must already have installed and configured:

  • Java JDK version 1.7 or greater
  • Android SDK
  • A Git client
  • Android Studio

NOTE : minSDKVersion is 10 and targetSDKVersion is 22


Usage with an example:

Making Payment

Mandatory parameters for payment processing:

  1. Partnerid : Partnerid provided by quikwallet
  2. Signature : Signature generated
  3. Mobile : Any 10 digit mobile number
  4. amount : Amount to be paid
  5. env : Server env like staging, live etc

In your activity create an object of class QWParams and initialize all the five fields mentioned above

   QWParams qwParams = new QWParams();//object creation
   qwParams.setMobile("8762070029");
   qwParams.setSignature("55c657c645cfe150f1dad8e891366789211f0397e6b5626cb3b2c8c608390bff");
   qwParams.setPartnerid("10");
   qwParams.setAmount("10");
   //For test environment
   qwParams.setEnv(QWConstants.ENV_UAT); //Use QWConstants.ENV_UAT for testing.
  • Call init method of QWSDKLibInit class.
Parameter Type Description
param1 Context Pass activity context
param2 QWParams Object created and initialized above
param3 String Pass "payment" or QWConstants.PAYMENT here to process payment. Pass "show_cards" or QWConstants.SHOW_CARDS to see your saved cards

Ex :

QWSDKLibInit.init(context, qwParams, QWConstants.PAYMENT); // QWConstants.PAYMENT = "payment"
or
QWSDKLibInit.init(context, qwParams, QWConstants.SHOW_CARDS); // QWConstants.SHOW_CARDS = "show_cards"

Response From SDK

  • To get response from our library Override onActivityResult method. (in activity who is making call to QWLibInit.init() )
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {}
  • Then you need to filter the response using requestCode.

Our request code is equal toQWConstants.QWSDKID which has value of 9999. You can filter response using code below

if (requestCode == QWConstants.QWSDKID) {}

There are five cases here

  1. User presses back button and returns to your app. In this case resultCode will be equal to Activity.RESULT_CANCELED
  2. Payment success In this case resultCode will be equal to QWConstants.PAYMENT_SUCCESS_CODE You can get the paymenid using using code below data.getStringExtra(QWConstants.PAYMENTID);
  3. Payment failed In this case resultCode will be equal to QWConstants.PAYMENT_FAILED_CODE You can get the details of failure using code below data.getStringExtra(QWConstants.RESPONSE_DESC)
  4. No action provided In this case resultCode will be equal to QWConstants.NO_ACTION_PROVIDED_CODE
  5. In case of invalid input In this case resultCode will be equal to QWConstants.INPUT_VALIDATION_FAILED

Sample onActivityResult:

 @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (requestCode == QWConstants.QWSDKID) {
            if (data != null) {
                Log.d(TAG, data.getStringExtra(QWConstants.RESPONSE_DESC) + "");
                if (resultCode == Activity.RESULT_CANCELED) {
                    Toast.makeText(this, data.getStringExtra(QWConstants.RESPONSE_DESC) + "", Toast.LENGTH_SHORT).show();
                } else if (resultCode == QWConstants.PAYMENT_SUCCESS_CODE) {
                    String paymentid = data.getStringExtra(QWConstants.PAYMENTID);
                    String msg = data.getStringExtra(QWConstants.RESPONSE_DESC);
                    Log.d(TAG, "paymentid: " + paymentid + " msg :" + msg);
                    Toast.makeText(this, "paymentid " + paymentid + " msg " + msg + "", Toast.LENGTH_SHORT).show();
                } else if (resultCode == QWConstants.PAYMENT_FAILED_CODE) {
                    String paymentid = data.getStringExtra(QWConstants.PAYMENTID);
                    String msg = data.getStringExtra(QWConstants.RESPONSE_DESC);
                    Log.d(TAG, "paymentid: " + paymentid + " msg :" + msg);
                    Toast.makeText(this, "paymentid " + paymentid + " msg " + msg + "", Toast.LENGTH_SHORT).show();
                } else if (resultCode == QWConstants.NO_ACTION_PROVIDED_CODE) {
                    Log.d(TAG, "" + data.getStringExtra(QWConstants.RESPONSE_DESC) + "");
                    Toast.makeText(this, data.getStringExtra(QWConstants.RESPONSE_DESC) + "", Toast.LENGTH_SHORT).show();
                } else if (resultCode == QWConstants.INPUT_VALIDATION_FAILED) {
                    Log.d(TAG, data.getStringExtra(QWConstants.RESPONSE_DESC) + "");
                    Toast.makeText(this, data.getStringExtra(QWConstants.RESPONSE_DESC) + "", Toast.LENGTH_SHORT).show();
                }
            }

        }
    }

Customize Colors/Theme (optional)

If you want to customize SDK then refer this link -> Customization