Browse Source

fix callback response

tags/1.0
0nepeop1e 4 years ago
parent
commit
40adf5fee1
2 changed files with 3 additions and 3 deletions
  1. 1
    1
      .idea/workspace.xml
  2. 2
    2
      src/DummyPayDriver.php

+ 1
- 1
.idea/workspace.xml View File

71
       <option name="number" value="Default" />
71
       <option name="number" value="Default" />
72
       <option name="presentableId" value="Default" />
72
       <option name="presentableId" value="Default" />
73
       <updated>1600830685900</updated>
73
       <updated>1600830685900</updated>
74
-      <workItem from="1600830687029" duration="2385000" />
74
+      <workItem from="1600830687029" duration="2597000" />
75
     </task>
75
     </task>
76
     <servers />
76
     <servers />
77
   </component>
77
   </component>

+ 2
- 2
src/DummyPayDriver.php View File

41
     public function verifyGatewayCallback(Request $request, Response &$response = null): bool
41
     public function verifyGatewayCallback(Request $request, Response &$response = null): bool
42
     {
42
     {
43
         if($request->query->has('status')){
43
         if($request->query->has('status')){
44
-            Res::redirectTo($this->return_url);
44
+            $response = Res::redirectTo($this->return_url);
45
             return $request->query->get('status') == 'success';
45
             return $request->query->get('status') == 'success';
46
         } else {
46
         } else {
47
             $order_id = $request->query->get('order_id');
47
             $order_id = $request->query->get('order_id');
51
                 $this->callback_url.'?'.http_build_query(['order_id' => $order_id, 'status' => 'success']),
51
                 $this->callback_url.'?'.http_build_query(['order_id' => $order_id, 'status' => 'success']),
52
                 $this->callback_url.'?'.http_build_query(['order_id' => $order_id, 'status' => 'failed'])
52
                 $this->callback_url.'?'.http_build_query(['order_id' => $order_id, 'status' => 'failed'])
53
             );
53
             );
54
-            Res::make($html);
54
+            $response = Res::make($html);
55
             return false;
55
             return false;
56
         }
56
         }
57
     }
57
     }

Loading…
Cancel
Save