From 4ebe7c447e964e1b3ead12abb1d95b75faf67426 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期六, 27 二月 2021 15:22:46 +0800 Subject: [PATCH] PPTV完善,兼容多个系统的框架搭建 --- 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..457a194 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_48"; + try { + AlipayH5PayUtil.refund(getAppInfo(), orderNo, null, new BigDecimal("14.8"), orderNo+"_1"); + } catch (AlipayApiException e) { + e.printStackTrace(); + } + } + } -- Gitblit v1.8.0