File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -80,9 +80,9 @@ php artisan migrate
8080## Configuration
8181If you complete installation step correctly, you can find Larapay config file as larapay.php in you project config file.
8282
83- For sandbox (banktest) you should set ``` LARAPAY_MODE=development ``` in your .env file otherwise set ``` LARAPAY_MODE=production `` `
83+ For sandbox (banktest) you should set ` LARAPAY_MODE=development ` in your .env file otherwise set ` LARAPAY_MODE=production `
8484
85- If you choose development mode, Larapay use banktest.ir as it's payment gateway.
85+ If you choose development mode, Larapay use banktest.ir as its payment gateway.
8686
8787Set your gateway(s) configs in your .env file. Here are some example:
8888``` ini
Original file line number Diff line number Diff line change 44
55 /*
66 |--------------------------------------------------------------------------
7- | PhpMonsters e-payment component`s operation mode
7+ | PhpMonsters e-payment components operation mode
88 |--------------------------------------------------------------------------
99 |
1010 | *** very important config ***
198198 ),
199199 ],
200200 ],
201+
201202 /*
202203 |--------------------------------------------------------------------------
203204 | Route name for handle payment callback
204205 |--------------------------------------------------------------------------
205206 */
206-
207207 'payment_callback ' => env ('LARAPAY_PAYMENT_CALLBACK ' , '' )
208208];
Original file line number Diff line number Diff line change @@ -10,11 +10,9 @@ class CreateLarapayTransactionTable extends Migration
1010 /**
1111 * Run the migrations.
1212 */
13- public function up()
13+ public function up(): void
1414 {
1515 Schema::create('larapay_transactions', function (Blueprint $table) {
16-
17- //primary key
1816 $table->increments('id');
1917
2018 //morph to model like order or user
@@ -40,11 +38,11 @@ class CreateLarapayTransactionTable extends Migration
4038 $table->text('description')->nullable();
4139 $table->bigInteger('amount')->default(0);
4240
43- if (env('DB_CONNECTION ') == 'pgsql') { // for POSTGRESQL
41+ if (config('database.default ') == 'pgsql') {
4442 $table->jsonb('extra_params')->nullable()->default('{}');
4543 $table->jsonb('additional_data')->nullable()->default('{}');
4644 $table->jsonb('sharing')->nullable()->default('{}');
47- } else { // for MYSQL
45+ } else {
4846 $table->jsonb('extra_params')->nullable();
4947 $table->jsonb('additional_data')->nullable();
5048 $table->jsonb('sharing')->nullable();
@@ -59,7 +57,7 @@ class CreateLarapayTransactionTable extends Migration
5957 /**
6058 * Reverse the migrations.
6159 */
62- public function down()
60+ public function down(): void
6361 {
6462 Schema::dropIfExists('larapay_transactions');
6563 }
You can’t perform that action at this time.
0 commit comments