Skip to content

Commit d305bd7

Browse files
Merge pull request #111 from PaystackOSS/chore/update-qr
Remove unsupported QR Channel
2 parents a99c8c5 + f265722 commit d305bd7

File tree

6 files changed

+56
-42
lines changed

6 files changed

+56
-42
lines changed

dist/doc/payments/payment-methods/qr-event.js

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,43 @@ const json = `{
55
"domain": "test",
66
"status": "success",
77
"reference": "48rx32f1womvcr4",
8-
"amount": 10000,
8+
"amount": 186677,
99
"message": "madePayment",
1010
"gateway_response": "Payment successful",
11-
"paid_at": "2018-12-05T15:58:45.000Z",
12-
"created_at": "2018-12-05T15:58:02.000Z",
11+
"paid_at": "2024-08-20T12:41:12.000Z",
12+
"created_at": "2024-08-20T12:39:22.000Z",
1313
"channel": "qr",
14-
"currency": "NGN",
14+
"currency": "ZAR",
1515
"ip_address": "18.130.45.28, 141.101.107.157",
16+
"fees_breakdown": {
17+
"amount": "5514",
18+
"formula": null,
19+
"type": "paystack"
20+
},
1621
"metadata": "",
1722
"log": null,
18-
"fees": null,
23+
"fees": 6342,
1924
"fees_split": null,
2025
"authorization": {
2126
"authorization_code": "AUTH_2b4zs69fgy7qflh",
2227
"bin": "483953",
2328
"last4": "6208",
2429
"exp_month": "12",
25-
"exp_year": "2018",
30+
"exp_year": "2025",
2631
"channel": "qr",
27-
"card_type": "DEBIT",
28-
"bank": "Visa QR",
29-
"country_code": "NG",
32+
"card_type": "CREDIT",
33+
"bank": "ABSA BANK LIMITED, SOUTH AFRICA",
34+
"country_code": "ZA",
3035
"brand": "VISA",
3136
"reusable": false,
3237
"signature": null,
33-
"account_name": "BoJack Horseman"
38+
"account_name": null,
39+
"receiver_bank_account_number": null,
40+
"receiver_bank": null
3441
},
3542
"customer": {
3643
"id": 16787,
37-
"first_name": "I",
44+
"first_name": "Ian",
3845
"last_name": "SURRENDER",
3946
"email": "[email protected]",
4047
"customer_code": "CUS_ehg851zbxon0bvx",
@@ -45,7 +52,7 @@ const json = `{
4552
"plan": {},
4653
"subaccount": {},
4754
"subaccount_group": {},
48-
"paidAt": "2018-12-05T15:58:45.000Z"
55+
"paidAt": "2024-08-20T12:41:12.000Z"
4956
}
5057
}`
5158

dist/doc/payments/payment-methods/qr.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
const sh = `curl https://api.paystack.co/charge
22
-H "Authorization: Bearer YOUR_SECRET_KEY"
33
-H "Content-Type: application/json"
4-
-d '{ "amount": 100,
4+
-d '{ "amount": 1000,
55
"email": "[email protected]",
6-
"currency": "NGN",
6+
"currency": "ZAR",
77
"qr": {
8-
"provider" : "visa"
8+
"provider" : "scan-to-pay"
99
}
1010
}'
1111
-X POST`
1212

1313
const js = `const https = require('https')
1414
1515
const params = JSON.stringify({
16-
"amount": 100,
16+
"amount": 1000,
1717
"email": "[email protected]",
18-
"currency": "NGN",
18+
"currency": "ZAR",
1919
"qr": {
20-
"provider" : "visa"
20+
"provider" : "scan-to-pay"
2121
}
2222
})
2323
@@ -60,11 +60,11 @@ curl_setopt_array($curl, array(
6060
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
6161
CURLOPT_CUSTOMREQUEST => "POST",
6262
CURLOPT_POSTFIELDS => [
63-
"amount" => 100,
63+
"amount" => 1000,
6464
"email" => "[email protected]",
65-
"currency" => "NGN",
65+
"currency" => "ZAR",
6666
"qr" => [
67-
"provider" => "visa"
67+
"provider" => "scan-to-pay"
6868
]
6969
],
7070
CURLOPT_HTTPHEADER => array(

src/doc/payments/payment-methods/qr-event/index.json

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,43 @@
55
"domain": "test",
66
"status": "success",
77
"reference": "48rx32f1womvcr4",
8-
"amount": 10000,
8+
"amount": 186677,
99
"message": "madePayment",
1010
"gateway_response": "Payment successful",
11-
"paid_at": "2018-12-05T15:58:45.000Z",
12-
"created_at": "2018-12-05T15:58:02.000Z",
11+
"paid_at": "2024-08-20T12:41:12.000Z",
12+
"created_at": "2024-08-20T12:39:22.000Z",
1313
"channel": "qr",
14-
"currency": "NGN",
14+
"currency": "ZAR",
1515
"ip_address": "18.130.45.28, 141.101.107.157",
16+
"fees_breakdown": {
17+
"amount": "5514",
18+
"formula": null,
19+
"type": "paystack"
20+
},
1621
"metadata": "",
1722
"log": null,
18-
"fees": null,
23+
"fees": 6342,
1924
"fees_split": null,
2025
"authorization": {
2126
"authorization_code": "AUTH_2b4zs69fgy7qflh",
2227
"bin": "483953",
2328
"last4": "6208",
2429
"exp_month": "12",
25-
"exp_year": "2018",
30+
"exp_year": "2025",
2631
"channel": "qr",
27-
"card_type": "DEBIT",
28-
"bank": "Visa QR",
29-
"country_code": "NG",
32+
"card_type": "CREDIT",
33+
"bank": "ABSA BANK LIMITED, SOUTH AFRICA",
34+
"country_code": "ZA",
3035
"brand": "VISA",
3136
"reusable": false,
3237
"signature": null,
33-
"account_name": "BoJack Horseman"
38+
"account_name": null,
39+
"receiver_bank_account_number": null,
40+
"receiver_bank": null
3441
},
3542
"customer": {
3643
"id": 16787,
37-
"first_name": "I",
44+
"first_name": "Ian",
3845
"last_name": "SURRENDER",
3946
"email": "[email protected]",
4047
"customer_code": "CUS_ehg851zbxon0bvx",
@@ -45,6 +52,6 @@
4552
"plan": {},
4653
"subaccount": {},
4754
"subaccount_group": {},
48-
"paidAt": "2018-12-05T15:58:45.000Z"
55+
"paidAt": "2024-08-20T12:41:12.000Z"
4956
}
5057
}

src/doc/payments/payment-methods/qr/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
const https = require('https')
22

33
const params = JSON.stringify({
4-
"amount": 100,
4+
"amount": 1000,
55
"email": "[email protected]",
6-
"currency": "NGN",
6+
"currency": "ZAR",
77
"qr": {
8-
"provider" : "visa"
8+
"provider" : "scan-to-pay"
99
}
1010
})
1111

src/doc/payments/payment-methods/qr/index.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
1010
CURLOPT_CUSTOMREQUEST => "POST",
1111
CURLOPT_POSTFIELDS => [
12-
"amount" => 100,
12+
"amount" => 1000,
1313
"email" => "[email protected]",
14-
"currency" => "NGN",
14+
"currency" => "ZAR",
1515
"qr" => [
16-
"provider" => "visa"
16+
"provider" => "scan-to-pay"
1717
]
1818
],
1919
CURLOPT_HTTPHEADER => array(
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
curl https://api.paystack.co/charge
22
-H "Authorization: Bearer YOUR_SECRET_KEY"
33
-H "Content-Type: application/json"
4-
-d '{ "amount": 100,
4+
-d '{ "amount": 1000,
55
"email": "[email protected]",
6-
"currency": "NGN",
6+
"currency": "ZAR",
77
"qr": {
8-
"provider" : "visa"
8+
"provider" : "scan-to-pay"
99
}
1010
}'
1111
-X POST

0 commit comments

Comments
 (0)