customCheckout()

customCheckout() is a part of SSO integration.

Parameters

Name

Type

Description

displayType*

string

Options available: popup / inline / overlay

containerId

string

Optional parameter (required for in-line checkout). ID of dom element in which checkout will be placed

customUrl*

string

URL generated by prepareRemoteAuth() method. Notice: Link expires after 30 days or after first use

completed*

function

Gives detailed information about purchase made

* - required parameter

Usage

Example of popup checkout:

CleengApi.customCheckout({
    displayType: "popup",
    customUrl: "https:\/\/sandbox.cleeng.com\/auth\/2\/purchase?v=3&popup=1&remote_token=7a488355e48d593aac653ac2d5c25228a7b3fae8:5b3467ff73a414b067f7d4ef0b000cc707829412&redirectUri=https%3A%2F%2Fwww.example.com&offerId=S987654321_PL&publisherId=123456789",
    completed : function(result){}
});}

Example of inline checkout:

CleengApi.customCheckout({
    displayType: "inline",
    containerId: "my-container",
    customUrl: "https:\/\/sandbox.cleeng.com\/auth\/2\/purchase?v=3&popup=1&remote_token=7a488355e48d593aac653ac2d5c25228a7b3fae8:5b3467ff73a414b067f7d4ef0b000cc707829412&redirectUri=https%3A%2F%2Fwww.example.com&offerId=S987654321_PL&publisherId=123456789",
    completed : function(result){}
});

Example of overlay checkout:

CleengApi.customCheckout({
    displayType: "overlay",
    containerId: "my-container",
    customUrl: "https:\/\/sandbox.cleeng.com\/auth\/2\/purchase?v=3&popup=1&remote_token=7a488355e48d593aac653ac2d5c25228a7b3fae8:5b3467ff73a414b067f7d4ef0b000cc707829412&redirectUri=https%3A%2F%2Fwww.example.com&offerId=S987654321_PL&publisherId=123456789",
    completed : function(result){}
});