Browse Source

测试

undefined
v-Brocloni 4 years ago
parent
commit
e2fc64e1ed
1 changed files with 10 additions and 2 deletions
  1. +10
    -2
      addons/unishop/controller/Pay.php

+ 10
- 2
addons/unishop/controller/Pay.php View File

@@ -98,8 +98,16 @@ class Pay extends Base
if (Wechat::h5InWechat()) {
$trade_type = 'wap';
}
$amount = bcmul($order['total_price'], 100);
return Service::submitOrder($amount, $order->out_trade_no,"wechat", $body, Config::getByName('notify_url')['value'], "", $trade_type);
$params = [
'amount' => bcmul($order['total_price'], 100),
'orderid' => $order->out_trade_no,
'type' => "wechat",
'title' => $body,
'notifyurl' => Config::getByName('notify_url')['value'],
'trade_type' => $trade_type,

];
return Service::submitOrder($params);
} catch (Exception $e) {
$this->error($e->getMessage());
}


Loading…
Cancel
Save