Giter Site home page Giter Site logo

pay-sdk-demo's Introduction

项目介绍

介绍:集成一些常用的支付,包含:
    1.PayPal
        - 订单支付
        - 订阅支付
    2.微信支付
        - PC端支付
        - 移动H5支付
        - 小程序支付
    3.支付宝支付
        - PC端支付
        - 移动H5支付
        - 移动APP支付

项目框架:

1. 基础框架:Spring-Boot-[2.3.7-RELEASE]
2. 接口文档:Swagger+Knife4j
3. 日志框架:Logback
4. 项目环境:JDK1.8+
5. 多语言/国际化:i18n

接口文档

地址:{localhost}:{port}/doc.html
示例:http://127.0.0.1:8080/doc.html
配置:在配置文件中,参数[swagger.enable]为是否在该环境下开启接口文档
接口文档参数说明:
    [支付宝/微信]:
        orderId:订单号
        amount:订单金额
        returnUrl:支付完成后,前端跳转页面
        openId:[你的微信号]对于[你开发的微信应用]的唯一识别号
    [paypal]:
        orderId:订单号
        amount:金额
        paymentId:
        payerId:
        subscriptionId:

注意事项

总括:
    1.如果不需要回调(支付结果通知),直接在本地运行就ok
    2.如果需要回调,需要部署在服务器上,且服务器有公网地址(建议)。或者使用内网穿透软件,直接在本地调试,比如[花生壳]。(不建议)   
    3.如果项目跑不起来,需要改配置文件中的[logging.file.path],改成你的本地路径即可

关于[支付宝]:
    1.数据返回时会把数据做Json Encode处理,所以前端接入的时候,需要对数据进行Decode
    2.[支付宝]需要的配置项,比较容易获取,就不多做赘述了。

关于[微信]:
    1.微信接入时,账号申请比较麻烦,要去[微信开放平台]、[微信公众平台]、[微信商户平台],都申请账号,且进行绑定
    2.一般来说,PC端,APP端,小程序/公众号,对应不同的APPID。需要接入哪个就去找相应的APPID。
    3.去微信商户平台申请账号后,能拿到大部分的配置信息,平台证书除外
    4.平台证书申请,请参照:https://github.com/wechatpay-apiv3/CertificateDownloader,或者直接去百度:获取微信平台证书

pay-sdk-demo's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.