Skip to content

Commit aec7871

Browse files
Merge pull request #78 from PaystackOSS/feat/preauth
add json to config
2 parents 85b0806 + 609a1e1 commit aec7871

File tree

8 files changed

+138
-8
lines changed

8 files changed

+138
-8
lines changed

dist/doc/payments/preauthorization/capture.js

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,60 @@ const php = `<?php
7474
echo $result;
7575
?>`
7676

77-
export {sh, js, php}
77+
const json = `{
78+
"status": true,
79+
"message": "Capture attempted",
80+
"data": {
81+
"amount": 1000,
82+
"currency": "ZAR",
83+
"transaction_date": "2023-08-24T11:38:32.000Z",
84+
"status": "success",
85+
"reference": "123-abc",
86+
"domain": "test",
87+
"metadata": {
88+
"custom_fields": [
89+
{
90+
"display_name": "Cart Number",
91+
"variable_name": "cart_number",
92+
"value": "123443"
93+
}
94+
]
95+
},
96+
"gateway_response": "Approved",
97+
"message": null,
98+
"channel": "preauth",
99+
"ip_address": null,
100+
"log": null,
101+
"fees": 373,
102+
"authorization": {
103+
"authorization_code": "AUTH_5h7ifp9x1h",
104+
"bin": "541541",
105+
"last4": "0051",
106+
"exp_month": "12",
107+
"exp_year": "2028",
108+
"channel": "card",
109+
"card_type": "mastercard",
110+
"bank": "Absa Bank Limited, South Africa ",
111+
"country_code": "ZA",
112+
"brand": "mastercard",
113+
"reusable": true,
114+
"signature": "SIG_6bCAS8p20rANfmuYgQ4a",
115+
"account_name": null
116+
},
117+
"customer": {
118+
"id": 180063193,
119+
"first_name": null,
120+
"last_name": null,
121+
"email": "[email protected]",
122+
"customer_code": "CUS_zi5os4fs31qxao0",
123+
"phone": null,
124+
"metadata": null,
125+
"risk_action": "default",
126+
"international_format_phone": null
127+
},
128+
"plan": null,
129+
"id": 1504173002
130+
}
131+
}`
132+
133+
export {sh, js, php, json}

dist/doc/payments/preauthorization/initialize.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,14 @@ const php = `<?php
7474
echo $result;
7575
?>`
7676

77-
export {sh, js, php}
77+
const json = `{
78+
"status": true,
79+
"message": "Authorization URL created",
80+
"data": {
81+
"authorization_url": "https://checkout.paystack.com/preauthorization/NDEyOTIyOmxpdmU6ZWloZ2VodTNyczZjanJj",
82+
"access_code": "NDEyOTIyOmxpdmU6ZWloZ2VodTNyczZjanJj",
83+
"reference": "eihgehu3rs6cjrc"
84+
}
85+
}`
86+
87+
export {sh, js, php, json}

dist/doc/payments/preauthorization/release.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,14 @@ const php = `<?php
6969
echo $result;
7070
?>`
7171

72-
export {sh, js, php}
72+
const json = `{
73+
"status": true,
74+
"message": "Successfully released",
75+
"data": {
76+
"id": 507,
77+
"status": "released",
78+
"reference": "123-abc"
79+
}
80+
}`
81+
82+
export {sh, js, php, json}

dist/doc/payments/preauthorization/reserve.js

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,54 @@ const php = `<?php
7878
echo $result;
7979
?>`
8080

81-
export {sh, js, php}
81+
const json = `{
82+
"status": true,
83+
"message": "Preauthorization successful",
84+
"data": {
85+
"id": 523,
86+
"domain": "test",
87+
"status": "authorized",
88+
"reference": "pre_p0xpfge2",
89+
"amount": 1600,
90+
"gateway_response": {
91+
"authorizeResponse": "Approved",
92+
"rrn":"KdeasineK"
93+
},
94+
"created_at": "2023-08-24T19:00:18.000Z",
95+
"released_at": null,
96+
"scheduled_release_date": "2023-08-25T19:00:26.000Z",
97+
"currency": "ZAR",
98+
"metadata": null,
99+
"fees": 0,
100+
"authorization": {
101+
"authorization_code": "AUTH_dalhwqi5vw",
102+
"bin": "454545",
103+
"last4": "4545",
104+
"exp_month": "08",
105+
"exp_year": "2028",
106+
"channel": "card",
107+
"card_type": "visa credit",
108+
"bank": "NEDBANK",
109+
"country_code": "ZA",
110+
"brand": "visa",
111+
"reusable": true,
112+
"signature": "SIG_BAJR7TwTw5TwKOYCro5c",
113+
"account_name": null
114+
},
115+
"customer": {
116+
"id": 180063193,
117+
"first_name": null,
118+
"last_name": null,
119+
"email": "[email protected]",
120+
"customer_code": "CUS_zi5os4fs31qxao0",
121+
"phone": null,
122+
"metadata": null,
123+
"risk_action": "default",
124+
"international_format_phone": null
125+
},
126+
"merchant_id": 210002,
127+
"merchant_name": "ABC merchant"
128+
}
129+
}`
130+
131+
export {sh, js, php, json}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
languages:
22
- sh
33
- js
4-
- php
4+
- php
5+
- json
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
languages:
22
- sh
33
- js
4-
- php
4+
- php
5+
- json
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
languages:
22
- sh
33
- js
4-
- php
4+
- php
5+
- json
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
languages:
22
- sh
33
- js
4-
- php
4+
- php
5+
- json

0 commit comments

Comments
 (0)