Skip to content

Commit c72c756

Browse files
committed
one function added
1 parent 8d32647 commit c72c756

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

payment gateway/config/paystack.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)