efps-version
ljl 2 years ago
parent 47fbd33e5b
commit fddf74d67b

@ -116,7 +116,7 @@ class PaymentService extends AbstractService
return 'SUCCESS'; return 'SUCCESS';
} }
protected function buildNotifyParams(Order $roder, App $app) { protected function buildNotifyParams(Order $order, App $app) {
$params = [ $params = [
'app_id' => $order->app_id, 'app_id' => $order->app_id,
'nonce_str' => StringHelper::getRandomString(32), 'nonce_str' => StringHelper::getRandomString(32),
@ -124,14 +124,14 @@ class PaymentService extends AbstractService
]; ];
$bizData = [ $bizData = [
'code' => 'SUCCESS', 'code' => 'SUCCESS',
'order_no' => $roder->order_no, 'order_no' => $order->order_no,
'out_order_no' => $roder->out_order_no, 'out_order_no' => $order->out_order_no,
'currency' => $roder->currency, 'currency' => $order->currency,
'total_amount' => $roder->amount, 'total_amount' => $order->amount,
'order_time' => date('YmdHis', strtotime($roder->created_at)), 'order_time' => date('YmdHis', strtotime($order->created_at->timestamp)),
'pay_time' => date('YmdHis', strtotime($roder->payed_at)), 'pay_time' => date('YmdHis', strtotime($order->created_at->timestamp)),
'exchange_rate' => $roder->exchange_rate, 'exchange_rate' => $order->exchange_rate,
'cny_amount' => $roder->cny_amount, 'cny_amount' => $order->cny_amount,
]; ];
$params['data'] = json_encode($bizData); $params['data'] = json_encode($bizData);
$params['sign'] = PlatformSigner::sign($params, $app->app_key); $params['sign'] = PlatformSigner::sign($params, $app->app_key);

Loading…
Cancel
Save