Pārlūkot izejas kodu

fix status check

tags/2.0.3
0nepeop1e 4 gadus atpakaļ
vecāks
revīzija
b579af0e44
1 mainītis faili ar 8 papildinājumiem un 3 dzēšanām
  1. 8
    3
      src/RazerPayDriver.php

+ 8
- 3
src/RazerPayDriver.php Parādīt failu

@@ -155,9 +155,14 @@ class RazerPayDriver implements PaymentGatewayDriver
155 155
     {
156 156
         if ($request->request->has('status')) {
157 157
             $status = $request->request->get('status');
158
-            return $status == '00' ? Payment::SUCCESS :
159
-                $status == '11' ? Payment::FAILED :
160
-                    Payment::PENDING;
158
+            switch ($status){
159
+                case '00':
160
+                    return Payment::SUCCESS;
161
+                case '11':
162
+                    return Payment::FAILED;
163
+                default:
164
+                    return Payment::PENDING;
165
+            }
161 166
         } else {
162 167
             return null;
163 168
         }

Notiek ielāde…
Atcelt
Saglabāt