Skip to content

回传SN和商品编码

智慧经营4.0回传SN和商品编码

请求参数类型描述
jsonobject声明请求的JSON数据结构
brand_idstring品牌ID
transaction_idstring微信支付订单号
out_trade_nostring商户订单号
sub_mchidstring子商户号
device_idstring设备号
goods_detailobject[]单品列表
barcodestring商品编码
merchant_goods_idstring商家商品编码
goods_namestring商品名称
quantitynumber商品数量
pricenumber商品单价
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);
返回字典类型描述
空字符串(无返回内容)

参阅 官方文档

Published on the GitHub by TheNorthMemory