|
|
@@ -78,10 +78,19 @@ class OrderController extends BaseController
|
|
|
require_once($wx . '/lib/WxPay.Api.php');
|
|
|
require_once($wx . '/example/WxPay.NativePay.php');
|
|
|
|
|
|
+ //流水类型、优惠卷、微信支付(h5还是小程序支付)类型 带到回调
|
|
|
+ $wxPayType = 0;
|
|
|
+ if (httpUtil::isMiniProgram()) {
|
|
|
+ $wxPayType = 1;
|
|
|
+ }
|
|
|
+ $purchaseCapital = dict::getDict('capitalType', 'xhPurchase', 'id');
|
|
|
+ $attach = "couponId=0&capitalType=" . $purchaseCapital . '&wxPayType=' . $wxPayType;
|
|
|
+
|
|
|
$input = new \WxPayUnifiedOrder();
|
|
|
$input->SetBody($subject);
|
|
|
$input->SetOut_trade_no($orderSn);
|
|
|
$input->SetTotal_fee($totalFee * 100);
|
|
|
+ $input->SetAttach($attach);
|
|
|
$input->SetTime_start(date("YmdHis"));
|
|
|
$input->SetTime_expire(date("YmdHis", time() + 600));
|
|
|
$input->SetNotify_url(Yii::$app->params['hdHost'] . '/notice/wx-callback/');
|