From 04f09e52ffd4681bdfd85e51acd3da0d1280c3d3 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期六, 16 四月 2022 16:07:10 +0800 Subject: [PATCH] bug修复 --- src/test/java/com/hxh/spring/test/AlipayTest.java | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/src/test/java/com/hxh/spring/test/AlipayTest.java b/src/test/java/com/hxh/spring/test/AlipayTest.java index 95bda09..dd3466c 100644 --- a/src/test/java/com/hxh/spring/test/AlipayTest.java +++ b/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(); + } + } + } -- Gitblit v1.8.0