Browse Source

线上订单支付价格修复

master
weigang 5 years ago
parent
commit
d1cf18dcdb
  1. 8
      app/Controller/PaymentController.php

8
app/Controller/PaymentController.php

@ -57,11 +57,15 @@ class PaymentController extends BaseController
return $this->result(ErrorCode::PAY_FAILURE, $data,'同一订单不能存在多个特价商品');
}
$payMoney = bcmul(floatval($orderMain->money), 100, 0);
if (env('APP_ENV') != 'prod') {
$payMoney = 0.01;
}
$result = $app->order->unify([
'body' => '懒族生活 - 外卖下单',
'out_trade_no' => $orderMain->global_order_id,
'total_fee' => bcmul(floatval($orderMain->money), 100, 0),
// 'total_fee' => 1,
'total_fee' => $payMoney,
'notify_url' => config('site_host') . '/wechat/notify/wxminionline',
'trade_type' => 'JSAPI',
'openid' => $data['openid'],

Loading…
Cancel
Save