创建芝麻 GO 月月省(周期扣)模式模板
接口调用
请求示例
AlipayClient alipayClient = new DefaultAlipayClient("https://openapi.alipay.com/gateway.do","app_id","your private_key","json","GBK","alipay_public_key","RSA2");
ZhimaMerchantZmgoTemplateCreateRequest request = new ZhimaMerchantZmgoTemplateCreateRequest();
request.setBizContent("{" +
" \"basic_config\":{" +
" \"template_name\":\"芝麻GO月月省\"," +
" \"partner_id\":\"2088531780000000\"," +
" \"isv_pid\":\"2088121746200000\"," +
" \"biz_type\":\"yunyinshang\"," +
" \"out_biz_no\":\"202939382829193287262717\"" +
" }," +
" \"obligation_config\":{" +
" \"obligation_template\":\"OBTL001\"," +
" \"obligation_times\":\"6\"," +
" \"promise_type_desc\":\"连续开通月月省会员6个月\"" +
" }," +
" \"right_config\":{" +
" \"custom_benefit_desc\":\"享会员特惠价16元/月\"," +
" }," +
" \"open_config\":{" +
" \"freeze_amount\":\"132.00\"," +
" \"period_mode\":\"ABSOLATE_DATE\"," +
" \"period_time\":\"186\"," +
" \"min_sign_interval\":\"0\"," +
" \"custom_open_tips\":\"未完成按照22元/月退回已享优惠\"," +
" \"card_color_scheme\":\"C_BLACK\"" +
" }," +
" \"settlement_config\":{" +
" \"settlement_type\":\"benefitSettlement\"," +
" \"custom_fee_name\":\"未完成任务扣回已享优惠\"," +
" \"exp_stop_time_mode\":\"ABSOLATE_DATE\"," +
" \"exp_stop_delay_days\":7" +
" \"cycle_withhold_config\":{" +
" \"support_cycle_withhold_high_mode\":\"false\"," +
" \"deduct_plan\":\"[{\"periodNum\":\"1\",\"taskPeriod\":\"true\",\"actualPr ice\":\"16\",\"originalPrice\":\"22\"},{\"periodNum\":\"2\",\"tas kPeriod\":\"true\",\"actualPrice\":\"16\",\"originalPrice\":\"22 \"},{\"periodNum\":\"3\",\"taskPeriod\":\"true\",\"actualPrice \":\"16\",\"originalPrice\":\"22\"},{\"periodNum\":\"4\",\"taskPe riod\":\"true\",\"actualPrice\":\"16\",\"originalPrice\":\"22\"}, {\"periodNum\":\"5\",\"taskPeriod\":\"true\",\"actualPrice\":\"16 \",\"originalPrice\":\"22\"},{\"periodNum\":\"6\",\"taskPeriod \":\"true\",\"actualPrice\":\"16\",\"originalPrice\":22\"}]\"," +
" \"withhold_mode\":\"FIX_DAY_MONTHLY\"," +
" \"period_type\":\"DAY\"," +
" \"period\":\"1\"," +
" \"support_exemption_period\":\"true\"," +
" \"exemption_period\":\"1\"," +
" }," +
" }," +
" \"quit_config\":{" +
" \"quit_type\":\"QUIT_COMMON\"," +
" \"quit_jump_url\":\"https://pages.tmall.com/wow/z/hdwk/profit/tasks?&disableNav=YES&spma=xjk&spmb=21038795\"," +
" \"quit_desc\":\"点击退出\"" +
" }" +
" \"ext_config\":{" +
" \"text_content_fill_rule_id\":\"HTPCFR_20220715001\"," +
" \"text_content_fill_variable\":\"variable@@@变量|||variable1@@@变量1|||variable2@@@变量2|||variable4@@@变量4|||variable3@@@变量3\" +
" }" +
"}");
ZhimaMerchantZmgoTemplateCreateResponse response = alipayClient.execute(request);
if(response.isSuccess()){
System.out.println("调用成功");
} else {
System.out.println("调用失败");
}
异常示例
{
"zhima_merchant_zmgo_template_create_response": {
"code": "20000",
"msg": "Service Currently Unavailable",
"sub_code": "isp.unknow-error",
"sub_msg": "系统繁忙"
},
"sign": "ERITJKEIJKJHKKKKKKKHJEREEEEEEEEEEE"
}
修改于 2023-11-23 03:26:21