@@ -30,6 +30,14 @@ You'll then need to run `composer install` or `composer update` to download it a
3030
3131Once Laravel Paystack is installed, you need to register the service provider. Open up ` config/app.php ` and add the following to the ` providers ` key.
3232
33+ ``` php
34+ 'providers' => [
35+ ...
36+ Unicodeveloper\Paystack\PaystackServiceProvider::class,
37+ ...
38+ ]
39+ ```
40+
3341> If you use ** Laravel >= 5.5** you can skip this step and go to [ ** ` configuration ` ** ] ( https://github.com/unicodeveloper/laravel-paystack#configuration )
3442
3543* ` Unicodeveloper\Paystack\PaystackServiceProvider::class `
@@ -197,11 +205,16 @@ Let me explain the fluent methods this package provides a bit here.
197205/**
198206 * This fluent method does all the dirty work of sending a POST request with the form data
199207 * to Paystack Api, then it gets the authorization Url and redirects the user to Paystack
200- * Payment Page. I abstracted all of it, so you don't have to worry about that.
208+ * Payment Page. We've abstracted all of it, so you don't have to worry about that.
201209 * Just eat your cookies while coding!
202210 */
203211Paystack::getAuthorizationUrl()->redirectNow();
204212
213+ /**
214+ * Alternatively, use the helper.
215+ */
216+ paystack()->getAuthorizationUrl()->redirectNow();
217+
205218/**
206219 * This fluent method does all the dirty work of verifying that the just concluded transaction was actually valid,
207220 * It verifies the transaction reference with Paystack Api and then grabs the data returned from Paystack.
@@ -210,55 +223,104 @@ Paystack::getAuthorizationUrl()->redirectNow();
210223 */
211224Paystack::getPaymentData();
212225
226+ /**
227+ * Alternatively, use the helper.
228+ */
229+ paystack()->getPaymentData();
230+
213231/**
214232 * This method gets all the customers that have performed transactions on your platform with Paystack
215233 * @returns array
216234 */
217235Paystack::getAllCustomers();
218236
237+ /**
238+ * Alternatively, use the helper.
239+ */
240+ paystack()->getAllCustomers();
241+
242+
219243/**
220244 * This method gets all the plans that you have registered on Paystack
221245 * @returns array
222246 */
223247Paystack::getAllPlans();
224248
249+ /**
250+ * Alternatively, use the helper.
251+ */
252+ paystack()->getAllPlans();
253+
254+
225255/**
226256 * This method gets all the transactions that have occurred
227257 * @returns array
228258 */
229259Paystack::getAllTransactions();
230260
261+ /**
262+ * Alternatively, use the helper.
263+ */
264+ paystack()->getAllTransactions();
265+
231266/**
232267 * This method generates a unique super secure cryptograhical hash token to use as transaction reference
233268 * @returns string
234269 */
235270Paystack::genTranxRef();
236271
272+ /**
273+ * Alternatively, use the helper.
274+ */
275+ paystack()->genTranxRef();
276+
277+
237278/**
238279* This method creates a subaccount to be used for split payments
239280* @return array
240281*/
241282Paystack::createSubAccount();
242283
284+ /**
285+ * Alternatively, use the helper.
286+ */
287+ paystack()->createSubAccount();
288+
243289
244290/**
245291* This method fetches the details of a subaccount
246292* @return array
247293*/
248294Paystack::fetchSubAccount();
249295
296+ /**
297+ * Alternatively, use the helper.
298+ */
299+ paystack()->fetchSubAccount();
300+
250301
251302/**
252303* This method lists the subaccounts associated with your paystack account
253304* @return array
254305*/
255306Paystack::listSubAccounts();
256307
308+ /**
309+ * Alternatively, use the helper.
310+ */
311+ paystack()->listSubAccounts();
312+
313+
257314/**
258315* This method Updates a subaccount to be used for split payments
259316* @return array
260317*/
261318Paystack::updateSubAccount();
319+
320+ /**
321+ * Alternatively, use the helper.
322+ */
323+ paystack()->updateSubAccount();
262324```
263325
264326A sample form will look like so:
0 commit comments