Commit edfa7bf9 authored by chenchao.deng's avatar chenchao.deng

支付回调

parent 0bebe83d
......@@ -36,7 +36,7 @@ import java.util.*;
@RequestMapping("/user")
public class AccountController {
public static final String WECHAT_PAY_CALLBACK_URL = "https://cloudam.cn/accounts/0xwxpaycallback/";
public static final String WECHAT_PAY_CALLBACK_URL = "http://47.119.25.86:1729/payCallBack/wx/";
public static final String ALIPAY_PAY_CALLBACK_URL = "https://cloudam.cn/accounts/0xalipaycallback/";
......
package com.edgec.browserbackend.account.controller;
import com.edgec.browserbackend.account.service.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
/**
* 回调接口
*
* @Author: Chen
* @Date: 2024/09/20
*/
@RestController
@RequestMapping("/payCallBack")
public class PayCallBackController {
@Autowired
private PaymentService paymentService;
/**
* 使用微信进行账户充值成功后,微信会调用该接口
*/
@RequestMapping(path = "/wx/{tradno}")
public String wechatPayCallback(@PathVariable String tradno) {
return paymentService.wechatPayCallback(tradno);
}
@RequestMapping(path = "/ali/{tradno}")
public void alipayPayCallback(@PathVariable String tradno) {
paymentService.alipaCallback(tradno);
}
}
......@@ -34,7 +34,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
public void configure(WebSecurity web) throws Exception {
web.ignoring()
.antMatchers("/user/authCode", "/user/signUp",
"/user/forgot**", "/0xadministrator/getconfig**");
"/user/forgot**", "/0xadministrator/getconfig**","/payCallBack/*");
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment