Skip to content

Commit

Permalink
Merge pull request #78 from PaystackOSS/feat/preauth
Browse files Browse the repository at this point in the history
add json to config
  • Loading branch information
damilola-paystack authored Jun 5, 2024
2 parents 85b0806 + 609a1e1 commit aec7871
Show file tree
Hide file tree
Showing 8 changed files with 138 additions and 8 deletions.
58 changes: 57 additions & 1 deletion dist/doc/payments/preauthorization/capture.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,60 @@ const php = `<?php
echo $result;
?>`

export {sh, js, php}
const json = `{
"status": true,
"message": "Capture attempted",
"data": {
"amount": 1000,
"currency": "ZAR",
"transaction_date": "2023-08-24T11:38:32.000Z",
"status": "success",
"reference": "123-abc",
"domain": "test",
"metadata": {
"custom_fields": [
{
"display_name": "Cart Number",
"variable_name": "cart_number",
"value": "123443"
}
]
},
"gateway_response": "Approved",
"message": null,
"channel": "preauth",
"ip_address": null,
"log": null,
"fees": 373,
"authorization": {
"authorization_code": "AUTH_5h7ifp9x1h",
"bin": "541541",
"last4": "0051",
"exp_month": "12",
"exp_year": "2028",
"channel": "card",
"card_type": "mastercard",
"bank": "Absa Bank Limited, South Africa ",
"country_code": "ZA",
"brand": "mastercard",
"reusable": true,
"signature": "SIG_6bCAS8p20rANfmuYgQ4a",
"account_name": null
},
"customer": {
"id": 180063193,
"first_name": null,
"last_name": null,
"email": "[email protected]",
"customer_code": "CUS_zi5os4fs31qxao0",
"phone": null,
"metadata": null,
"risk_action": "default",
"international_format_phone": null
},
"plan": null,
"id": 1504173002
}
}`

export {sh, js, php, json}
12 changes: 11 additions & 1 deletion dist/doc/payments/preauthorization/initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,14 @@ const php = `<?php
echo $result;
?>`

export {sh, js, php}
const json = `{
"status": true,
"message": "Authorization URL created",
"data": {
"authorization_url": "https://checkout.paystack.com/preauthorization/NDEyOTIyOmxpdmU6ZWloZ2VodTNyczZjanJj",
"access_code": "NDEyOTIyOmxpdmU6ZWloZ2VodTNyczZjanJj",
"reference": "eihgehu3rs6cjrc"
}
}`

export {sh, js, php, json}
12 changes: 11 additions & 1 deletion dist/doc/payments/preauthorization/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,14 @@ const php = `<?php
echo $result;
?>`

export {sh, js, php}
const json = `{
"status": true,
"message": "Successfully released",
"data": {
"id": 507,
"status": "released",
"reference": "123-abc"
}
}`

export {sh, js, php, json}
52 changes: 51 additions & 1 deletion dist/doc/payments/preauthorization/reserve.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,54 @@ const php = `<?php
echo $result;
?>`

export {sh, js, php}
const json = `{
"status": true,
"message": "Preauthorization successful",
"data": {
"id": 523,
"domain": "test",
"status": "authorized",
"reference": "pre_p0xpfge2",
"amount": 1600,
"gateway_response": {
"authorizeResponse": "Approved",
"rrn":"KdeasineK"
},
"created_at": "2023-08-24T19:00:18.000Z",
"released_at": null,
"scheduled_release_date": "2023-08-25T19:00:26.000Z",
"currency": "ZAR",
"metadata": null,
"fees": 0,
"authorization": {
"authorization_code": "AUTH_dalhwqi5vw",
"bin": "454545",
"last4": "4545",
"exp_month": "08",
"exp_year": "2028",
"channel": "card",
"card_type": "visa credit",
"bank": "NEDBANK",
"country_code": "ZA",
"brand": "visa",
"reusable": true,
"signature": "SIG_BAJR7TwTw5TwKOYCro5c",
"account_name": null
},
"customer": {
"id": 180063193,
"first_name": null,
"last_name": null,
"email": "[email protected]",
"customer_code": "CUS_zi5os4fs31qxao0",
"phone": null,
"metadata": null,
"risk_action": "default",
"international_format_phone": null
},
"merchant_id": 210002,
"merchant_name": "ABC merchant"
}
}`

export {sh, js, php, json}
3 changes: 2 additions & 1 deletion src/doc/payments/preauthorization/capture/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
languages:
- sh
- js
- php
- php
- json
3 changes: 2 additions & 1 deletion src/doc/payments/preauthorization/initialize/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
languages:
- sh
- js
- php
- php
- json
3 changes: 2 additions & 1 deletion src/doc/payments/preauthorization/release/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
languages:
- sh
- js
- php
- php
- json
3 changes: 2 additions & 1 deletion src/doc/payments/preauthorization/reserve/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
languages:
- sh
- js
- php
- php
- json

0 comments on commit aec7871

Please sign in to comment.