| | |
| | | |
| | | 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(); |
| | |
| | | |
| | | } |
| | | |
| | | @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(); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |