admin
2025-02-20 f537abe9f3646c739beaf15076246a2f71a347e9
src/test/java/com/hxh/spring/test/AlipayTest.java
@@ -17,6 +17,22 @@
public class AlipayTest {
    private AlipayAppInfo getAppInfo() {
        Properties properties = new Properties();
        try {
            properties.load(AlipayTest.this.getClass().getClassLoader().getResourceAsStream("alipay.properties"));
            String privateKey = properties.getProperty("private_key");
            String publicKey = properties.getProperty("alipay_public_key");
            AlipayAppInfo appInfo = new AlipayAppInfo("2021002122664142", privateKey, publicKey);
            return appInfo;
        } catch (Exception e) {
        }
        return null;
    }
    @Test
    public void test1() {
        Properties properties = new Properties();
@@ -67,5 +83,15 @@
    }
    @Test
    public void refound() {
        String orderNo = "buwan_vip_107";
        try {
            AlipayH5PayUtil.refund(getAppInfo(), orderNo, null, new BigDecimal("15"), orderNo+"_1");
        } catch (AlipayApiException e) {
            e.printStackTrace();
        }
    }
}