Sfoglia il codice sorgente

fix status check

tags/2.0.3
0nepeop1e 4 anni fa
parent
commit
b579af0e44
1 ha cambiato i file con 8 aggiunte e 3 eliminazioni
  1. 8
    3
      src/RazerPayDriver.php

+ 8
- 3
src/RazerPayDriver.php Vedi File

@@ -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
         }

Loading…
Annulla
Salva