|
|
@@ -203,11 +203,7 @@ class OrderController extends BaseController
|
|
|
$totalFee = $order['actPrice'];
|
|
|
|
|
|
//小程序使用miniOpenId
|
|
|
- if (httpUtil::isMiniProgram()) {
|
|
|
- $openId = $this->user['miniOpenId'];
|
|
|
- } else {
|
|
|
- $openId = $this->user['openId'];
|
|
|
- }
|
|
|
+ $openId = $this->user['miniOpenId'];
|
|
|
$capitalType = dict::getDict('capitalType','xhOrder','id');
|
|
|
//流水类型、优惠卷、微信支付(h5还是小程序支付)类型 带到回调
|
|
|
$wxPayType = 0;
|
|
|
@@ -232,17 +228,11 @@ class OrderController extends BaseController
|
|
|
$input->SetNotify_url(Yii::$app->params['mallHost'] . '/notice/wx-callback/');
|
|
|
$input->SetTrade_type("JSAPI");
|
|
|
|
|
|
- //花卉宝代为申请的微信支付
|
|
|
- $sjExtend = $this->sjExtend;
|
|
|
- if ($sjExtend['wxPayApply'] == 1) {
|
|
|
- $input->SetSub_openid($openId);
|
|
|
- } else {
|
|
|
- $input->SetOpenid($openId);
|
|
|
- }
|
|
|
+ $sjExtend = WxOpenClass::getMallWxInfo();
|
|
|
+ $input->SetOpenid($openId);
|
|
|
//小程序使用miniAppId
|
|
|
- if (httpUtil::isMiniProgram()) {
|
|
|
- $sjExtend['wxAppId'] = $sjExtend['miniAppId'];
|
|
|
- }
|
|
|
+ $sjExtend['wxAppId'] = $sjExtend['miniAppId'];
|
|
|
+
|
|
|
|
|
|
$wxOrder = \WxPayApi::unifiedOrder($input, 6, $sjExtend);
|
|
|
$tools = new \JsApiPay();
|