We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d32647 commit c72c756Copy full SHA for c72c756
payment gateway/config/paystack.js
@@ -0,0 +1,25 @@
1
+const { response } = require("express");
2
+
3
+const paystack=function(request){
4
+ const secretkey='sk_test_adf1b701bf31970a670478a66ca0b2902eb2cfd0';
5
6
+ const initializepayment=function(form, cb){
7
+ const options={
8
+ url : 'https://api.paystack.co/transaction/initialize',
9
+ headers : {
10
+ authorization : secretkey,
11
+ 'content-type' : 'application/json',
12
+ 'cache-control' : 'no-cache'
13
+ },
14
+ form
15
+ }
16
+ const callback=(error,response,body)=>{
17
+ return cb(error,body);
18
19
+ request.post(options,callback);
20
+ };
21
+ const verifypayment=function(ref,cb){
22
23
24
+ return {initializepayment,verifypayment};
25
+}
0 commit comments