码牌支付结果上报
上报信息:商户订单号、设备sn、收款商户号
| 请求参数 | 类型 | 描述 |
|---|---|---|
| transaction_id | string | 微信支付订单号 |
| json | object | 声明请求的JSON数据结构 |
| sub_mchid | string | 子商户 |
| code_url | string | 收款链接url |
| out_trade_no | string | 商户订单号 |
| device_sn | string | 设备sn |
php
$instance->v3->payDevices->openScenarioSpeakerorder->_transaction_id_->report->postAsync([
'transaction_id' => '20190611222222222200000000012122',
'json' => [
'sub_mchid' => '1900000001',
'code_url' => 'URl:weixin://wxpay/s/An4baqw',
'out_trade_no' => 'example_out_trade_no',
'device_sn' => 'example_device_sn',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance->chain('v3/pay-devices/open-scenario-speakerorder/{transaction_id}/report')->postAsync([
'transaction_id' => '20190611222222222200000000012122',
'json' => [
'sub_mchid' => '1900000001',
'code_url' => 'URl:weixin://wxpay/s/An4baqw',
'out_trade_no' => 'example_out_trade_no',
'device_sn' => 'example_device_sn',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance['v3/pay-devices/open-scenario-speakerorder/{transaction_id}/report']->postAsync([
'transaction_id' => '20190611222222222200000000012122',
'json' => [
'sub_mchid' => '1900000001',
'code_url' => 'URl:weixin://wxpay/s/An4baqw',
'out_trade_no' => 'example_out_trade_no',
'device_sn' => 'example_device_sn',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$response = $instance->v3->payDevices->openScenarioSpeakerorder->_transaction_id_->report->post([
'transaction_id' => '20190611222222222200000000012122',
'json' => [
'sub_mchid' => '1900000001',
'code_url' => 'URl:weixin://wxpay/s/An4baqw',
'out_trade_no' => 'example_out_trade_no',
'device_sn' => 'example_device_sn',
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance->chain('v3/pay-devices/open-scenario-speakerorder/{transaction_id}/report')->post([
'transaction_id' => '20190611222222222200000000012122',
'json' => [
'sub_mchid' => '1900000001',
'code_url' => 'URl:weixin://wxpay/s/An4baqw',
'out_trade_no' => 'example_out_trade_no',
'device_sn' => 'example_device_sn',
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance['v3/pay-devices/open-scenario-speakerorder/{transaction_id}/report']->post([
'transaction_id' => '20190611222222222200000000012122',
'json' => [
'sub_mchid' => '1900000001',
'code_url' => 'URl:weixin://wxpay/s/An4baqw',
'out_trade_no' => 'example_out_trade_no',
'device_sn' => 'example_device_sn',
],
]);
print_r(json_decode((string) $response->getBody(), true));| 返回字典 | 类型 | 描述 |
|---|---|---|
| sub_mchid | string | 子商户 |
| code_url | string | 收款链接url |
| out_trade_no | string | 商户订单号 |
| device_sn | string | 设备sn |
| transaction_id | string | 微信支付订单号 |
参阅 官方文档