stitchng / paystack Goto Github PK
View Code? Open in Web Editor NEWA NodeJS Wrapper for Paystack
License: MIT License
A NodeJS Wrapper for Paystack
License: MIT License
var paystk = new paystackpop();
paystk.newtransaction({
key : "new_key",
Email: "[email protected]",
amount : 40,
currency : "ZAR" ,
style : {
text : "Hey"
}
})
I am unable to change the button text of the popup from "pay" to "hey"
I'm trying to make an update plan
request using the SDK but it keeps throwing an error. After digging into the code, I discovered that the SDK sends a default value of monthly
for the interval but the API doesn't accept interval
param for the update plan
endpoint.
This is the updatePlan function
updatePlan: {
method: 'PUT',
path: '/plan/{:id_or_plan_code}',
send_json: true,
params: { name$: String, interval$: String, currency: String, amount$: Number, send_invoices: Boolean, send_sms: Boolean, invoice_limit: Number, description: String },
param_defaults: { interval: 'monthly', currency: 'NGN', send_invoices: false, send_sms: false, invoice_limit: 0 },
route_params: { id_or_plan_code: String }
}
This error should be fixed after the interval is removed from the params_defaults
and params
fields in the updatePlan
function
Can the documentation please be more readable and easy to follow?? Whats the easiest method to accept payment through my nodejs and express backend
Going through the Paystack metadata documentation here, https://paystack.com/docs/payments/metadata/
Metadata is of type object. Why is this different in this package? When I checked metadata is of type string.
Is there something I am missing? Kindly help.
When testing paystack.initiateTransfer({... .. })
the server always returns with 400 no matter what i do, below is the argument i passed into the function
{
reason: 'Withdrawing from ***: United Bank For Africa',
amount: 40000,
recipient: 'RCP_gqko5hey45189ob',
reference: 'rApY3'
}
I don't really know what am doing wrong here, but using the curl
method just works fine, the recipient is from an already generated endpoint and am just passing it directly to the initiateTransfer
method
this is the specification am following https://developers.paystack.co/v2.0/docs/funds-transfers
[EDIT]
Ive also disabled OPT confirmation, but still no positive reply from paystack
I have been experiencing error in the chargeCard function with the following object as a parameter to the chargeCard function:
{
"email":"[email protected]",
"amount":"10000",
"metadata":{
"custom_fields":[
{
"value":"makurdi",
"display_name": "Donation for",
"variable_name": "donation_for"
}
]
},
"card":{
"cvv":"408",
"number":"4084084084084081",
"expiry_month":"01",
"expiry_year":"99"
},
"pin":"0000"
}
Source:
and here is the errror i get:
Error: Request was badly formed | Bad Request (400)
at PayStack.httpClientBaseOptions.hooks.afterResponse (C:\xampp\htdocs\blake\node_modules\paystack-node\src\PayStack\index.js:331:21)
at EventEmitter.<anonymous> (C:\xampp\htdocs\blake\node_modules\got\source\as-promise.js:39:23)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
and just to dig up thing i had to go into that file and console log at line 309 and here's what i got even after changing the card details to a real card:
body: '{\n "status": false,\n "message": "Please pass card number to charge"\n}'
The API endpoint attribute at
paystack/src/endpoints/customers.js
Line 46 in 788b7e7
path: '/customer/{:id_or_customer_code}
https://developers.paystack.co/reference#update-customer the above query doest scale well or throws an error
Request endpoint does not exist | Not Found (404)
at PayStack.httpClientBaseOptions.hooks.afterResponse (/home/.../.../node_modules/paystack-node/src/PayStack/index.js:330:21)
at EventEmitter.<anonymous> (/home/.../.../node_modules/paystack-node/node_modules/got/source/as-promise.js:39:23)
This should be updated to also support customer_id
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.