You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// secretKey is not needed if you're not using checkout as a payment method.
24
-
//
22
+
publicKey: publicKey);
25
23
}
26
24
}
27
25
```
28
26
29
-
No other configuration required - the plugin works out of the box.
27
+
No other configuration required—the plugin works out of the box.
30
28
31
29
## :heavy_dollar_sign: Making Payments
32
30
There are two ways of making payment with the plugin.
33
-
1.**Checkout**: This is the easy way; as the plugin handles all the processes involved in making a payment.
34
-
2.**Charge Card**: This is a longer approach; you handle all callbacks and UI states on your own.
31
+
1.**Checkout**: This is the easy way; as the plugin handles all the
32
+
processes involved in making a payment (except transaction
33
+
initialization and verification which should be done from your
34
+
backend).
35
+
2.**Charge Card**: This is a longer approach; you handle all callbacks
36
+
and UI states.
35
37
36
38
### 1. :star2: Checkout (Recommended)
37
-
You initialize a charge object with just an amount, email & accessCode or reference.
38
-
Pass an `accessCode` only when you have [initialized the transaction](https://developers.paystack.co/reference#initialize-a-transaction) from your end otherwise, pass `reference`;
39
+
You initialize a charge object with an amount, email & accessCode or
40
+
reference. Pass an `accessCode` only when you have
41
+
[initialized the transaction](https://developers.paystack.co/reference#initialize-a-transaction)
42
+
from your backend. Otherwise, pass a `reference`.
39
43
40
-
Except you want the user to use a preferred checkout method, pass a one of your choosing.
41
44
42
45
```dart
43
46
Charge charge = Charge()
@@ -46,20 +49,28 @@ There are two ways of making payment with the plugin.
46
49
// or ..accessCode = _getAccessCodeFrmInitialization()
1.b If everything goes well, the initialization request returns a response with an `access_code`.
65
76
You can then create a `Charge` object with the access code and card details. The `charge` is in turn passed to the ` PaystackPlugin.chargeCard()` function for payment:
@@ -96,10 +107,9 @@ You can then create a `Charge` object with the access code and card details. The
0 commit comments