Browse Source

fix status check

tags/2.0.3
0nepeop1e 3 years ago
parent
commit
b579af0e44
1 changed files with 8 additions and 3 deletions
  1. 8
    3
      src/RazerPayDriver.php

+ 8
- 3
src/RazerPayDriver.php View 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…
Cancel
Save