Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 19 additions & 12 deletions dist/doc/payments/payment-methods/qr-event.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,43 @@ const json = `{
"domain": "test",
"status": "success",
"reference": "48rx32f1womvcr4",
"amount": 10000,
"amount": 186677,
"message": "madePayment",
"gateway_response": "Payment successful",
"paid_at": "2018-12-05T15:58:45.000Z",
"created_at": "2018-12-05T15:58:02.000Z",
"paid_at": "2024-08-20T12:41:12.000Z",
"created_at": "2024-08-20T12:39:22.000Z",
"channel": "qr",
"currency": "NGN",
"currency": "ZAR",
"ip_address": "18.130.45.28, 141.101.107.157",
"fees_breakdown": {
"amount": "5514",
"formula": null,
"type": "paystack"
},
"metadata": "",
"log": null,
"fees": null,
"fees": 6342,
"fees_split": null,
"authorization": {
"authorization_code": "AUTH_2b4zs69fgy7qflh",
"bin": "483953",
"last4": "6208",
"exp_month": "12",
"exp_year": "2018",
"exp_year": "2025",
"channel": "qr",
"card_type": "DEBIT",
"bank": "Visa QR",
"country_code": "NG",
"card_type": "CREDIT",
"bank": "ABSA BANK LIMITED, SOUTH AFRICA",
"country_code": "ZA",
"brand": "VISA",
"reusable": false,
"signature": null,
"account_name": "BoJack Horseman"
"account_name": null,
"receiver_bank_account_number": null,
"receiver_bank": null
},
"customer": {
"id": 16787,
"first_name": "I",
"first_name": "Ian",
"last_name": "SURRENDER",
"email": "customer@email.com",
"customer_code": "CUS_ehg851zbxon0bvx",
Expand All @@ -45,7 +52,7 @@ const json = `{
"plan": {},
"subaccount": {},
"subaccount_group": {},
"paidAt": "2018-12-05T15:58:45.000Z"
"paidAt": "2024-08-20T12:41:12.000Z"
}
}`

Expand Down
18 changes: 9 additions & 9 deletions dist/doc/payments/payment-methods/qr.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
const sh = `curl https://api.paystack.co/charge
-H "Authorization: Bearer YOUR_SECRET_KEY"
-H "Content-Type: application/json"
-d '{ "amount": 100,
-d '{ "amount": 1000,
"email": "customer@email.com",
"currency": "NGN",
"currency": "ZAR",
"qr": {
"provider" : "visa"
"provider" : "scan-to-pay"
}
}'
-X POST`

const js = `const https = require('https')

const params = JSON.stringify({
"amount": 100,
"amount": 1000,
"email": "customer@email.com",
"currency": "NGN",
"currency": "ZAR",
"qr": {
"provider" : "visa"
"provider" : "scan-to-pay"
}
})

Expand Down Expand Up @@ -60,11 +60,11 @@ curl_setopt_array($curl, array(
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => [
"amount" => 100,
"amount" => 1000,
"email" => "customer@email.com",
"currency" => "NGN",
"currency" => "ZAR",
"qr" => [
"provider" => "visa"
"provider" => "scan-to-pay"
]
],
CURLOPT_HTTPHEADER => array(
Expand Down
31 changes: 19 additions & 12 deletions src/doc/payments/payment-methods/qr-event/index.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Andrew-Paystack kindly get a fresh response for this. We didn't have QR in SA in 2018, which is the timestamp on the code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it up @damilola-paystack

Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,43 @@
"domain": "test",
"status": "success",
"reference": "48rx32f1womvcr4",
"amount": 10000,
"amount": 186677,
"message": "madePayment",
"gateway_response": "Payment successful",
"paid_at": "2018-12-05T15:58:45.000Z",
"created_at": "2018-12-05T15:58:02.000Z",
"paid_at": "2024-08-20T12:41:12.000Z",
"created_at": "2024-08-20T12:39:22.000Z",
"channel": "qr",
"currency": "NGN",
"currency": "ZAR",
"ip_address": "18.130.45.28, 141.101.107.157",
"fees_breakdown": {
"amount": "5514",
"formula": null,
"type": "paystack"
},
"metadata": "",
"log": null,
"fees": null,
"fees": 6342,
"fees_split": null,
"authorization": {
"authorization_code": "AUTH_2b4zs69fgy7qflh",
"bin": "483953",
"last4": "6208",
"exp_month": "12",
"exp_year": "2018",
"exp_year": "2025",
"channel": "qr",
"card_type": "DEBIT",
"bank": "Visa QR",
"country_code": "NG",
"card_type": "CREDIT",
"bank": "ABSA BANK LIMITED, SOUTH AFRICA",
"country_code": "ZA",
"brand": "VISA",
"reusable": false,
"signature": null,
"account_name": "BoJack Horseman"
"account_name": null,
"receiver_bank_account_number": null,
"receiver_bank": null
},
"customer": {
"id": 16787,
"first_name": "I",
"first_name": "Ian",
"last_name": "SURRENDER",
"email": "customer@email.com",
"customer_code": "CUS_ehg851zbxon0bvx",
Expand All @@ -45,6 +52,6 @@
"plan": {},
"subaccount": {},
"subaccount_group": {},
"paidAt": "2018-12-05T15:58:45.000Z"
"paidAt": "2024-08-20T12:41:12.000Z"
}
}
6 changes: 3 additions & 3 deletions src/doc/payments/payment-methods/qr/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const https = require('https')

const params = JSON.stringify({
"amount": 100,
"amount": 1000,
"email": "customer@email.com",
"currency": "NGN",
"currency": "ZAR",
"qr": {
"provider" : "visa"
"provider" : "scan-to-pay"
}
})

Expand Down
6 changes: 3 additions & 3 deletions src/doc/payments/payment-methods/qr/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => [
"amount" => 100,
"amount" => 1000,
"email" => "customer@email.com",
"currency" => "NGN",
"currency" => "ZAR",
"qr" => [
"provider" => "visa"
"provider" => "scan-to-pay"
]
],
CURLOPT_HTTPHEADER => array(
Expand Down
6 changes: 3 additions & 3 deletions src/doc/payments/payment-methods/qr/index.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
curl https://api.paystack.co/charge
-H "Authorization: Bearer YOUR_SECRET_KEY"
-H "Content-Type: application/json"
-d '{ "amount": 100,
-d '{ "amount": 1000,
"email": "customer@email.com",
"currency": "NGN",
"currency": "ZAR",
"qr": {
"provider" : "visa"
"provider" : "scan-to-pay"
}
}'
-X POST