小票机打印
请求参数 | 类型 | 描述 |
---|---|---|
device_id | string | 小票机设备号 |
json | object | 声明请求的JSON 数据结构 |
print_order_no | string | 打印单号 |
template_id | string | 模板ID |
notify_url | string | 回调通知地址 |
variable_list | object[] | 变量列表 |
key | string | Key字段 |
value | string | Value值字段 |
table_list | object[] | 表格变量列表 |
key | string | Key字段 |
row_list | object[] | Value值列表 |
cell_list | string[] | 值列表 |
php
$instance->v3->payDevices->printers->_device_id_->printOrders->postAsync([
'device_id' => 'WINCIE*EIXHRB',
'json' => [
'print_order_no' => 'wx8888888888888888',
'template_id' => 'pt_02583429616371386640209536',
'notify_url' => 'https://payapp.weixin.qq.com/callback',
'variable_list' => [[
'key' => '',
'value' => '',
],],
'table_list' => [[
'key' => '',
'row_list' => [[
'cell_list' => ['string'],
],],
],],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance->chain('v3/pay-devices/printers/{device_id}/print-orders')->postAsync([
'device_id' => 'WINCIE*EIXHRB',
'json' => [
'print_order_no' => 'wx8888888888888888',
'template_id' => 'pt_02583429616371386640209536',
'notify_url' => 'https://payapp.weixin.qq.com/callback',
'variable_list' => [[
'key' => '',
'value' => '',
],],
'table_list' => [[
'key' => '',
'row_list' => [[
'cell_list' => ['string'],
],],
],],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance['v3/pay-devices/printers/{device_id}/print-orders']->postAsync([
'device_id' => 'WINCIE*EIXHRB',
'json' => [
'print_order_no' => 'wx8888888888888888',
'template_id' => 'pt_02583429616371386640209536',
'notify_url' => 'https://payapp.weixin.qq.com/callback',
'variable_list' => [[
'key' => '',
'value' => '',
],],
'table_list' => [[
'key' => '',
'row_list' => [[
'cell_list' => ['string'],
],],
],],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();
php
$response = $instance->v3->payDevices->printers->_device_id_->printOrders->post([
'device_id' => 'WINCIE*EIXHRB',
'json' => [
'print_order_no' => 'wx8888888888888888',
'template_id' => 'pt_02583429616371386640209536',
'notify_url' => 'https://payapp.weixin.qq.com/callback',
'variable_list' => [[
'key' => '',
'value' => '',
],],
'table_list' => [[
'key' => '',
'row_list' => [[
'cell_list' => ['string'],
],],
],],
],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance->chain('v3/pay-devices/printers/{device_id}/print-orders')->post([
'device_id' => 'WINCIE*EIXHRB',
'json' => [
'print_order_no' => 'wx8888888888888888',
'template_id' => 'pt_02583429616371386640209536',
'notify_url' => 'https://payapp.weixin.qq.com/callback',
'variable_list' => [[
'key' => '',
'value' => '',
],],
'table_list' => [[
'key' => '',
'row_list' => [[
'cell_list' => ['string'],
],],
],],
],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance['v3/pay-devices/printers/{device_id}/print-orders']->post([
'device_id' => 'WINCIE*EIXHRB',
'json' => [
'print_order_no' => 'wx8888888888888888',
'template_id' => 'pt_02583429616371386640209536',
'notify_url' => 'https://payapp.weixin.qq.com/callback',
'variable_list' => [[
'key' => '',
'value' => '',
],],
'table_list' => [[
'key' => '',
'row_list' => [[
'cell_list' => ['string'],
],],
],],
],
]);
print_r($response->getStatusCode() === 204);
返回字典 | 类型 | 描述 |
---|---|---|
空字符串(无返回内容) |
参阅 。