导入加密手机号提醒会员领卡
如商户有存量注册会员未领取会员卡,可导入最近一年在品牌内有微信支付交易的活跃会员手机号(需加密后才能导入),导入后微信将通过卡包提醒用户将会员卡领取到卡包。
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
member_information | object | 会员信息 |
card_id | string | 会员卡id |
code | string | 会员卡code |
membership_number | string | 会员卡编号 |
registration_time | string | 会员注册时间 |
encrypted_phone_number | string | 加密手机号 |
outer_str | string | 自定义场景值 |
headers | object | 声明请求的头参数 |
Wechatpay-Serial | string | 平台公钥ID/平台公钥证书序列号 |
php
$instance->v3->marketing->membercardOpen->phonenumberMember->import->postAsync([
'json' => [
'member_information' => [
'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
'code' => '478515832665',
'membership_number' => '316510891298',
'registration_time' => '2015-05-20T13:29:35.120+08:00',
],
'encrypted_phone_number' => 'vvysDQeEaH3I+wRh14St0abIkvQyFgh/fbWYSs2bLtG9tj+bdJn4WSCPzqSyXnFbzaaKSE2j4mAFON3kzNexb/SYkHZNJAuCittaW4wpGj7U+h9A==',
'outer_str' => 'my_card_CARD',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance->chain('v3/marketing/membercard-open/phonenumber-member/import')->postAsync([
'json' => [
'member_information' => [
'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
'code' => '478515832665',
'membership_number' => '316510891298',
'registration_time' => '2015-05-20T13:29:35.120+08:00',
],
'encrypted_phone_number' => 'vvysDQeEaH3I+wRh14St0abIkvQyFgh/fbWYSs2bLtG9tj+bdJn4WSCPzqSyXnFbzaaKSE2j4mAFON3kzNexb/SYkHZNJAuCittaW4wpGj7U+h9A==',
'outer_str' => 'my_card_CARD',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance['v3/marketing/membercard-open/phonenumber-member/import']->postAsync([
'json' => [
'member_information' => [
'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
'code' => '478515832665',
'membership_number' => '316510891298',
'registration_time' => '2015-05-20T13:29:35.120+08:00',
],
'encrypted_phone_number' => 'vvysDQeEaH3I+wRh14St0abIkvQyFgh/fbWYSs2bLtG9tj+bdJn4WSCPzqSyXnFbzaaKSE2j4mAFON3kzNexb/SYkHZNJAuCittaW4wpGj7U+h9A==',
'outer_str' => 'my_card_CARD',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();
php
$response = $instance->v3->marketing->membercardOpen->phonenumberMember->import->post([
'json' => [
'member_information' => [
'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
'code' => '478515832665',
'membership_number' => '316510891298',
'registration_time' => '2015-05-20T13:29:35.120+08:00',
],
'encrypted_phone_number' => 'vvysDQeEaH3I+wRh14St0abIkvQyFgh/fbWYSs2bLtG9tj+bdJn4WSCPzqSyXnFbzaaKSE2j4mAFON3kzNexb/SYkHZNJAuCittaW4wpGj7U+h9A==',
'outer_str' => 'my_card_CARD',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance->chain('v3/marketing/membercard-open/phonenumber-member/import')->post([
'json' => [
'member_information' => [
'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
'code' => '478515832665',
'membership_number' => '316510891298',
'registration_time' => '2015-05-20T13:29:35.120+08:00',
],
'encrypted_phone_number' => 'vvysDQeEaH3I+wRh14St0abIkvQyFgh/fbWYSs2bLtG9tj+bdJn4WSCPzqSyXnFbzaaKSE2j4mAFON3kzNexb/SYkHZNJAuCittaW4wpGj7U+h9A==',
'outer_str' => 'my_card_CARD',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance['v3/marketing/membercard-open/phonenumber-member/import']->post([
'json' => [
'member_information' => [
'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
'code' => '478515832665',
'membership_number' => '316510891298',
'registration_time' => '2015-05-20T13:29:35.120+08:00',
],
'encrypted_phone_number' => 'vvysDQeEaH3I+wRh14St0abIkvQyFgh/fbWYSs2bLtG9tj+bdJn4WSCPzqSyXnFbzaaKSE2j4mAFON3kzNexb/SYkHZNJAuCittaW4wpGj7U+h9A==',
'outer_str' => 'my_card_CARD',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r($response->getStatusCode() === 204);
返回字典 | 类型 | 描述 |
---|---|---|
空字符串(无返回内容) |
参阅 官方文档