通过商户订单号查询订单
商户可以通过先享卡订单号或商户订单号查询用户目前的先享卡使用情况、订单状态,可用于对账或者界面展示。 官方文档
js
wxpay.v3.discountCard.orders.outTradeNo._out_trade_no_.get({
out_trade_no,
})
.then(
({
data: {
out_order_no,
discount_card_id,
out_trade_no,
appid,
service_id,
order_id,
transaction_id,
openid,
card_begin_time,
card_end_time,
card_name,
objective_description,
reward_description,
estimated_reward_amount,
online_instructions,
offline_instructions,
state,
total_amount,
deduction_amount,
settlement_amount,
create_time,
pay_time,
objectives,
rewards,
},
}) => ({
out_order_no,
discount_card_id,
out_trade_no,
appid,
service_id,
order_id,
transaction_id,
openid,
card_begin_time,
card_end_time,
card_name,
objective_description,
reward_description,
estimated_reward_amount,
online_instructions,
offline_instructions,
state,
total_amount,
deduction_amount,
settlement_amount,
create_time,
pay_time,
objectives,
rewards,
})
)