创建会员卡劵时返回45160
微信开发
· cheerwold
· 查看 4681 次
· 于 8年前
会员卡卡劵
创建会员卡劵时返回如下信息,请问该怎么解决
{"errcode":45160,"errmsg":"invalid category to create card hint: [SkBwmA0058ent3]"}
下面是我调用的代码:
#region 会员卡资料
var mCardBase = new Senparc.Weixin.MP.AdvancedAPIs.Card.Card_BaseInfoBase();
mCardBase.bind_openid = true;
mCardBase.brand_name = "XXX集团";
mCardBase.can_give_friend = false;
mCardBase.can_share = false;
mCardBase.code_type = Card_CodeType.CODE_TYPE_QRCODE;
mCardBase.color = "Color100";
mCardBase.date_info = new Senparc.Weixin.MP.AdvancedAPIs.Card.Card_BaseInfo_DateInfo() {
//begin_timestamp = Senparc.Weixin.Helpers.DateTimeHelper.GetWeixinDateTime(DateTime.Now),
//end_timestamp = Senparc.Weixin.Helpers.DateTimeHelper.GetWeixinDateTime(DateTime.Now.AddDays(90)),
//fixed_begin_term = 0,
//fixed_term = 90,
type = "DATE_TYPE_PERMANENT"
};
mCardBase.description = @"每人限领1张新关注的并登录手机号码的即可加入微会员,可能一键查询积分,服务预约等。";
mCardBase.logo_url = "
http://www.xxx.com/Images/logo.jpg";
mCardBase.need_push_on_view = true;
mCardBase.notice = "到店请出店微会员卡";
mCardBase.service_phone = "020-88886666";
mCardBase.sku = new Senparc.Weixin.MP.AdvancedAPIs.Card.Card_BaseInfo_Sku() {
quantity = 1,
total_quantity = 1
};
mCardBase.title = "XXX店移动微会员卡";
mCardBase.use_all_locations = true;
//mCardBase.use_custom_code = true;
var mCardData = new Senparc.Weixin.MP.AdvancedAPIs.Card.Card_MemberCardData();
mCardData.activate_url = "
http://www.xxx.com/Member/FromCard?type=激活";
mCardData.auto_activate = false;
mCardData.base_info = mCardBase;
mCardData.custom_cell1 = new Senparc.Weixin.MP.AdvancedAPIs.Card.CustomCell() { name = "服务预约", tips = "无需排队", url = "
http://www.xxx.com/Member/FromCard?type=服务预约" };
mCardData.custom_field1 = new Senparc.Weixin.MP.AdvancedAPIs.Card.CustomField() { name_type = MemberCard_CustomField_NameType.FIELD_NAME_TYPE_STAMP, url = "
http://www.xxx.com/Member/FromCard?type=优惠劵" };
mCardData.custom_field2 = new Senparc.Weixin.MP.AdvancedAPIs.Card.CustomField() { name_type = MemberCard_CustomField_NameType.FIELD_NAME_TYPE_COUPON, url = "
http://www.xxx.com/Member/FromCard?type=等级" };
mCardData.discount = 20;
mCardData.prerogative = "XXX店会员卡可在本店优惠20次,50次,100次。。。";
mCardData.supply_balance = false;
mCardData.supply_bonus = true;
#endregion
var cardResult = await Senparc.Weixin.MP.AdvancedAPIs.CardApi.CreateCardAsync(WEIXINSETTING.AppId, mCardData);