We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c72c756 commit 074161bCopy full SHA for 074161b
1 file changed
payment gateway/config/paystack.js
@@ -18,8 +18,23 @@ const paystack=function(request){
18
}
19
request.post(options,callback);
20
};
21
+
22
23
const verifypayment=function(ref,cb){
-
24
25
+ const options = {
26
+ url : 'https://api.paystack.co/transaction/verify/'+encodeURIComponent(ref),
27
+ headers : {
28
+ authorization: secretkey,
29
+ 'content-type': 'application/json',
30
+ 'cache-control': 'no-cache'
31
+ }
32
33
+ const callback=(err,response,body)=>{
34
+ return cb(err,body);
35
+ };
36
+ request(options,callback);
37
38
return {initializepayment,verifypayment};
-}
39
+}
40
+module.exports=paystack;
0 commit comments