|
|
@@ -12,6 +12,7 @@ namespace app\controller\api\v1;
|
|
|
|
|
|
use app\Request;
|
|
|
use crmeb\basic\BaseController;
|
|
|
+use crmeb\services\WithdrawService;
|
|
|
|
|
|
/**
|
|
|
* 公共类
|
|
|
@@ -22,6 +23,11 @@ class WithdrawController extends BaseController
|
|
|
{
|
|
|
public function notify(Request $request)
|
|
|
{
|
|
|
- @file_put_contents('notify.txt', json_encode($request->post()) . PHP_EOL, FILE_APPEND);
|
|
|
+
|
|
|
+ $data = $request->post();
|
|
|
+ if ($data['return_code'] == 'SUCCESS') {
|
|
|
+ $info = WithdrawService::init()::decode($data['resoult']);
|
|
|
+ @file_put_contents('notify.txt', json_encode($info) . PHP_EOL, FILE_APPEND);
|
|
|
+ }
|
|
|
}
|
|
|
}
|