|
@@ -19,36 +19,32 @@ class TransactionServiceTest extends TestCase
|
|
|
|
|
|
|
|
public function testPreOrder()
|
|
public function testPreOrder()
|
|
|
{
|
|
{
|
|
|
- $totalAmount = .01;
|
|
|
|
|
|
|
+ $totalAmount = 500;
|
|
|
// 微信主扫场景 - 账户端业务信息
|
|
// 微信主扫场景 - 账户端业务信息
|
|
|
$accBusiFields = new TradePreorderWechaAccBusiFields();
|
|
$accBusiFields = new TradePreorderWechaAccBusiFields();
|
|
|
- $accBusiFields->setTimeoutExpress('');
|
|
|
|
|
|
|
+ $accBusiFields->setTimeoutExpress(15);
|
|
|
$accBusiFields->setSubAppid('wx1308d811d01639eb');
|
|
$accBusiFields->setSubAppid('wx1308d811d01639eb');
|
|
|
$accBusiFields->setUserId('oPuRO15wmxv3AwRyEznRfuDLehrk');
|
|
$accBusiFields->setUserId('oPuRO15wmxv3AwRyEznRfuDLehrk');
|
|
|
- $accBusiFields->setDetail('');
|
|
|
|
|
- $accBusiFields->setGoodsTag('');
|
|
|
|
|
- $accBusiFields->setAttach('');
|
|
|
|
|
- $accBusiFields->setDeviceInfo('');
|
|
|
|
|
- $accBusiFields->setLimitPay('');
|
|
|
|
|
- $accBusiFields->setSceneInfo('');
|
|
|
|
|
- $accBusiFields->setLimitPayer('');
|
|
|
|
|
$detail = new TradePreorderWechaDetail();
|
|
$detail = new TradePreorderWechaDetail();
|
|
|
$detail->setCostPrice($totalAmount);
|
|
$detail->setCostPrice($totalAmount);
|
|
|
$detail->setReceiptId('');
|
|
$detail->setReceiptId('');
|
|
|
$goodsDetail = new TradePreorderWechaGoodsDetail();
|
|
$goodsDetail = new TradePreorderWechaGoodsDetail();
|
|
|
$goodsDetail->setGoodsId('3452234');
|
|
$goodsDetail->setGoodsId('3452234');
|
|
|
$goodsDetail->setWxpayGoodsId('');
|
|
$goodsDetail->setWxpayGoodsId('');
|
|
|
- $goodsDetail->setGoodsName('');
|
|
|
|
|
|
|
+ $goodsDetail->setGoodsName('纯礼 脚臭粉*2+沐浴皂液*1+氨基酸洁面液*1+羊奶皂*6');
|
|
|
$goodsDetail->setQuantity(1);
|
|
$goodsDetail->setQuantity(1);
|
|
|
$goodsDetail->setPrice($totalAmount);
|
|
$goodsDetail->setPrice($totalAmount);
|
|
|
$detail->setGoodsDetail([$goodsDetail]);
|
|
$detail->setGoodsDetail([$goodsDetail]);
|
|
|
- $accBusiFields->setDetail($detail);
|
|
|
|
|
- $this->transactionService->preOrder(
|
|
|
|
|
|
|
+ // $accBusiFields->setDetail($detail);
|
|
|
|
|
+ $response = $this->transactionService->preOrder(
|
|
|
outTradeNo: generate_number(NumberBizEnum::ORDER_PAY),
|
|
outTradeNo: generate_number(NumberBizEnum::ORDER_PAY),
|
|
|
totalAmount: $totalAmount,
|
|
totalAmount: $totalAmount,
|
|
|
locationInfo: new LocationInfo(requestIP: '183.214.109.50'),
|
|
locationInfo: new LocationInfo(requestIP: '183.214.109.50'),
|
|
|
subject: '测试订单',
|
|
subject: '测试订单',
|
|
|
|
|
+ settleType: "1",
|
|
|
|
|
+ remark: "纯礼 脚臭粉*2+沐浴皂液*1+氨基酸洁面液*1+羊奶皂*6",
|
|
|
accBusiFields: $accBusiFields,
|
|
accBusiFields: $accBusiFields,
|
|
|
);
|
|
);
|
|
|
|
|
+ dump($response);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|