composer require mfrouh/arjbank
1- Bank Hosted
2- Merchant
1- Bank Hosted
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);
Success : ["status" => '1', "url" => $url];
<iframe src="{{$url}}" style="width: 100%; height: 100%"></iframe>
Fail : ["status" => '2', "message" => $errorMessage];
2- Merchant
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);
Success : ["status" => '1', "url" => $url];
Fail : ["status" => '2', "message" => $errorMessage];
use MFrouh\ArjBank\Facades\ArjBank;
ArjBank::result($trandata);
Success : ["status" => '1', 'data' => $data];
Fail : ["status" => '2', 'data' => $data];
ARJ_MODE="live" // or "test"
ARJ_TRANPORTAL_ID=""
ARJ_TRANPORTAL_PASSWORD=""
ARJ_RESOURCE_KEY=""
ARJ_CURRENCY_CODE="682"