npm.io
1.0.2 • Published 5 years ago

jofiz

Licence
ISC
Version
1.0.2
Deps
1
Size
3 kB
Vulns
23
Weekly
0

#Create transaction

##Importe Jofiz promise var Jofiz = require('jofiz'); ###Response { transaction: [Function: transaction], check: [Function: check] }

##Create Transaction const response = await Jofiz.transaction( { apiKey: 'my_api_secret_key', client: 'The Custumer name', amount: '1070', description: 'Transaction description', cancelUrl: 'https://cancelurl.com', successUrl: 'http://succesurl.com', previewImageUrl: 'https://my_brand_image.jpg', method: 'mobile' mode: 'test' });

###Response { "code": 200, "info": "Created", "data": { "wallet": "Your Wallet Name", "client": "The Custumer name", "transactionId": "xxxxxxxxxxxxxxxxxxx", "amount": 1070, "url": "https://jofiz.enovatechnologie.com/paiement/xxxxxxxxxxxxx" } }

##Check Transaction status const response = await Jofiz.check( { apiKey: 'my_api_secret_key', mode: 'test', transactionId : 'xxxxxxxxxxxxxxxxxxxx' });