Click-To-Pay Initial Setup

Overview

Our simple iFields integration enables online Click-To-Pay processing through the Sola gateway. This document details the steps necessary to integrate Click-To-Pay with your site.

Contents

Prerequisites

Register for Click-To-Pay: See [insert link here]

Implementing Click-To-Pay

Client-Side Integration

Adding Reference to iFields

Find the latest version of iFields at: https://cdn.cardknox.com/ifields/versions.htm

Step 1: Add the iFields.js file after the <head> tag on your payment page:

Adding JavaScript Objects for Click-To-Pay button

Step 1: Add the following JS snippet inside the <body> where the Click-To-Pay button is desired.

Step 2: Create JavaScript object that holds all of the properties/methods required to process Click-To-Pay.

For a full sample code please refer to Click-To-Pay Sample Code

Step 3: Implement desired callbacks.

For the list of available callbacks, please refer to Click-To-Pay Request object.

There are two main callbacks that must be implemented (the rest are optional):

  • onPaymentPrefill - calculates total amount and sets transaction information.

  • onPaymentSuccess - a callback that will be called after the consumer pays and Click-To-Pay returns a payload with all of the requested consumer information. This is where you need to make an ajax call to your server with the payload. The sample for making an ajax call is below:

Sample Code for Making Ajax Call:

For full integration code, please refer to Click-To-Pay iFields Integration

Enable Click-To-Pay

window.ckClickToPay object - controls initialization of Click-To-Pay button

Method

Call Required

Description

enableClickToPay

Yes

Initializes and enables Click-To-Pay Button.

enableClickToPay Parameters

Name

Type

Required

Description

initParameters

Object

Yes

Object that contains initialization parameters for Click-To-Pay

For full list of Init Parameters, please refer to Click-To-Pay Request Object



Server-Side Integration

Server Endpoint Creation

A server endpoint is needed in order to accept the Click-To-Pay Payload from your website.

Step 1: Create an endpoint and method for API Integration on your server side that takes a Click-To-Pay Payload and makes a call to Sola.

For full list of Returned Parameters, please refer to Click-To-Pay Response Reference

API Integration

This section assumes that you already know how to integrate other payments with Sola API.

Below are the steps to integrate Click-To-Pay with the Sola API:

Once the consumer confirms the payment, Click-To-Pay API generates a Click-To-Pay Response in the form of a JSON string.

Integration Steps:

  1. Set the required fields:

    1. xDigitalWalletType to ClickToPay

    2. xClickToPayTransactionId to clickToPayResponse.payload.transactionId

    3. xClickToPayExternalClientId to clickToPayResponse.payload.externalClientId

    4. xClickToPayEncryptionKey to clickToPayResponse.payload.encryptionKey

    5. xCardNum to clickToPayResponse.payload.token

    6. xAmount to clickToPayResponse.amount

    7. xCommand - Set to one of the values that starts with cc: like cc:sale, cc:auth, etc.

    8. xKey to "Your xKey"

    9. xVersion = "4.5.9"

    10. xSoftwareName to β€œYour Software Name"

    11. xSoftwareVersion to "Your Software Version"

Sample Request:

For more details, please contact your Sola Representative.

Questions?

Contact [email protected]

Last updated

Was this helpful?