Download the PHP package magicway/momagic-laravel without Composer
On this page you can find all versions of the php package magicway/momagic-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download magicway/momagic-laravel
More information about magicway/momagic-laravel
Files in magicway/momagic-laravel
Package momagic-laravel
Short Description Laravel library for Magic way payment gateway
License MIT
Informations about the package momagic-laravel
MagicWay Payment Gateway Integration - Laravel Library
Tags: e-commerce, magicway, payment-gateway, checkout, shop, cart, local-payment-gateway, international-payment-gateway
Requires: PHP >= 7.2, Laravel >= 6.0 and MySQL
License: MIT
Core Library Directory Structure
Instructions:
-
Step 1: Download and extract the library files.
-
Step 2: Copy the
Library
folder and put it in the laravel project'sapp/
directory. If needed, then runcomposer dump -o
. - Step 3: Copy the
config/magic_way.php
file into your project'sconfig/
folder.
Now, we have already copied the core library files. Let's do copy some other helpers files that is provided to understand the integration process. The other files are not related to core library.
-
Optional: If you later encounter issues with session destroying after redirect, you can set in your
config/session.php
file. -
Step 4: Add
STORE_ID
,STORE_PASSWORD
,STORE_USER
andSTORE_EMAIL
values on your project's.env
file. -
Step 5: Copy the
MoMagicPaymentController
into your project'sControllers
folder. -
Step 6: Copy the defined routes from
routes/web.php
into your project's route file. - Step 7: Add the below routes into the
$excepts
array ofVerifyCsrfToken
middleware.
protected $except = [ '/success','/fail','/cancel','/ipn' ];
- Step 8: Copy the
resources/views/*.blade.php
files into your project'sresources/views/
folder.
Now, let's go to the main integration part.
-
Step 9: Create a database and import the orders.sql table schema.
-
Step 10: For Checkout integration, you can update the MoMagicPaymentController->checkout() or use a different method according to your need. We have provided a basic sample from where you can kickstart the payment gateway integration.
-
Step 11: When user click Continue to checkout button, redirect customer to payment channel selection page.
- Step 12: For redirecting action from MagicWay Payment gateway, we have also provided sample success(), fail(), cancel() and ipn() methods in MoMagicPaymentController. You can update those methods according to your need.
Contributors
Arifur Rahman