|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fdkankan.common.constant.Constant;
|
|
|
import com.fdkankan.common.constant.ErrorCode;
|
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
|
+import com.fdkankan.ucenter.common.EnLang;
|
|
|
import com.fdkankan.ucenter.common.constants.NacosProperty;
|
|
|
import com.fdkankan.ucenter.entity.IncrementOrder;
|
|
|
import com.fdkankan.ucenter.entity.IncrementType;
|
|
@@ -49,10 +50,9 @@ public class PaypalIncrement implements PayEntity {
|
|
|
String subject = null;
|
|
|
if(incrementOrderEntity.getIncrementType()!=null){
|
|
|
IncrementType incrementType = incrementTypeService.getById(incrementOrderEntity.getIncrementType());
|
|
|
- String un = incrementType.getValidTimeType() == 0 ?"年":"月";
|
|
|
- subject = incrementType.getName() + ":" + incrementOrderEntity.getCount() + "个/"+un ;
|
|
|
+ subject = getSubject(incrementOrderEntity,incrementType,order.getLang());
|
|
|
}else {
|
|
|
- subject = Constant.INCREMENT_SUBJECT + ":" + incrementOrderEntity.getCount() + "个/年";
|
|
|
+ subject = EnLang.senior_en + ":" + incrementOrderEntity.getCount() +EnLang.month_en ;
|
|
|
}
|
|
|
String orderSn = incrementOrderEntity.getOrderSn();
|
|
|
orderSn += "_increment";
|
|
@@ -62,6 +62,23 @@ public class PaypalIncrement implements PayEntity {
|
|
|
cancelUrl);
|
|
|
}
|
|
|
|
|
|
+ private String getSubject(IncrementOrder order,IncrementType incrementType, String lang) {
|
|
|
+ if("en".equals(lang) && incrementType.getValidTimeType() == 0){
|
|
|
+ return EnLang.premium_en + ":" + order.getCount() +EnLang.year_en ;
|
|
|
+ }
|
|
|
+ if("en".equals(lang) && incrementType.getValidTimeType() == 1){
|
|
|
+ return EnLang.senior_en + ":" + order.getCount() +EnLang.month_en ;
|
|
|
+ }
|
|
|
+ if("cn".equals(lang) && incrementType.getValidTimeType() == 0){
|
|
|
+ return EnLang.premium_cn + ":" + order.getCount() +EnLang.year_cn ;
|
|
|
+ }
|
|
|
+ if("cn".equals(lang) && incrementType.getValidTimeType() == 1){
|
|
|
+ return EnLang.senior_cn + ":" + order.getCount() +EnLang.month_cn ;
|
|
|
+ }
|
|
|
+ return EnLang.senior_en + ":" + order.getCount() +EnLang.month_en ;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@Override
|
|
|
public String getType() {
|
|
|
return "paypal_4";
|