11# Laravel Iranian Online Payment Component
2- Online Payment Module handler for Laravel 5+ and 6 known as LaraPay component completely compatible with [ BankTest] ( http://banktest.ir ) simulator .
3- Larapay integrated all Iranian payment gateways to one component.
2+ Online Payment Module handler for Laravel 5+ and 6 known as LaraPay component completely compatible with [ BankTest] ( http://banktest.ir ) sandbox .
3+ Larapay integrated all Iranian payment gateways into one component.
44
55Here are a few short examples of what you can do:
66* create new transaction form your order model and generate bank form
77``` php
88 $transaction = $order->createTransaction(Bank::MELLAT);
99 $form = $transaction->generateForm();
1010```
11- * handle bank callback
11+ * handle gateway callback (verify/settle/...)
1212``` php
1313 $transaction = Larapay::verifyTransaction($request);
14- //if bank support reverse
14+ //if the gateway supports reverse method
1515 $transaction->reverseTransaction();
1616 $order = $transaction->model;
1717```
1818* get order transaction information
1919``` php
20+ $allTransactions = $order->transations;
2021 $accomplishedTransactions = $order->accomplishedTransactions;
21- $allTransactions = $order->transation;
2222 $isPaid = $order->isPaid();
2323 $paidAmount = $order->paidAmount();
2424```
2525
26- ## What is Banktest?
27- - [ BankTest] ( http://banktest.ir ) is a sandbox service for all Iranian online payment gateways
28- - [ بانک تست] ( http://banktest.ir ) یک سرویس شبیه ساز درگاه های پرداخت آنلاین ایرانی برای اهداف توسعه و تست نرم افزار می باشد
29-
30-
31- ## Currenctly support:
26+ ## Currenctly supports:
3227
3328- Mellat Bank Gateway - درگاه بانک ملت لاراول
3429- Saman Bank Gateway - درگاه بانک سامان لاراول
@@ -41,6 +36,11 @@ Here are a few short examples of what you can do:
4136- ...
4237- Other gateways, coming soon... لطفا شما هم در تکمیل پکیج مشارکت کنید
4338
39+ #### But what is Banktest sandbox?
40+ - [ BankTest] ( http://banktest.ir ) is a sandbox service for all Iranian online payment gateways
41+ - [ بانک تست] ( http://banktest.ir ) یک سرویس شبیه ساز درگاه های پرداخت آنلاین ایرانی برای اهداف توسعه و تست نرم افزار می باشد
42+
43+
4444## Requirements
4545Larapay Version 6+ required PHP 7+
4646
@@ -76,11 +76,11 @@ php artisan migrate
7676## Configuration
7777If you complete installation step correctly, you can find Larapay config file as larapay.php in you project config file.
7878
79- for sandbox you should set ``` LARAPAY_MODE=development ``` in your .env file otherwise set ``` LARAPAY_MODE=production ```
79+ For sandbox (banktest) you should set ``` LARAPAY_MODE=development ``` in your .env file otherwise set ``` LARAPAY_MODE=production ```
8080
81- if you choose development mode, Larapay use banktest.ir for payment gateway.
81+ If you choose development mode, Larapay use banktest.ir as it's payment gateway.
8282
83- set your bank username or password in your .env. here are some example:
83+ Set your gateway(s) configs in your .env file. Here are some example:
8484``` ini
8585LARAPAY_MODE =development
8686
@@ -100,7 +100,7 @@ For example create a POST route in routes folder, web.php like this:
100100Route::post('payment/callback', 'YourController@handleCallback')->name('payment.callback');
101101```
102102
103- and set route name in .env file:
103+ then set the route name in .env file:
104104
105105``` ini
106106LARAPAY_PAYMENT_CALLBACK =payment.callback
0 commit comments