支付相关配置

This commit is contained in:
2023-03-04 15:47:18 +08:00
parent 3a4b9a2d9b
commit 2b3250a417

View File

@@ -247,7 +247,7 @@ public class AliPayController extends AbstractAliPayApiController {
// model.setPassbackParams("callback params");
model.setProductCode("QUICK_MSECURITY_PAY");
// String order = AliPayApi.appPayToResponse1(model, domain + "/aliPay/notify_url", this.getApiConfig()).getBody();
String order = AliPayApi.appPayToResponse1(model, domain + "/aliPay/notify_url", alipayClient()).getBody();
String order = AliPayApi.appPayToResponse1(model, DOMAIN + "/aliPay/notify_url", alipayClient()).getBody();
//String order = AliPayApi.appPayToResponse(model, domain, this.getApiConfig()).getBody();
System.out.println(JSONObject.toJSONString(orderInfo));
return new CommonResult().success(order);
@@ -834,7 +834,7 @@ public class AliPayController extends AbstractAliPayApiController {
OmsOrder orderInfo = list.get(0);
orderInfo.setStatus(OrderStatus.TO_DELIVER.getValue());
orderInfo.setPaymentTime(new Date());
boolean verifyResult = AlipaySignature.rsaCheckV1(params, publicKey, "UTF-8", "RSA2");
boolean verifyResult = AlipaySignature.rsaCertCheckV1(params, ALIPAY_PUBLIC_KEY, "UTF-8", "RSA2");
if (verifyResult) {
// 更新订单信息
@@ -855,7 +855,7 @@ public class AliPayController extends AbstractAliPayApiController {
orderService.recordFenxiaoMoney(omsOrderItems, memberService.getById(orderInfo.getMemberId()));
// TODO 请在这里加上商户的业务逻辑程序代码 异步通知可能出现订单重复通知 需要做去重处理
System.out.println("notify_url 验证成功succcess");
return new CommonResult().success();
return new CommonResult().success("支付成功");
} else {
log.error("订单" + out_trade_no + "支付失败");
orderService.releaseStock(orderInfo);