|
|
@@ -67,6 +67,7 @@ public class StripeService {
|
|
|
if (OrderDon.Status.hasPayment.equals(orderDon.getStatus())) {
|
|
|
throw new BusinessRuntimeException(GatewayApiCode.METADATA_SYSTEM_ERROR.getCode(),"The donation has been paid");
|
|
|
}
|
|
|
+ String projectName = "Secure Payment";
|
|
|
StripePayConfig stripePayConfig = stripePayConfigMapper.selectById(1);
|
|
|
try {
|
|
|
Stripe.apiKey = stripePayConfig.getApiKey();
|
|
|
@@ -85,8 +86,8 @@ public class StripeService {
|
|
|
.setUnitAmount(money.longValue())
|
|
|
.setProductData(
|
|
|
SessionCreateParams.LineItem.PriceData.ProductData.builder()
|
|
|
- .setName("donation")
|
|
|
- .setDescription("donation")
|
|
|
+ .setName(projectName)
|
|
|
+ .setDescription(projectName)
|
|
|
.build()).build()).build()).build();
|
|
|
Session session = Session.create(params);
|
|
|
responseData.put("id", session.getId());
|
|
|
@@ -159,6 +160,7 @@ public class StripeService {
|
|
|
if (VipOrderDon.Status.hasPayment.equals(orderDon.getStatus())) {
|
|
|
throw new BusinessRuntimeException(GatewayApiCode.METADATA_SYSTEM_ERROR.getCode(),"该订单已支付");
|
|
|
}
|
|
|
+ String projectName = "Secure Payment";
|
|
|
StripePayConfig stripePayConfig = stripePayConfigMapper.selectById(1);
|
|
|
try {
|
|
|
Stripe.apiKey = stripePayConfig.getApiKey();
|
|
|
@@ -177,8 +179,8 @@ public class StripeService {
|
|
|
.setUnitAmount(money.longValue())
|
|
|
.setProductData(
|
|
|
SessionCreateParams.LineItem.PriceData.ProductData.builder()
|
|
|
- .setName("donation")
|
|
|
- .setDescription("donation")
|
|
|
+ .setName(projectName)
|
|
|
+ .setDescription(projectName)
|
|
|
.build()).build()).build()).build();
|
|
|
Session session = Session.create(params);
|
|
|
responseData.put("id", session.getId());
|