Skip to content

发放消费卡

商户通过调用本接口向用户发放消费卡,用户领到卡的同时会领取到一批代金券,消费卡会自动放入卡包中。

请求参数类型描述
card_idstring消费卡ID
jsonobject声明请求的JSON数据结构
appidstring消费卡归属appid
openidstring用户openid
out_request_nostring商户单据号
send_timestring请求发卡时间
php
$instance->v3->marketing->busifavor->coupons->_card_id_->send->postAsync([
  'card_id' => '',
  'json' => [
    'appid'          => '',
    'openid'         => '',
    'out_request_no' => '',
    'send_time'      => '',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/busifavor/coupons/{card_id}/send')->postAsync([
  'card_id' => '',
  'json' => [
    'appid'          => '',
    'openid'         => '',
    'out_request_no' => '',
    'send_time'      => '',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/busifavor/coupons/{card_id}/send']->postAsync([
  'card_id' => '',
  'json' => [
    'appid'          => '',
    'openid'         => '',
    'out_request_no' => '',
    'send_time'      => '',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->busifavor->coupons->_card_id_->send->post([
  'card_id' => '',
  'json' => [
    'appid'          => '',
    'openid'         => '',
    'out_request_no' => '',
    'send_time'      => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/busifavor/coupons/{card_id}/send')->post([
  'card_id' => '',
  'json' => [
    'appid'          => '',
    'openid'         => '',
    'out_request_no' => '',
    'send_time'      => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/busifavor/coupons/{card_id}/send']->post([
  'card_id' => '',
  'json' => [
    'appid'          => '',
    'openid'         => '',
    'out_request_no' => '',
    'send_time'      => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
card_codestring消费卡code

参阅 官方文档

Published on the GitHub by TheNorthMemory