支付优化-续订失败邮件通知
This commit is contained in:
@@ -781,6 +781,8 @@ public class SendEmailUtil {
|
||||
private final static Long RENEWAL_REMINDER_USER_CN = 130728L;
|
||||
private final static Long PAYMENT_FAILED_NEW_MERCHANT_EN = 131230L;
|
||||
private final static Long PAYMENT_FAILED_RENEWAL_MERCHANT_EN = 131225L;
|
||||
private final static Long PAYMENT_FAILED_RENEWAL_USER_EN = 131563L;
|
||||
private final static Long PAYMENT_FAILED_RENEWAL_USER_CN = 131564L;
|
||||
|
||||
public static void subscriptionEmailReminder(String type, SubscriptionEmailParamsDTO subscriptionEmailParamsDTO, String language, String receiverAddress){
|
||||
try{
|
||||
@@ -816,6 +818,14 @@ public class SendEmailUtil {
|
||||
case "fail_renewal":
|
||||
merchant.setSubject("[Code-Create] Payment Failed : Renewal Order (" + subscriptionEmailParamsDTO.getOrderId() + ")");
|
||||
templateMerchant.setTemplateID(PAYMENT_FAILED_RENEWAL_MERCHANT_EN);
|
||||
// todo to user
|
||||
if (language.equals("ENGLISH")){
|
||||
user.setSubject("[Code-Create] Payment Failed : Renewal Order (" + subscriptionEmailParamsDTO.getOrderId() + ")");
|
||||
templateUser.setTemplateID(PAYMENT_FAILED_RENEWAL_USER_EN);
|
||||
}else {
|
||||
user.setSubject("[Code-Create] 自动续费失败 (" + subscriptionEmailParamsDTO.getOrderId() + ")");
|
||||
templateUser.setTemplateID(PAYMENT_FAILED_RENEWAL_USER_CN);
|
||||
}
|
||||
break;
|
||||
case "new":
|
||||
merchant.setSubject("[Code-Create] New Order(" + subscriptionEmailParamsDTO.getOrderId() + ")");
|
||||
@@ -859,7 +869,7 @@ public class SendEmailUtil {
|
||||
templateMerchant.setTemplateData(JSON.toJSONString(subscriptionEmailParamsDTO));
|
||||
merchant.setTemplate(templateMerchant);
|
||||
|
||||
if (!type.equals("cancel") && !type.equals("fail_new") && !type.equals("fail_renewal") ){
|
||||
if (!type.equals("cancel") && !type.equals("fail_new") ){
|
||||
// 返回的resp是一个SendEmailResponse的实例,与请求对象对应
|
||||
SendEmailResponse respUser = client.SendEmail(user);
|
||||
log.info("邮件主题:{},发送结果toUser###{}", user.getSubject(), SendEmailResponse.toJsonString(respUser));
|
||||
|
||||
Reference in New Issue
Block a user