oss-spring-boot-starter

alipay wechat some pay strategy

License

License

Categories

Categories

Spring Boot Container Microservices
GroupId

GroupId

cn.isuyu.boot
ArtifactId

ArtifactId

easy-pay-spring-boot-starter
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

oss-spring-boot-starter
alipay wechat some pay strategy
Project URL

Project URL

http://maven.apache.org
Source Code Management

Source Code Management

https://github.com/easy-pay/spring-boot-easy-pay

Download easy-pay-spring-boot-starter

How to add to project

<!-- https://jarcasting.com/artifacts/cn.isuyu.boot/easy-pay-spring-boot-starter/ -->
<dependency>
    <groupId>cn.isuyu.boot</groupId>
    <artifactId>easy-pay-spring-boot-starter</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/cn.isuyu.boot/easy-pay-spring-boot-starter/
implementation 'cn.isuyu.boot:easy-pay-spring-boot-starter:1.0.2'
// https://jarcasting.com/artifacts/cn.isuyu.boot/easy-pay-spring-boot-starter/
implementation ("cn.isuyu.boot:easy-pay-spring-boot-starter:1.0.2")
'cn.isuyu.boot:easy-pay-spring-boot-starter:jar:1.0.2'
<dependency org="cn.isuyu.boot" name="easy-pay-spring-boot-starter" rev="1.0.2">
  <artifact name="easy-pay-spring-boot-starter" type="jar" />
</dependency>
@Grapes(
@Grab(group='cn.isuyu.boot', module='easy-pay-spring-boot-starter', version='1.0.2')
)
libraryDependencies += "cn.isuyu.boot" % "easy-pay-spring-boot-starter" % "1.0.2"
[cn.isuyu.boot/easy-pay-spring-boot-starter "1.0.2"]

Dependencies

compile (7)

Group / Artifact Type Version
org.springframework.boot : spring-boot-autoconfigure jar
org.springframework.boot : spring-boot-configuration-processor Optional jar
org.springframework.boot : spring-boot-autoconfigure-processor Optional jar
com.alipay.sdk : alipay-sdk-java jar 4.8.73.ALL
com.github.binarywang : weixin-java-pay jar 3.2.0
org.projectlombok : lombok jar 1.18.6
javax.servlet : javax.servlet-api jar 4.0.1

Project Modules

There are no modules declared in this project.

Easy-Pay(点击跳转到框架通用版本

logo

使用前配置

  • 该jar springboot版本为2.0.2.RELEASE 如果想使用其它版本可以自行修改最外层pom.xml properties中的spring-boot.version版本就好 再发布到maven私服上。

  • 在项目pom.xml文件中引入Easy-Pay的依赖,该依赖已经发布到了maven的中央仓库。

<dependency>
    <groupId>cn.isuyu.boot</groupId>
    <artifactId>easy-pay-spring-boot-starter</artifactId>
    <version>1.0.2</version>
</dependency>

配置文件

  • 如果只需要接入支付宝或微信其中一种方式,只需要配置那个方式的配置就好,这里没有做参数非空校验
easy:
  pay:
    #支付宝支付参数配置
    alipay:
      #应用ID,您的APPID,收款账号既是您的APPID对应支付宝账号
      appId:
      #商户私钥,您的PKCS8格式RSA2私钥
      privateKey:
      publicKey:
      #服务器异步通知页面路径  需http://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问
      notifyUrl: http://0b228e36.ngrok.io/alipay/callback
      #页面跳转同步通知页面路径 需http://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问
      returnUrl: http://0b228e36.ngrok.io/
    #微信支付参数配置
    wxpay:
      #公众号appid
      appId:
      #商户id
      mchId:
      #支付api安全密钥
      mchKey:
      #支付结果回调地址
      payNotify: http://0b228e36.ngrok.io/wx/callback
      #退款结果回调(该值暂时还未使用到,因为退款我并没有做回调,待以后完善吧)
      refundNotify:
      #项目根目录根目录下的证书名称(退款需要用到证书)
      certName: wx_pay_cert.p12

文档

其它

有问题可以微信

cn.isuyu.boot
让支付变得更简单

Versions

Version
1.0.2
1.0.1
1.0.0.RELEASE
1.0.0