PHP code example of mfrouh / arjbank

1. Go to this page and download the library: Download mfrouh/arjbank library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mfrouh / arjbank example snippets



use MFrouh\ArjBank\Facades\ArjBank;

 $optional_data = [
    "udf1" => null,
    "udf2" => null,
    "udf3" => null,
    "udf4" => null,
    "udf5" => null,
 ];

 ArjBank::bankHostedPayment($amount, 'response-url', 'error-url' , $optional_data);



use MFrouh\ArjBank\Facades\ArjBank;

 $card_details = [
     "expYear" => (string) '20'.request('expiry_year'),
     "expMonth" => (string) request('expiry_month'),
     "member" => (string) request('card_holder'),
     "cvv2" => (string) request('cvv'),
     "cardNo" => (string) request('card_number'),
     "cardType" => "C",
 ];

  $optional_data = [
    "udf1" => null,
    "udf2" => null,
    "udf3" => null,
    "udf4" => null,
    "udf5" => null,
 ];

 ArjBank::merchantPayment($card_details , $amount, 'response-url', 'error-url', $optional_data);



use MFrouh\ArjBank\Facades\ArjBank;

 ArjBank::result($trandata);