Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
webpay-bahamta
Advanced tools
This is a lib to handle payment from bahamta
Using npm:
$ npm install webpay-bahamta
Using yarn:
$ yarn add webpay-bahamta
const webpay = require('webpay-bahamta');
Performing a Payment
request
let api_key = WEB_TOKEN;
let reference = 'order#1';
let amount_irr = 100000 * 10;
let callback_url = 'https://example.com/chechout/success';
let payer_mobile = '0912*******';
let payment_response = await webpay.payment(api_key, reference, amount_irr, callback_url, payer_mobile);
if(! payment_response.ok) {
throw new Error(payment_response.error);
}
let { payment_url } = payment_response.result;
console.log(payment_url);
let verify_response = await webpay.verify(api_key, reference, amount_irr);
if(! verify_response.ok) {
throw new Error(verify_response.error);
}
let payment_info = verify_response.result;
console.log(payment_info);
payment_url will be like:
https://webpay.bahamta.com/api/…
payment_info will be like:
{
"state": "paid",
"total": 1000000,
"wage": 5000,
"gateway": "sep",
"terminal": "11223344",
"pay_ref": "GmshtyjwKSu5lKOLquYrzO9BqjUMb/TPUK0qak/iVs",
"pay_trace": "935041",
"pay_pan": "123456******1234",
"pay_cid": "77CB1B455FB5F60415A7A02E4502134CFD72DBF6D1EC8FA2B48467DFB124AA75A",
"pay_time": "2019-11-12T16:39:57.686436+03:30"
}
FAQs
This a lib to handle payment from bahamta
The npm package webpay-bahamta receives a total of 0 weekly downloads. As such, webpay-bahamta popularity was classified as not popular.
We found that webpay-bahamta demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.