mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
支付宝参数设置
This commit is contained in:
@@ -2,6 +2,8 @@ import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.alipay.easysdk.base.oauth.models.AlipaySystemOauthTokenResponse;
|
||||
import com.alipay.easysdk.factory.Factory;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
@@ -252,6 +254,20 @@ public class SpringBootTestController {
|
||||
@Autowired
|
||||
private NotificationService notificationService;
|
||||
|
||||
@Test
|
||||
public void alipayLoginTest() {
|
||||
String refreshToken = "";
|
||||
String auth_code = "1741970ec0e7445fb2dd2712480dYX91";
|
||||
try {
|
||||
// AlipaySystemOauthTokenResponse alipaySystemOauthTokenResponse = Factory.Base.OAuth().refreshToken(refreshToken);
|
||||
// System.out.println(JSON.toJSONString(alipaySystemOauthTokenResponse));
|
||||
AlipaySystemOauthTokenResponse token = Factory.Base.OAuth().getToken(auth_code);
|
||||
System.out.println(JSON.toJSONString(token));
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getOrderRefundInfoListTest() {
|
||||
String orderCode = "C44565166677";
|
||||
|
||||
Reference in New Issue
Block a user