Skip to content

Latest commit

 

History

History
106 lines (75 loc) · 3.06 KB

File metadata and controls

106 lines (75 loc) · 3.06 KB

This is my package mena-payment-gateways-for-laravel

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Package for payment gateway providers that operates in the Middle East and North Africa (MENA) region.

Installation

You can install the package via composer:

composer require saeedeldeeb/mena-payment-gateways-for-laravel

You can publish the config file with:

php artisan vendor:publish --tag="mena-payment-gateways-for-laravel-config"

This is the contents of the published config file:

return [
'default' => env('DEFAULT_GATEWAY', 'urway'),
'urway' => [
        'auth' => [
            'terminal_id' => env('URWAY_TERMINAL_ID'),
            'password' => env('URWAY_PASSWORD'),
            .....
                ]
            ]
    ......,
    'default_currency' => env('DEFAULT_CURRENCY', "SAR")
];

Usage

$paymentGateway = new  \Saeedeldeeb\PaymentGateway\Facades\PaymentGateway();
$paymentGateway->gateway()->setOrder($order)->getPaymentForm();

The $order you pass to the payment gateway must adhere to the PayableOrder-interface:

interface PayableOrder {

    /**
     * @return string
     */
    public function getPaymentOrderId();

    /**
     * @return double
     */
    public function getPaymentAmount();

    /**
     * @return string
     */
    public function getPaymentDescription();

    /**
     * @return string
     */
    public function getCustomerEmail();

    /**
     * @return string
     */
    public function getCustomerLanguage();


} 

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.