回传SN和商品编码
智慧经营4.0回传SN和商品编码
| 请求参数 | 类型 | 描述 |
|---|---|---|
| json | object | 声明请求的JSON数据结构 |
| brand_id | string | 品牌ID |
| transaction_id | string | 微信支付订单号 |
| out_trade_no | string | 商户订单号 |
| sub_mchid | string | 子商户号 |
| device_id | string | 设备号 |
| goods_detail | object[] | 单品列表 |
| barcode | string | 商品编码 |
| merchant_goods_id | string | 商家商品编码 |
| goods_name | string | 商品名称 |
| quantity | number | 商品数量 |
| price | number | 商品单价 |
php
$instance->v3->industryRebate->retailIndustry->transactions->postAsync([
'json' => [
'brand_id' => '120344',
'transaction_id' => '20190611222222222200000000012122',
'out_trade_no' => 'example_out_trade_no',
'sub_mchid' => '1900000001',
'device_id' => 'example_device_id',
'goods_detail' => [[
'barcode' => 'example_barcode',
'merchant_goods_id' => '1001',
'goods_name' => 'iPhoneX 256G',
'quantity' => 1,
'price' => 528800,
],],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();php
$instance->chain('v3/industry-rebate/retail-industry/transactions')->postAsync([
'json' => [
'brand_id' => '120344',
'transaction_id' => '20190611222222222200000000012122',
'out_trade_no' => 'example_out_trade_no',
'sub_mchid' => '1900000001',
'device_id' => 'example_device_id',
'goods_detail' => [[
'barcode' => 'example_barcode',
'merchant_goods_id' => '1001',
'goods_name' => 'iPhoneX 256G',
'quantity' => 1,
'price' => 528800,
],],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();php
$instance['v3/industry-rebate/retail-industry/transactions']->postAsync([
'json' => [
'brand_id' => '120344',
'transaction_id' => '20190611222222222200000000012122',
'out_trade_no' => 'example_out_trade_no',
'sub_mchid' => '1900000001',
'device_id' => 'example_device_id',
'goods_detail' => [[
'barcode' => 'example_barcode',
'merchant_goods_id' => '1001',
'goods_name' => 'iPhoneX 256G',
'quantity' => 1,
'price' => 528800,
],],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();php
$response = $instance->v3->industryRebate->retailIndustry->transactions->post([
'json' => [
'brand_id' => '120344',
'transaction_id' => '20190611222222222200000000012122',
'out_trade_no' => 'example_out_trade_no',
'sub_mchid' => '1900000001',
'device_id' => 'example_device_id',
'goods_detail' => [[
'barcode' => 'example_barcode',
'merchant_goods_id' => '1001',
'goods_name' => 'iPhoneX 256G',
'quantity' => 1,
'price' => 528800,
],],
],
]);
print_r($response->getStatusCode() === 204);php
$response = $instance->chain('v3/industry-rebate/retail-industry/transactions')->post([
'json' => [
'brand_id' => '120344',
'transaction_id' => '20190611222222222200000000012122',
'out_trade_no' => 'example_out_trade_no',
'sub_mchid' => '1900000001',
'device_id' => 'example_device_id',
'goods_detail' => [[
'barcode' => 'example_barcode',
'merchant_goods_id' => '1001',
'goods_name' => 'iPhoneX 256G',
'quantity' => 1,
'price' => 528800,
],],
],
]);
print_r($response->getStatusCode() === 204);php
$response = $instance['v3/industry-rebate/retail-industry/transactions']->post([
'json' => [
'brand_id' => '120344',
'transaction_id' => '20190611222222222200000000012122',
'out_trade_no' => 'example_out_trade_no',
'sub_mchid' => '1900000001',
'device_id' => 'example_device_id',
'goods_detail' => [[
'barcode' => 'example_barcode',
'merchant_goods_id' => '1001',
'goods_name' => 'iPhoneX 256G',
'quantity' => 1,
'price' => 528800,
],],
],
]);
print_r($response->getStatusCode() === 204);| 返回字典 | 类型 | 描述 |
|---|---|---|
| 空字符串(无返回内容) | ||
参阅 官方文档