This is a Laravel package for PayStar payment gateway.
composer require paystar/laravel-ipg
php artisan vendor:publish --tag=paystar-ipg
create()
: return a tokenpayment()
: auto redirect to gatewayverify()
: verify transaction
-
<?php use PayStar\Ipg\Facades\PayStarIpg; PayStarIpg::amount('AMOUNT') // * ->orderId('ORDER_ID') // * ->callbackUrl('CALLBACK_URL') // If You don't use this method, we set this from config ->sign('SIGN') // If You don't use this method, we generate auto a sign ->create();
Option description name customer name phone customer phone mail customer mail description description of order allotment Share per transaction callback_method - wallet_hashid - national_code national code of customer <?php use PayStar\Ipg\Facades\PayStarIpg; PayStarIpg::amount('AMOUNT') // * ->orderId('ORDER_ID') // * ->callbackUrl('CALLBACK_URL') // If You don't use this method, we set this from config ->sign('SIGN') // If You don't use this method, we generate auto a sign ->option([ 'name' => 'Name', 'phone' => 'PHONE', 'mail' => 'MAIL', 'description' => 'DESCRIPTION', 'allotment' => 'ALLOTMENT', 'callback_method' => 'CALLBACK_METHOD', 'wallet_hashid' => 'WALLET_HASHID', 'national_code' => 'NATIONAL_CODE', ]) ->create();
-
<?php use PayStar\Ipg\Facades\PayStarIpg; PayStarIpg::amount('AMOUNT') ->refNum('REF_NUM') ->sign('SIGN') ->verify();
-
<?php use PayStar\Ipg\Facades\PayStarIpg; // Redirect to Gateway PayStarIpg::token('TOKEN')->payment();
<?php
use PayStar\Ipg\Facades\Encryption;
// The Encryption Facade has 3 methods
Encryption::sign($amount, $orderId, $callbackUrl); // Generate a sign with set algorithm in config file
Encryption::algos(); // Show list of hash Algorithms (hash_algos() method)
Encryption::hash($algo, $string, $key, $binary); // use hash_hmac() method