File tree Expand file tree Collapse file tree 8 files changed +32
-8
lines changed
dist/api/preauthorization Expand file tree Collapse file tree 8 files changed +32
-8
lines changed Original file line number Diff line number Diff line change 45
45
"status" : false ,
46
46
"message" : " An error occurred"
47
47
}
48
+ },
49
+ "404" : {
50
+ "description" : " 404 Not Found" ,
51
+ "data" : {
52
+ "status" : false ,
53
+ "message" : " No preauthorized transaction exists for the reference provided" ,
54
+ "meta" : {
55
+ "nextStep" : " Try again later"
56
+ },
57
+ "type" : " api_error" ,
58
+ "code" : " unknown"
59
+ }
48
60
}
49
61
}
Original file line number Diff line number Diff line change 1
1
const sh = `#!/bin/sh
2
- url="https://api.paystack.co/preauthorization/verify/ :reference"
2
+ url="https://api.paystack.co/preauthorization/:reference"
3
3
authorization="Authorization: Bearer YOUR_SECRET_KEY"
4
4
5
5
curl "$url" -H "$authorization" -X GET`
@@ -9,7 +9,7 @@ const js = `const https = require('https')
9
9
const options = {
10
10
hostname: 'api.paystack.co',
11
11
port: 443,
12
- path: '/preauthorization/verify/ :reference',
12
+ path: '/preauthorization/:reference',
13
13
method: 'GET',
14
14
headers: {
15
15
Authorization: 'Bearer SECRET_KEY'
@@ -35,7 +35,7 @@ const php = `<?php
35
35
$curl = curl_init();
36
36
37
37
curl_setopt_array($curl, array(
38
- CURLOPT_URL => "https://api.paystack.co/preauthorization/verify/ :reference",
38
+ CURLOPT_URL => "https://api.paystack.co/preauthorization/:reference",
39
39
CURLOPT_RETURNTRANSFER => true,
40
40
CURLOPT_ENCODING => "",
41
41
CURLOPT_MAXREDIRS => 10,
Original file line number Diff line number Diff line change 12
12
"amount" : 1600 ,
13
13
"created_at" : " 2023-08-24T19:00:18.000Z" ,
14
14
"released_at" : null ,
15
- "scheduled_release_date " : " 2023-08-25T19:00:26.000Z" ,
15
+ "expiry_date " : " 2023-08-25T19:00:26.000Z" ,
16
16
"currency" : " ZAR" ,
17
17
"metadata" : null ,
18
18
"fees" : 100 ,
Original file line number Diff line number Diff line change 45
45
"status" : false ,
46
46
"message" : " An error occurred"
47
47
}
48
+ },
49
+ "404" : {
50
+ "description" : " 404 Not Found" ,
51
+ "data" : {
52
+ "status" : false ,
53
+ "message" : " No preauthorized transaction exists for the reference provided" ,
54
+ "meta" : {
55
+ "nextStep" : " Try again later"
56
+ },
57
+ "type" : " api_error" ,
58
+ "code" : " unknown"
59
+ }
48
60
}
49
61
}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ const https = require('https')
3
3
const options = {
4
4
hostname : 'api.paystack.co' ,
5
5
port : 443 ,
6
- path : '/preauthorization/verify/ :reference' ,
6
+ path : '/preauthorization/:reference' ,
7
7
method : 'GET' ,
8
8
headers : {
9
9
Authorization : 'Bearer SECRET_KEY'
Original file line number Diff line number Diff line change 2
2
$ curl = curl_init ();
3
3
4
4
curl_setopt_array ($ curl , array (
5
- CURLOPT_URL => "https://api.paystack.co/preauthorization/verify/ :reference " ,
5
+ CURLOPT_URL => "https://api.paystack.co/preauthorization/:reference " ,
6
6
CURLOPT_RETURNTRANSFER => true ,
7
7
CURLOPT_ENCODING => "" ,
8
8
CURLOPT_MAXREDIRS => 10 ,
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
- url=" https://api.paystack.co/preauthorization/verify/ :reference"
2
+ url=" https://api.paystack.co/preauthorization/:reference"
3
3
authorization=" Authorization: Bearer YOUR_SECRET_KEY"
4
4
5
5
curl " $url " -H " $authorization " -X GET
Original file line number Diff line number Diff line change 12
12
"amount" : 1600 ,
13
13
"created_at" : " 2023-08-24T19:00:18.000Z" ,
14
14
"released_at" : null ,
15
- "scheduled_release_date " : " 2023-08-25T19:00:26.000Z" ,
15
+ "expiry_date " : " 2023-08-25T19:00:26.000Z" ,
16
16
"currency" : " ZAR" ,
17
17
"metadata" : null ,
18
18
"fees" : 100 ,
You can’t perform that action at this time.
0 commit comments