File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,25 @@ class PaymentController extends Controller
159
159
}
160
160
}
161
161
```
162
+ Let me explain the two main fluent methods a bit here.
163
+
164
+ ``` php
165
+ /**
166
+ * This fluent method does all the dirty work of sending a POST request with the form data
167
+ * to Paystack Api, then it gets the authorization Url and redirects the user to Paystack
168
+ * Payment Page. I abstracted all of it, so you don't have to worry about that.
169
+ * Just eat your cookies :cookie: while coding!
170
+ */
171
+ Paystack::getAuthorizationUrl()->redirectNow();
172
+
173
+ /**
174
+ * This fluent method does all the dirty work of verifying that the just concluded transaction was actually valid,
175
+ * It verifies the transaction reference with Paystack Api and then grabs the data returned from Paystack.
176
+ * In that data, we have a lot of good stuff, especially the authorisation code that you can save in your db
177
+ * to allow for easy recurrent subscription.
178
+ */
179
+ Paystack::getPaymentData();
180
+ ```
162
181
163
182
A sample form will look like so:
164
183
You can’t perform that action at this time.
0 commit comments