milyoona/laravel-ipg

A package for milyoona payment gateway and Those for whom time is important

v1.0.2 2021-11-28 14:50 UTC

This package is auto-updated.

Last update: 2024-03-28 20:05:13 UTC


README

Latest Version on Packagist GitHub issues GitHub stars GitHub forks Total Downloads GitHub license

This is a Laravel Package for milyoona payment gateway.

68747470733a2f2f7331392e7069636f66696c652e636f6d2f66696c652f383433373637323538342f6c61726176656c5f6970672e706e673f7261773d74727565

Languages

⬇️ How to install and config milyoona/ipg package?

Install package

composer require milyoona/laravel-ipg

For register in Lumen in bootstrap/app.php

$app->register(Milyoona\Ipg\MilyoonaIpgServiceProvider::class);

Publish configs

php artisan vendor:publish --tag=milyoona_ipg

💎 List of available methods

  • getToken(): gives you a token and url
  • pay(): auto redirect you to gateway
  • verify(): verify your request just one time
  • trace(): trace your request many times

📖 How to use exists methods and options

  • Use getToken() and pay() methods of package

    <?php
    use Milyoona\Ipg\Facades\MilyoonaIpg;
    
    MilyoonaIpg::terminal('YOUR_TERMINAL_ID')
        ->amount('AMOUNT_OF_PRODUCT')
        ->callbackUrl('YOUR_CALLBACK_URL')
        ->getToken(); // or ->pay(); for redirect to gateway page
            
    // If you set the terminal_id and callback_url in config/milyoona_ipg.php you not need to fill this methods.
    MilyoonaIpg::amount('PRICE_OF_PRODUCT')->getToken(); // or ->pay(); for redirect to gateway page
    List of extra option
    Option description
    mobile mobile number of customer
    national_code national code of customer
    order_id order id of product
    card_no limit customer for pay with a specific card number
    description description of order
    How to use this options
    <?php
    use Milyoona\Ipg\Facades\MilyoonaIpg;
    
    MilyoonaIpg::terminal('YOUR_TERMINAL_ID')
        ->amount('PRICE_OF_PRODUCT')
        ->callbackUrl('YOUR_CALLBACK_URL')
        ->option([
            'mobile' => 'MOBILE',
            'national_code' => 'NATIONAL_CODE',
            'order_id' => 'ORDER_ID',
            'card_no' => 'CARD_NUMBER',
            'description' => 'YOUR_DESCRIPTION',
        ])
        ->getToken(); // or ->pay(); for redirect to gateway page
  • Use verify() and trace() methods of package

    <?php
    use Milyoona\Ipg\Facades\MilyoonaIpg;
    
    MilyoonaIpg::terminal('YOUR_TERMINAL_ID')
        ->token('YOUR_TOKEN')
        ->verify(); // or ->trace();
        
    // If you set the terminal_id in config/milyoona_ipg.php you not need to fill this method.
    MilyoonaIpg::token('YOUR_TOKEN')
        ->verify(); // or ->trace();

Built with ❤️ for laravel developers.