Passed
Push — master ( 6024d1...8c7cfd )
by Afzalur Rahman
03:48
created
database/migrations/2022_09_11_134122_create_orders_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      */
25 25
     public function up()
26 26
     {
27
-        Schema::create('orders', function (Blueprint $table) {
27
+        Schema::create('orders', function(Blueprint $table) {
28 28
             $table->id();
29 29
             $table->string('name', 191)->nullable();
30 30
             $table->string('email', 100)->nullable();
Please login to merge, or discard this patch.
src/Http/publish-routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 $prefix = config('sslcommerz.route_prefix');
6 6
 
7 7
 // SSLaraCommerz Start
8
-Route::group(['prefix' => $prefix], function () {
8
+Route::group(['prefix' => $prefix], function() {
9 9
     Route::get('/example1', [\App\Http\Controllers\SslCommerzPaymentController::class, 'exampleEasyCheckout']);
10 10
     Route::get('/example2', [\App\Http\Controllers\SslCommerzPaymentController::class, 'exampleHostedCheckout']);
11 11
 
Please login to merge, or discard this patch.
src/Http/Controllers/SslCommerzPaymentController.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -247,10 +247,12 @@
 block discarded – undo
247 247
     public function ipn(Request $request)
248 248
     {
249 249
         #Received all the payement information from the gateway
250
-        if ($request->input('tran_id')) #Check transation id is posted or not.
250
+        if ($request->input('tran_id')) {
251
+            #Check transation id is posted or not.
251 252
         {
252 253
 
253 254
             $tran_id = $request->input('tran_id');
255
+        }
254 256
 
255 257
             #Check order status in order tabel against the transaction id or order id.
256 258
             $order_details = DB::table('orders')
Please login to merge, or discard this patch.
src/Http/Controllers/PublishSslCommerzPaymentController.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -246,10 +246,12 @@
 block discarded – undo
246 246
     public function ipn(Request $request)
247 247
     {
248 248
         #Received all the payement information from the gateway
249
-        if ($request->input('tran_id')) #Check transation id is posted or not.
249
+        if ($request->input('tran_id')) {
250
+            #Check transation id is posted or not.
250 251
         {
251 252
 
252 253
             $tran_id = $request->input('tran_id');
254
+        }
253 255
 
254 256
             #Check order status in order tabel against the transaction id or order id.
255 257
             $order_details = DB::table('orders')
Please login to merge, or discard this patch.
src/Http/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 $prefix = config('sslcommerz.route_prefix');
6 6
 
7 7
 // SSLaraCommerz Start
8
-Route::group(['prefix' => $prefix], function () {
8
+Route::group(['prefix' => $prefix], function() {
9 9
     Route::get('/example1', [\AfzalSabbir\SSLaraCommerz\Http\Controllers\SslCommerzPaymentController::class, 'exampleEasyCheckout']);
10 10
     Route::get('/example2', [\AfzalSabbir\SSLaraCommerz\Http\Controllers\SslCommerzPaymentController::class, 'exampleHostedCheckout']);
11 11
 
Please login to merge, or discard this patch.
src/SSLaraCommerzServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     private function registerRoutes()
37 37
     {
38
-        Route::group($this->routeConfiguration(), function () {
38
+        Route::group($this->routeConfiguration(), function() {
39 39
             $this->loadRoutesFrom(__DIR__ . '/Http/routes.php');
40 40
         });
41 41
     }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     public function register()
63 63
     {
64 64
         // Register facade
65
-        $this->app->singleton('sslaracommerz', function () {
65
+        $this->app->singleton('sslaracommerz', function() {
66 66
             return new SSLaraCommerz;
67 67
         });
68 68
     }
Please login to merge, or discard this patch.
src/Library/SslCommerz/AbstractSslCommerz.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,13 +93,13 @@
 block discarded – undo
93 93
         } else {
94 94
             if (!empty($sslcz['GatewayPageURL'])) {
95 95
                 // this is important to show the popup, return or echo to send json response back
96
-                if(!empty($this->getApiUrl()) && $this->getApiUrl() == 'https://securepay.sslcommerz.com') {
96
+                if (!empty($this->getApiUrl()) && $this->getApiUrl() == 'https://securepay.sslcommerz.com') {
97 97
                     $response = json_encode(['status' => 'SUCCESS', 'data' => $sslcz['GatewayPageURL'], 'logo' => $sslcz['storeLogo']]);
98 98
                 } else {
99 99
                     $response = json_encode(['status' => 'success', 'data' => $sslcz['GatewayPageURL'], 'logo' => $sslcz['storeLogo']]);
100 100
                 }
101 101
             } else {
102
-                if (strpos($sslcz['failedreason'],'Store Credential') === false) {
102
+                if (strpos($sslcz['failedreason'], 'Store Credential') === false) {
103 103
                     $message = $sslcz['failedreason'];
104 104
                 } else {
105 105
                     $message = "Check the SSLCZ_TESTMODE and SSLCZ_STORE_PASSWORD value in your .env; DO NOT USE MERCHANT PANEL PASSWORD HERE.";
Please login to merge, or discard this patch.