支付相关配置
This commit is contained in:
@@ -247,7 +247,7 @@ public class AliPayController extends AbstractAliPayApiController {
|
|||||||
// model.setPassbackParams("callback params");
|
// model.setPassbackParams("callback params");
|
||||||
model.setProductCode("QUICK_MSECURITY_PAY");
|
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", 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();
|
//String order = AliPayApi.appPayToResponse(model, domain, this.getApiConfig()).getBody();
|
||||||
System.out.println(JSONObject.toJSONString(orderInfo));
|
System.out.println(JSONObject.toJSONString(orderInfo));
|
||||||
return new CommonResult().success(order);
|
return new CommonResult().success(order);
|
||||||
@@ -834,7 +834,7 @@ public class AliPayController extends AbstractAliPayApiController {
|
|||||||
OmsOrder orderInfo = list.get(0);
|
OmsOrder orderInfo = list.get(0);
|
||||||
orderInfo.setStatus(OrderStatus.TO_DELIVER.getValue());
|
orderInfo.setStatus(OrderStatus.TO_DELIVER.getValue());
|
||||||
orderInfo.setPaymentTime(new Date());
|
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) {
|
if (verifyResult) {
|
||||||
// 更新订单信息
|
// 更新订单信息
|
||||||
@@ -855,7 +855,7 @@ public class AliPayController extends AbstractAliPayApiController {
|
|||||||
orderService.recordFenxiaoMoney(omsOrderItems, memberService.getById(orderInfo.getMemberId()));
|
orderService.recordFenxiaoMoney(omsOrderItems, memberService.getById(orderInfo.getMemberId()));
|
||||||
// TODO 请在这里加上商户的业务逻辑程序代码 异步通知可能出现订单重复通知 需要做去重处理
|
// TODO 请在这里加上商户的业务逻辑程序代码 异步通知可能出现订单重复通知 需要做去重处理
|
||||||
System.out.println("notify_url 验证成功succcess");
|
System.out.println("notify_url 验证成功succcess");
|
||||||
return new CommonResult().success();
|
return new CommonResult().success("支付成功");
|
||||||
} else {
|
} else {
|
||||||
log.error("订单" + out_trade_no + "支付失败");
|
log.error("订单" + out_trade_no + "支付失败");
|
||||||
orderService.releaseStock(orderInfo);
|
orderService.releaseStock(orderInfo);
|
||||||
|
|||||||
Reference in New Issue
Block a user