-
创建Spring Boot项目 并添加如下引入依赖
<dependency> <groupId>white.fisher</groupId> <artifactId>alipay-starter</artifactId> <version>0.0.1</version> </dependency>
- application.properties中配置支付宝相关属性
alipay.gateway-url= alipay.app-id= alipay.merchantPrivateKey= alipay.format=json alipay.charset=UTF-8 alipay.alipayPublicKey= alipay.signType=RSA2 alipay.return_url=http://ip/alipay/callback/return alipay.notify_url=http://ip/alipay/callback/notify
-
启动项目
- 发起支付请求调起支付页面
http://localhost:8080/alipay/pc/page/pay?outTradeNo=20181232103812831023123123&totalAmount=100&subject=支付测试