提交 9f8b3749 authored 作者: zgy's avatar zgy

paypal支付

上级 b371a1b1
......@@ -20,6 +20,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
......@@ -57,6 +58,7 @@ public class PayPalServiceImpl implements PayPalService {
PayOrder order = new PayOrder("Order_payment:", "Order payment", realityPay, UUID.randomUUID().toString().replace("-", ""), PayPalTransactionType.sale);
Map orderInfo = service.orderInfo(order);
service.buildRequest(orderInfo, MethodType.POST);
result.setMessage(ResultCodeEnum.SUCCESS.getDesc());
}
} catch (Exception e) {
result.setCode(ResultCodeEnum.SERVICE_ERROR.getCode()).setMessage(e.getMessage());
......@@ -67,7 +69,7 @@ public class PayPalServiceImpl implements PayPalService {
}
@Override
public Result payForSuccess(HttpServletRequest request,String orderId) {
public Result payForSuccess(HttpServletRequest request, String orderId) {
Result result = new Result();
PayPalConfigStorage storage = new PayPalConfigStorage();
storage.setClientID(domainProperties.getProperty("paypal.client.app"));
......@@ -97,6 +99,7 @@ public class PayPalServiceImpl implements PayPalService {
return result;
}
private void removeRedisCache(TbCfOrderVo tbCfOrderVo) {
orderRedisCache.delete(KeyConstant.ORDER_DET + tbCfOrderVo.getOrderId());
String couponId = "";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论