ahyadessam/payfort

laravel payfort integration

1.0.2 2017-11-28 10:32 UTC

This package is not auto-updated.

Last update: 2024-05-26 02:14:07 UTC


README

    • This package is not a official package from PayFort just my develop *
  • it's a laravel package for PayFort Integration

1- Installation

  1. Require the package using composer:

    composer require ahyadessam/payfort
    
  2. Add the service provider to the providers in config/app.php:

    Payfort\PayfortServiceProvider::class,
  3. Add alias provider to the aliases in config/app.php:

    'PayFort' => Payfort\PayFortFacade::class,
  4. Publish the public assets:

    php artisan vendor:publish
    
  5. Configure your PayFort account data in config/payfort.php:

2- Content Methods

  • RedirectionPay : Go to payment page.
  • SADAD : Got to SADAD page.
  • statusMsg : Return what status number mean.

Parameters is needed

You can lookup PayFort Documentations on this URL PayFort Documentations

Example for payment page

use PayFort;

$requestParams = array(
  'merchant_reference' => '11',
  'amount' => '1000',
  'currency' => 'SAR',
  'customer_email' => 'test@payfort.com',
  'order_description' => 'iPhone 6-S',
  'return_url'    => url('test_r')
);
PayFort::RedirectionPay($requestParams);

3- Return URL Configuration

You must add return URL route to app/Http/Middleware/VerifyCsrfToken.php to allow to it receive POST without token

4- Contact

for any question you can contact with me on twitter @AhyadEssam, thanks