添加判断,确认邮件是否发送成功
This commit is contained in:
@@ -450,7 +450,7 @@ public class StripeServiceImpl implements StripeService {
|
||||
InvoiceLineItem invoiceLineItem = invoice.getLines().getData().get(0);
|
||||
String description = invoiceLineItem.getDescription();
|
||||
Long amount = invoiceLineItem.getAmount();
|
||||
log.info("单次订阅 description : {}, amount: {}", description, amount);
|
||||
log.info("单次订阅 description : {}, amount: {} 分", description, amount);
|
||||
boolean b = createSubscriptionAndUpdateAccount(orderNo, orderByOrderNo.getAccountId(), description, amount);
|
||||
// 邮件通知用户
|
||||
if (b){
|
||||
@@ -1002,7 +1002,8 @@ public class StripeServiceImpl implements StripeService {
|
||||
emailParamsDTO.setEndOfPrepaidTerm(DateUtil.changeTimeStampFormat(subscriptionInfo.getCurrentPeriodEnd(), "seconds", CommonConstant.TIME_FORMAT_MMM_dd_yyyy));
|
||||
setSubscriptionParams(paymentInfo, subscriptionInfo, orderByOrderNo, emailParamsDTO, language);
|
||||
|
||||
SendEmailUtil.subscriptionEmailReminder(type, emailParamsDTO, language, account.getUserEmail());
|
||||
boolean b = SendEmailUtil.subscriptionEmailReminder(type, emailParamsDTO, language, account.getUserEmail());
|
||||
if (!b) return false;
|
||||
|
||||
// 邮件通知成功后,更新标志
|
||||
if (!type.equals("reminder") && !type.equals("cancel")){
|
||||
@@ -1039,7 +1040,8 @@ public class StripeServiceImpl implements StripeService {
|
||||
emailParamsDTO.setPaymentMethod(paymentInfo.getPaymentMethod());
|
||||
emailParamsDTO.setLast4(paymentInfo.getLast4());
|
||||
|
||||
SendEmailUtil.subscriptionEmailReminder("fail_new", emailParamsDTO, language, account.getUserEmail());
|
||||
boolean b = SendEmailUtil.subscriptionEmailReminder("fail_new", emailParamsDTO, language, account.getUserEmail());
|
||||
if (!b) return false;
|
||||
|
||||
// 邮件通知成功后,更新标志
|
||||
PaymentInfo payment = new PaymentInfo();
|
||||
@@ -1100,7 +1102,8 @@ public class StripeServiceImpl implements StripeService {
|
||||
setSubscriptionParams(paymentInfo, subscriptionInfo, orderByOrderNo, emailParamsDTO, language);
|
||||
|
||||
// 4、发邮件
|
||||
SendEmailUtil.subscriptionEmailReminder("fail_renewal", emailParamsDTO, language, account.getUserEmail());
|
||||
boolean b = SendEmailUtil.subscriptionEmailReminder("fail_renewal", emailParamsDTO, language, account.getUserEmail());
|
||||
if (!b) return false;
|
||||
|
||||
PaymentInfo payment = new PaymentInfo();
|
||||
payment.setId(paymentInfo.getId());
|
||||
|
||||
Reference in New Issue
Block a user