Giter Club home page Giter Club logo

payment-1's Introduction

payment-gateway

目标

在浏览器内和支付宝,微信JS,快钱等第三方支付进行集成的支付网关服务器

设计

数据库

  • t_payment_ext_conf:支付账户相关的支付前准备数据,支付后后台回调中业务处理的spring bean配置
  • t_payment_account:支付账户的配置信息
  • t_payment_transaction:每笔订单的实例信息

流程

  1. 在数据库配置支付帐号相关信息
  2. 根据商品订单信息,签名后,产生html表单
  3. 通过http或者https发送给各大支付平台
  4. 页面跳转到各大支付平台进行支付
  5. 支付完成后进行前台和后台回调
  6. 前台回调主要用于展示支付结果
  7. 后台回调主要用于交易完成

代码组织:

  • payment-common: 一系列基础库,例如签名,日期,日志等

  • payment-api: 定义一系列接口, 会在payment-server代码中被调用  org.klose.payment.api.PaymentProxy: 创建,更新支付信息,查询支付账户配置等
    org.klose.payment.api.CallBackAgent: 后台回调中的业务逻辑

  • payment-runtime: `PaymentProxy`接口的实现
    org.klose.payment.integration: 主要实现各大支付平台发送数据和后台调用逻辑

  • payment-server: 页面jsp代码和restful服务
    testPay.jsp:是主入口,调用PaymentResource#createPayment
    paymentForm.jsp:发送支付表单给第三方支付
    paymentResult.jsp:一个简单展示前台回调的默认实现

客户化:

实现'org.klose.payment.server.prepare.PaymentIntegrationService':准备商品,价格,订单等各种信息 实现'org.klose.payment.api.CallBackAgent':后台回调中“完成业务事物交易”

License

Copyright © 2016 Distributed under the Appache Public License version 2.0

payment-1's People

Contributors

klose911 avatar klose9111 avatar

Watchers

 avatar  avatar

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.