-
-
Notifications
You must be signed in to change notification settings - Fork 4
1. Prerequisites
-
Curl needs to be installed & enabled for using this package , high chances are that you will already have the same but make sure to cross check
-
Execute all the steps in the installation guide
-
Publish & Fill in all the configuration details in the config file (laravelmojo.php) in your config directory
-
Publish & Run the migrations for this package
-
Make sure when you launch your app in the production environment , change the Key, token & subdomain in the config file to instamojo's production values
-
This page explains the implementation , for how to access the details stored , head on to the next page Retrieving the records
-
Add the following at the top of every controller in which you want to use the package methods
use Lubus\Mojo\Mojo;
-
Since users phone number is required , the package assumes you have added it in the users table and the same is available in the "$users" collection/object/instance whatever you term it for your understanding. Since its a single extra field other then the default in the laravel users migration , we are expecting you to add it in the same and not pass it as a different parameter. Thanks for bearing with us :)
-
If you want use the 2 models for the tables created with the shipped migrations make sure to use them at the top as follows
use Lubus\Mojo\Models\MojoPaymentDetails;
use Lubus\Mojo\Models\MojoRefundDetails;
Completed the prerequisites,so lets dig in to accepting & processing payments on the next page