Skip to content

码牌支付结果上报

上报信息:商户订单号、设备sn、收款商户号

请求参数类型描述
transaction_idstring微信支付订单号
jsonobject声明请求的JSON数据结构
sub_mchidstring子商户
code_urlstring收款链接url
out_trade_nostring商户订单号
device_snstring设备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_mchidstring子商户
code_urlstring收款链接url
out_trade_nostring商户订单号
device_snstring设备sn
transaction_idstring微信支付订单号

参阅 官方文档

Published on the GitHub by TheNorthMemory