Skip to content

Instantly share code, notes, and snippets.

View Jake-parkers's full-sized avatar

Joshua Boateng Jake-parkers

View GitHub Profile
{ status: 'success',
message: 'AUTH_SUGGESTION',
data: { suggested_auth: 'GTB_OTP' } }
{
PBFPubKey: PBFKey, // pass your public key here
customer_email: email, // put customer email here
customer_firstname: "John",
customer_lastname: "Doe",
amount: 10000,
customer_phone: "234099940409",
country: "NG",
currency: "NGN",
subaccounts: [
{
PBFPubKey: PBFKey, // pass your public key here
customer_email: email, // put customer email here
customer_firstname: "John",
customer_lastname: "Doe",
amount: 10000,
customer_phone: "234099940409",
country: "NG",
currency: "NGN",
subaccounts: [
{
PBFPubKey: PBFKey, // pass your public key here
customer_email: email, // put customer email here
customer_firstname: "John",
customer_lastname: "Doe",
amount: 10000,
customer_phone: "234099940409",
country: "NG",
currency: "NGN",
subaccounts: [
{
PBFPubKey: PBFKey, // pass your public key here
customer_email: email, // put customer email here
customer_firstname: "John",
customer_lastname: "Doe",
amount: 10000,
customer_phone: "234099940409",
country: "NG",
currency: "NGN",
subaccounts: [
{
PBFPubKey: PBFKey, // pass your public key here
customer_email: email, // put customer email here
customer_firstname: "John",
customer_lastname: "Doe",
amount: 10000,
customer_phone: "234099940409",
country: "NG",
currency: "NGN",
subaccounts: [
if(body.status == "success" && body.data.suggested_auth == "NOAUTH_INTERNATIONAL") {
/*
*card requires AVS authentication so you need to
*1. Update payload with billing info - billingzip, billingcity, billingaddress, billingstate, billingcountry and the suggested_auth returned
*2. Re-encrypt the payload
*3. Call the charge endpoint once again with this updated encrypted payload
*/
} else if (body.status == "success" && body.data.suggested_auth == "PIN") {
/*
{ status: 'success',
message: 'V-COMP',
data:
{ id: 469841,
txRef: 'MC-1551792154101',
orderRef: 'URF_1551792330547_8787635',
flwRef: 'FLW-MOCK-9905f61ccb6a72fd1907a7ee59811a74',
redirectUrl: 'https://guarded-lake-45444.herokuapp.com/rave/test',
device_fingerprint: '69e6b7f0b72037aa8428b70fbe03986c',
settlement_token: null,
{ status: 'success',
message: 'Charge Complete',
data:
{ data:
{ responsecode: '00',
responsetoken: 'mocktoken',
responsemessage: 'successful' },
tx:
{ id: 469832,
txRef: 'MC-1551791862344',
{
"PBFPubKey": "FLWPUBK-7adb6177bd71dd43c2efa3f1229e3b7f-X",
"transaction_reference": "FLW-MOCK-744927fe5cae22fddef891d1ee14ac7b",
"otp": "181971713"
}