Skip to content

关联订单信息

将有效态(未核销)的商家券与订单信息关联,用于后续参与摇奖&返佣激励等操作的统计。

请求参数类型描述
jsonobject声明请求的JSON数据结构
stock_idstring批次号
coupon_codestring券code
out_trade_nostring关联的商户订单号
out_request_nostring商户请求单号
php
$instance->v3->marketing->busifavor->coupons->associate->postAsync([
  'json' => [
    'stock_id'       => '',
    'coupon_code'    => '',
    'out_trade_no'   => '',
    'out_request_no' => '',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/busifavor/coupons/associate')->postAsync([
  'json' => [
    'stock_id'       => '',
    'coupon_code'    => '',
    'out_trade_no'   => '',
    'out_request_no' => '',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/busifavor/coupons/associate']->postAsync([
  'json' => [
    'stock_id'       => '',
    'coupon_code'    => '',
    'out_trade_no'   => '',
    'out_request_no' => '',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->busifavor->coupons->associate->post([
  'json' => [
    'stock_id'       => '',
    'coupon_code'    => '',
    'out_trade_no'   => '',
    'out_request_no' => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/busifavor/coupons/associate')->post([
  'json' => [
    'stock_id'       => '',
    'coupon_code'    => '',
    'out_trade_no'   => '',
    'out_request_no' => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/busifavor/coupons/associate']->post([
  'json' => [
    'stock_id'       => '',
    'coupon_code'    => '',
    'out_trade_no'   => '',
    'out_request_no' => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
wechatpay_associate_timestring关联成功时间

参阅 官方文档

Published on the GitHub by TheNorthMemory