Browse Source

fix status check

tags/2.0.3
0nepeop1e 4 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
     {
155
     {
156
         if ($request->request->has('status')) {
156
         if ($request->request->has('status')) {
157
             $status = $request->request->get('status');
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
         } else {
166
         } else {
162
             return null;
167
             return null;
163
         }
168
         }

Loading…
Cancel
Save