Skip to content

a library for fatora.io api (Fatora Payment Gateway)

Notifications You must be signed in to change notification settings

ammarhashad/fatora

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fatora

Installation

yarn
yarn add fatora
npm
npm install fatora

Usage

// For CommonJS Modules

const  fatora = require("fatora")

// For ES6 Modules

import  fatora  from  "fatora"

const  FatoraClient = new  fatora({ apiKey:  "YOUR_API_KEY" })

Example

const  FatoraClient = new  fatora({ apiKey:  "YOUR_API_KEY" })

// Example of creating a simple checkout
let  request = FatoraClient.PaymentApi.Checkout({
amount:  123.1,
currency:  "QAR",
order_id:  "123456",
client: {
name:  "client",
phone:  "+974 77777777",
email:  "[email protected]",
},
language:  "ar",
success_url:  "http://domain.com/payments/success",
failure_url:  "http://domain.com/payments/failure",
fcm_token:  "XXXXXXXXX",
save_token:  true,
note:  "some additional info",
}).then((res) => {
console.log(res)
})