|
|
@@ -54,9 +54,9 @@ class TransactionService
|
|
|
{
|
|
|
$request = new TransPreorderRequest();
|
|
|
|
|
|
- $request->setMerchantNo($outTradeNo);
|
|
|
+ $request->setMerchantNo($this->config->merchant_no);
|
|
|
$request->setTermNo($this->config->term_no);
|
|
|
- $request->setOutTradeNo(date('YmdHis'));
|
|
|
+ $request->setOutTradeNo($outTradeNo);
|
|
|
$request->setAccountType($accountType);
|
|
|
$request->setTransType($transType);
|
|
|
$totalAmount = round($totalAmount * 100, 0);
|
|
|
@@ -77,8 +77,8 @@ class TransactionService
|
|
|
// 微信主扫场景 - 账户端业务信息
|
|
|
$acc_busi_fields = new TradePreorderWechaAccBusiFields();
|
|
|
$acc_busi_fields->setTimeoutExpress('');
|
|
|
- $acc_busi_fields->setSubAppid('');
|
|
|
- $acc_busi_fields->setUserId('2843132323');
|
|
|
+ $acc_busi_fields->setSubAppid('wx1308d811d01639eb');
|
|
|
+ $acc_busi_fields->setUserId('oPuRO15wmxv3AwRyEznRfuDLehrk');
|
|
|
$acc_busi_fields->setDetail('');
|
|
|
$acc_busi_fields->setGoodsTag('');
|
|
|
$acc_busi_fields->setAttach('');
|
|
|
@@ -88,15 +88,15 @@ class TransactionService
|
|
|
$acc_busi_fields->setLimitPayer('');
|
|
|
|
|
|
$detail = new TradePreorderWechaDetail();
|
|
|
- $detail->setCostPrice('100');
|
|
|
+ $detail->setCostPrice($totalAmount);
|
|
|
$detail->setReceiptId('');
|
|
|
|
|
|
$goods_detail = new TradePreorderWechaGoodsDetail();
|
|
|
$goods_detail->setGoodsId('3452234');
|
|
|
$goods_detail->setWxpayGoodsId('');
|
|
|
$goods_detail->setGoodsName('');
|
|
|
- $goods_detail->setQuantity('');
|
|
|
- $goods_detail->setPrice('');
|
|
|
+ $goods_detail->setQuantity(1);
|
|
|
+ $goods_detail->setPrice($totalAmount);
|
|
|
|
|
|
$detail->setGoodsDetail([$goods_detail]);
|
|
|
|