同步会员开通结果
所有会员卡新开卡,我们回调给商家,商家还需要再同步给我们才算开卡成功(但是导入不用)
请求参数 | 类型 | 描述 |
---|---|---|
user_card_code | string | 会员卡code |
json | object | 声明请求的JSON 数据结构 |
brand_id | string | 品牌ID |
openid | string | 用户标识 |
card_color | string | 卡背景颜色 |
card_picture_url | string | 卡背景图URL |
phone_number | string | 加密的手机号 |
level | string | 等级 |
valid_date_information | object | 会员卡有效期 |
type | string | 有效期类型FIX_TIME_RANGE | FIX_TERM | PERMANENT 枚举值之一 |
available_begin_time | string | 有效期开始时间 |
available_end_time | string | 有效期结束时间 |
available_day_after_receive | integer | 生效后N天内有效 |
user_information | object | 用户开卡时填写的个人信息 |
common_field_list | object[] | 平台提供的通用开卡信息字段 |
name | string | 平台提供的通用开卡信息字段USER_FORM_FLAG_SEX | USER_FORM_FLAG_NAME | USER_FORM_FLAG_BIRTHDAY | USER_FORM_FLAG_ADDRESS | USER_FORM_FLAG_EMAIL | USER_FORM_FLAG_CITY 枚举值之一 |
value | string | 加密的用户开卡时填写的个人信息 |
custom_field_list | object[] | 商户自定义的开卡信息字段 |
name | string | 字段名称 |
user_chosen_values | string[] | 加密的用户选择的字段值列表 |
attach | string | 商家数据包 |
user_card_confirm_state | string | 会员开卡状态CREATE_CARD_SUCCESS | CREATE_CARD_FAIL 枚举值之一 |
query | object | 声明请求的查询参数 |
card_id | string | 会员卡模版ID |
headers | object | 声明请求的头参数 |
Wechatpay-Serial | string | 微信支付公钥ID/平台证书序列号 |
php
$instance->v3->brand->partner->cardMember->userCards->_user_card_code_->confirm->postAsync([
'user_card_code' => '478515832665',
'json' => [
'brand_id' => '1004',
'openid' => 'obLatjnx9gnqzS4myYGmLZ7LgLBA',
'card_color' => '#FFFF00',
'card_picture_url' => 'https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/0',
'phone_number' => 'vvysDQeEaH3I+wRh14St0abIkvQyFgh/fbWY==',
'level' => '钻石会员',
'valid_date_information' => [
'type' => 'FIX_TIME_RANGE',
'available_begin_time' => '2020-05-20T13:29:35.120+08:00',
'available_end_time' => '2030-05-20T13:29:35.120+08:00',
'available_day_after_receive' => 200,
],
'user_information' => [
'common_field_list' => [[
'name' => 'USER_FORM_FLAG_SEX',
'value' => 'vvysDQeEaH3I+wRh14St0abIkvQyFgh/fbWY==',
],],
'custom_field_list' => [[
'name' => '喜欢的运动',
'user_chosen_values' => ['vvysDQeEaH3I+wRh14St0abIkvQyFgh/'],
],],
],
'attach' => '自定义数据说明',
'user_card_confirm_state' => 'CREATE_CARD_SUCCESS',
],
'query' => [
'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/brand/partner/card-member/user-cards/{user_card_code}/confirm')->postAsync([
'user_card_code' => '478515832665',
'json' => [
'brand_id' => '1004',
'openid' => 'obLatjnx9gnqzS4myYGmLZ7LgLBA',
'card_color' => '#FFFF00',
'card_picture_url' => 'https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/0',
'phone_number' => 'vvysDQeEaH3I+wRh14St0abIkvQyFgh/fbWY==',
'level' => '钻石会员',
'valid_date_information' => [
'type' => 'FIX_TIME_RANGE',
'available_begin_time' => '2020-05-20T13:29:35.120+08:00',
'available_end_time' => '2030-05-20T13:29:35.120+08:00',
'available_day_after_receive' => 200,
],
'user_information' => [
'common_field_list' => [[
'name' => 'USER_FORM_FLAG_SEX',
'value' => 'vvysDQeEaH3I+wRh14St0abIkvQyFgh/fbWY==',
],],
'custom_field_list' => [[
'name' => '喜欢的运动',
'user_chosen_values' => ['vvysDQeEaH3I+wRh14St0abIkvQyFgh/'],
],],
],
'attach' => '自定义数据说明',
'user_card_confirm_state' => 'CREATE_CARD_SUCCESS',
],
'query' => [
'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/brand/partner/card-member/user-cards/{user_card_code}/confirm']->postAsync([
'user_card_code' => '478515832665',
'json' => [
'brand_id' => '1004',
'openid' => 'obLatjnx9gnqzS4myYGmLZ7LgLBA',
'card_color' => '#FFFF00',
'card_picture_url' => 'https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/0',
'phone_number' => 'vvysDQeEaH3I+wRh14St0abIkvQyFgh/fbWY==',
'level' => '钻石会员',
'valid_date_information' => [
'type' => 'FIX_TIME_RANGE',
'available_begin_time' => '2020-05-20T13:29:35.120+08:00',
'available_end_time' => '2030-05-20T13:29:35.120+08:00',
'available_day_after_receive' => 200,
],
'user_information' => [
'common_field_list' => [[
'name' => 'USER_FORM_FLAG_SEX',
'value' => 'vvysDQeEaH3I+wRh14St0abIkvQyFgh/fbWY==',
],],
'custom_field_list' => [[
'name' => '喜欢的运动',
'user_chosen_values' => ['vvysDQeEaH3I+wRh14St0abIkvQyFgh/'],
],],
],
'attach' => '自定义数据说明',
'user_card_confirm_state' => 'CREATE_CARD_SUCCESS',
],
'query' => [
'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->brand->partner->cardMember->userCards->_user_card_code_->confirm->post([
'user_card_code' => '478515832665',
'json' => [
'brand_id' => '1004',
'openid' => 'obLatjnx9gnqzS4myYGmLZ7LgLBA',
'card_color' => '#FFFF00',
'card_picture_url' => 'https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/0',
'phone_number' => 'vvysDQeEaH3I+wRh14St0abIkvQyFgh/fbWY==',
'level' => '钻石会员',
'valid_date_information' => [
'type' => 'FIX_TIME_RANGE',
'available_begin_time' => '2020-05-20T13:29:35.120+08:00',
'available_end_time' => '2030-05-20T13:29:35.120+08:00',
'available_day_after_receive' => 200,
],
'user_information' => [
'common_field_list' => [[
'name' => 'USER_FORM_FLAG_SEX',
'value' => 'vvysDQeEaH3I+wRh14St0abIkvQyFgh/fbWY==',
],],
'custom_field_list' => [[
'name' => '喜欢的运动',
'user_chosen_values' => ['vvysDQeEaH3I+wRh14St0abIkvQyFgh/'],
],],
],
'attach' => '自定义数据说明',
'user_card_confirm_state' => 'CREATE_CARD_SUCCESS',
],
'query' => [
'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/brand/partner/card-member/user-cards/{user_card_code}/confirm')->post([
'user_card_code' => '478515832665',
'json' => [
'brand_id' => '1004',
'openid' => 'obLatjnx9gnqzS4myYGmLZ7LgLBA',
'card_color' => '#FFFF00',
'card_picture_url' => 'https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/0',
'phone_number' => 'vvysDQeEaH3I+wRh14St0abIkvQyFgh/fbWY==',
'level' => '钻石会员',
'valid_date_information' => [
'type' => 'FIX_TIME_RANGE',
'available_begin_time' => '2020-05-20T13:29:35.120+08:00',
'available_end_time' => '2030-05-20T13:29:35.120+08:00',
'available_day_after_receive' => 200,
],
'user_information' => [
'common_field_list' => [[
'name' => 'USER_FORM_FLAG_SEX',
'value' => 'vvysDQeEaH3I+wRh14St0abIkvQyFgh/fbWY==',
],],
'custom_field_list' => [[
'name' => '喜欢的运动',
'user_chosen_values' => ['vvysDQeEaH3I+wRh14St0abIkvQyFgh/'],
],],
],
'attach' => '自定义数据说明',
'user_card_confirm_state' => 'CREATE_CARD_SUCCESS',
],
'query' => [
'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/brand/partner/card-member/user-cards/{user_card_code}/confirm']->post([
'user_card_code' => '478515832665',
'json' => [
'brand_id' => '1004',
'openid' => 'obLatjnx9gnqzS4myYGmLZ7LgLBA',
'card_color' => '#FFFF00',
'card_picture_url' => 'https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/0',
'phone_number' => 'vvysDQeEaH3I+wRh14St0abIkvQyFgh/fbWY==',
'level' => '钻石会员',
'valid_date_information' => [
'type' => 'FIX_TIME_RANGE',
'available_begin_time' => '2020-05-20T13:29:35.120+08:00',
'available_end_time' => '2030-05-20T13:29:35.120+08:00',
'available_day_after_receive' => 200,
],
'user_information' => [
'common_field_list' => [[
'name' => 'USER_FORM_FLAG_SEX',
'value' => 'vvysDQeEaH3I+wRh14St0abIkvQyFgh/fbWY==',
],],
'custom_field_list' => [[
'name' => '喜欢的运动',
'user_chosen_values' => ['vvysDQeEaH3I+wRh14St0abIkvQyFgh/'],
],],
],
'attach' => '自定义数据说明',
'user_card_confirm_state' => 'CREATE_CARD_SUCCESS',
],
'query' => [
'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
user_card_code | string | 会员卡code |
card_id | string | 会员卡模板ID |
openid | string | 用户标识 |
card_color | string | 卡背景颜色 |
card_picture_url | string | 卡背景图URL |
brand_id | string | 品牌ID |
card_type | string | 会员卡类型PURCHASE | NORMAL | BALANCE 枚举值之一 |
phone_number | string | 加密的手机号 |
level | string | 等级 |
valid_date_information | object | 会员卡有效期 |
type | string | 有效期类型FIX_TIME_RANGE | FIX_TERM | PERMANENT 枚举值之一 |
available_begin_time | string | 有效期开始时间 |
available_end_time | string | 有效期结束时间 |
available_day_after_receive | integer | 生效后N天内有效 |
pickup_time | string | 领取时间 |
user_information | object | 用户开卡时填写的个人信息 |
common_field_list | object[] | 平台提供的通用开卡信息字段 |
name | string | 平台提供的通用开卡信息字段USER_FORM_FLAG_SEX | USER_FORM_FLAG_NAME | USER_FORM_FLAG_BIRTHDAY | USER_FORM_FLAG_ADDRESS | USER_FORM_FLAG_EMAIL | USER_FORM_FLAG_CITY 枚举值之一 |
value | string | 加密的用户开卡时填写的个人信息 |
custom_field_list | object[] | 商户自定义的开卡信息字段 |
name | string | 字段名称 |
user_chosen_values | string[] | 加密的用户选择的字段值列表 |
attach | string | 商家数据包 |
user_card_state | string | 用户会员卡状态UNACTIVATED | EFFECTIVE | EXPIRED | INVALID 枚举值之一 |
invalid_reason | string | 作废原因 |
invalid_time | string | 作废时间 |
参阅 官方文档