ljl 1 year ago
parent 2558522c77
commit 7c6993473d

@ -77,8 +77,8 @@ class PaymentController extends AbstractController
public function payment(RequestInterface $request) {
[$app, $data, $token] = $this->parseReqest($request, UnbindCardRequest::class);
$url = $this->paymentService->payment($data, $app, $token);
return $this->success(['url' => $url]);
$data = $this->paymentService->payment($data, $app, $token);
return $this->success($data);
}
public function transferPay(RequestInterface $request) {

@ -210,12 +210,7 @@ class Baofu
$data['callType'] = $params['callType'];
$res = base64_decode($this->api('payment', $data));
if(self::PEYMENT_PAID_TYPE[$params['paidType']]){
$res = json_decode($res, true);
if($res['body']){
return $res['body'];
}
}
return json_decode($res, true);
}
public function recharge($params, $token)

@ -102,7 +102,7 @@ class PaymentService extends AbstractService
$order->applied_at = date('Y-m-d H:i:s');
$order->pay_url = $url;
$order->save();
return $url;
return ['url' => $url];
} catch (ApiException $e) {
$order->status = 'APPLY_FAILED';
$order->applied_at = date('Y-m-d H:i:s');
@ -167,9 +167,9 @@ class PaymentService extends AbstractService
], $token);
$order->status = 'APPLY_SUCCESS';
$order->applied_at = date('Y-m-d H:i:s');
$order->acs_no = $result['acsNo'];
$order->acs_no = $result['body'] ?? '';
$order->save();
return $result['acsNo'];
return $result;
} catch (ApiException $e) {
$order->status = 'APPLY_FAILED';
$order->applied_at = date('Y-m-d H:i:s');

Loading…
Cancel
Save