Skip to content

Latest commit

 

History

History
60 lines (48 loc) · 2.28 KB

README.md

File metadata and controls

60 lines (48 loc) · 2.28 KB

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

文档

其它