8000 GitHub - ShoketHQ/node-shoket: Shoket node wrapper
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.

ShoketHQ/node-shoket

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-shoket

A simple node wrapper for the shoket payment API, for more information on the API visit Shoket Official website.

Getting Started

Prerequisites

Installation

Installing with npm:

npm install node-shoket

Usage

const {makePayment, verifyPayment} = require('node-shoket');

//function used to make payment
makePayment(API_KEY,'5000','Sam Smith','user@mail.com','255612345678','Halotel');

//function used to verify payment
verifyPayment(API_KEY, '3j8zL7Tu7LhTMuR1S540f');

Testing

npm test

Documentation

  • The makePayment function is used to accept payments, the function has 6 parameters which are API_KEY, amount, customer_name, email, number_used and channel. The parameters are as follows in the function:
makePayment(API_KEY, amount, customer_name, email, number_used, channel);
Parameter Required Description
API_KEY Yes This is the secret API key given on registering at the Shoket Official site
Amount Yes This is an amount in Tanzania shilling.
Customer Number Yes This is a customer phone number which will be used to charge a customer.
Email Yes This is a customer Email
Channel Yes Mobile-provider name which is used by the customer phone number.
Customer names Yes This is a customer full name
  • The verifyPayment is used to verify the transaction conducted, the function has 2 parameters which are the API_KEY and the transaction reference. The parameters are arranged as follows:
verifyPayment(API_KEY, transaction_reference);
Parameter Required Description
API_KEY Yes This is the secret API key given on registering at the Shoket Official site
Transaction Reference Yes This is the reference of the transaction performed already.

Contributing

Please see CONTRIBUTING for details.

Credits

License

This project is licensed under the MIT License.

About

Shoket node wrapper

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%
0