Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
woven-pay-js
Advanced tools
** PLEASE NOTE THAT THIS LIBRARY IS UNDER ACTIVE DEVELOPMENT **
npm i -S woven-pay-js
import WovenPay from 'woven-pay-js';
let wovenpay = new WovenPay(url, apikey, apisecret);
let token = "mytoken"
wovenpay.token = token
wovenpay.timeout = 5000 //5 seconds max
wovenpay.version = "1" //Every request will use version 1 of wovenpay api
let response = await wovenpay.getAuthToken(merchantEmail: string, merchantPassword: string)
token = await response.json();
let response = await wovenpay.refreshAuthToken(token: string)
token = await response.json();
let response = await wovenpay.verifyAuthToken(token: string)
is_valid = await response.json();
wovenpay.Customers.create(json payload)
let response = await wovenpay.Customers.create({email: email});
customer = await response.json();
wovenpay.Customers.edit(customer id, json payload)
let response = wovenpay.Customers.edit(customer.id, {email: email});
customer = await response.json();
wovenpay.Customers.delete(customer id)
let response = wovenpay.Customers.delete(customer.id);
customer = await response.json();
wovenpay.Customers.all()
let response = wovenpay.Customers.all();
customers = await response.json();
wovenpay.Customers.get(customer id)
let response = wovenpay.Customers.get(customer.id);
customer = await response.json();
wovenpay.Plans.create(json payload)
let response = await wovenpay.Plans.create({name:planName, business: Business, price:1000});
plan = await response.json();
wovenpay.Plans.edit(plan id, json payload)
let response = wovenpay.Plans.create({name:planName, business: Business, price:2000});
plan = await response.json();
wovenpay.Plans.delete(plan id)
let response = wovenpay.Plans.delete(plan.id);
plan = await response.json();
wovenpay.Payments.charge(json payload)
payload = {
"method": "mobile.mpesa",
"amount": 10,
"mobile":phone,
"customer": {
"email":test
},
"order": {
"description": "Payment of Dockerfest Ticket"
},
"reference": "myuniquereference"
}
let response = await wovenpay.Payments.charge(payload);
charge = await response.json();
You should probably want to use graphql query wovenpay.Payments.transactions()
let response = wovenpay.Payments.transactions();
transactions = await response.json();
wovenpay.Payments.status(transaction id)
let response = wovenpay.Payments.status(transaction.id);
status = await response.json();
wovenpay.Webhooks.create(json payload)
let response = await wovenpay.Webhooks.create({event: event, target:url, key:"notsecretkey"});
hook = await response.json();
wovenpay.Webhooks.edit(hook id, json payload)
let response = wovenpay.Webhooks.create({event:"customer.created", target: url, key:"secretkey"});
hook = await response.json();
wovenpay.Webhooks.delete(hook id)
let response = wovenpay.Webhooks.delete(hook.id);
hook = await response.json();
One can use both string or template literals wovenpay.Graph.query(json payload)
let response = await wovenpay.Graph.query(`{ allBusinesses {edges{node{id name }}} }`)
let response2 = await wovenpay.Graph.query`{ allBusinesses {edges{node{id name }}} }`
FAQs
Js SDK for the Woven Payment REST api
The npm package woven-pay-js receives a total of 4 weekly downloads. As such, woven-pay-js popularity was classified as not popular.
We found that woven-pay-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.