创建会员卡二维码
商户创建会员卡后,可以调用此api创建二维码,用于投放会员卡,用户可扫码开通会员卡
请求参数 | 类型 | 描述 |
---|---|---|
card_id | string | 会员卡id |
json | object | 声明请求的JSON 数据结构 |
activate_type | string | 会员卡激活类型AUTO_ACTIVATE | JUMP_ACTIVATE 枚举值之一 |
activate_url | string | 跳转激活的url |
activate_appid | string | 跳转激活的appid |
activate_path | string | 跳转激活的path |
outer_str | string | 自定义场景值 |
php
$instance->v3->marketing->membercardOpen->cards->_card_id_->qrcode->postAsync([
'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
'json' => [
'activate_type' => 'AUTO_ACTIVATE',
'activate_url' => 'https://w.url.cn/s/Ahz3p2C',
'activate_appid' => 'wxea9c30a90fs8d3fe',
'activate_path' => 'pages/activate/activate',
'outer_str' => 'szwxtd',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/membercard-open/cards/{card_id}/qrcode')->postAsync([
'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
'json' => [
'activate_type' => 'AUTO_ACTIVATE',
'activate_url' => 'https://w.url.cn/s/Ahz3p2C',
'activate_appid' => 'wxea9c30a90fs8d3fe',
'activate_path' => 'pages/activate/activate',
'outer_str' => 'szwxtd',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/membercard-open/cards/{card_id}/qrcode']->postAsync([
'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
'json' => [
'activate_type' => 'AUTO_ACTIVATE',
'activate_url' => 'https://w.url.cn/s/Ahz3p2C',
'activate_appid' => 'wxea9c30a90fs8d3fe',
'activate_path' => 'pages/activate/activate',
'outer_str' => 'szwxtd',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->membercardOpen->cards->_card_id_->qrcode->post([
'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
'json' => [
'activate_type' => 'AUTO_ACTIVATE',
'activate_url' => 'https://w.url.cn/s/Ahz3p2C',
'activate_appid' => 'wxea9c30a90fs8d3fe',
'activate_path' => 'pages/activate/activate',
'outer_str' => 'szwxtd',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/membercard-open/cards/{card_id}/qrcode')->post([
'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
'json' => [
'activate_type' => 'AUTO_ACTIVATE',
'activate_url' => 'https://w.url.cn/s/Ahz3p2C',
'activate_appid' => 'wxea9c30a90fs8d3fe',
'activate_path' => 'pages/activate/activate',
'outer_str' => 'szwxtd',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/membercard-open/cards/{card_id}/qrcode']->post([
'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
'json' => [
'activate_type' => 'AUTO_ACTIVATE',
'activate_url' => 'https://w.url.cn/s/Ahz3p2C',
'activate_appid' => 'wxea9c30a90fs8d3fe',
'activate_path' => 'pages/activate/activate',
'outer_str' => 'szwxtd',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
url | string | 二维码对应的url |
参阅 官方文档