Giter Site home page Giter Site logo

kissthink / thinkphp5-alipay Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dream2023/thinkphp5-alipay

0.0 1.0 0.0 612 KB

ThinkPHP5 支付宝支付扩展库, 包括手机网站支付、电脑网站支付、支付查询、退款、退款查询、对账单等

License: Apache License 2.0

PHP 100.00%

thinkphp5-alipay's Introduction

ThinkPHP5 电脑与手机支付扩展库(2017年9月18日)

使用说明

  • 在默认配置情况下,将文件夹拷贝到根目录即可, 其中extend目录为支付扩展目录, application\extra\alipay.php为配置文件
  • 需要在配置文件application\extra\alipay.php中填写必要的参数

注意

错误采用抛出异常的方式, 可根据自己的业务在统一接口进行修改

用法

电脑网站支付 Pagepay.php

调用 \alipay\Pagepay::pay($params) 即可

手机网站支付 Wappay.php

调用 \alipay\Wappay::pay($params) 即可

交易查询接口 Query.php

调用 \alipay\Query::exec($query_no) 即可

交易退款接口 Refund.php

调用 \alipay\Refund::exec($params) 即可

退款统一订单查询 RefundQuery.php

调用 \alipay\RefundQuery::exec($params) 即可

交易关闭接口 Close.php

调用 \alipay\Close::exec($query_no) 即可

查询账单下载地址接口 Datadownload.php

调用 \alipay\Datadownload::exec($bill_type, $bill_date) 即可

验签 Notify.php

调用 \alipay\Notify::check($params) 即可

通知处理步骤建议

  1. 验签
  2. 判断订单状态
  3. 进行业务操作
一下两个类仅为建议, 帮助理解, 可根据具体业务进行变更, 详细理解可参考官方文档和SDK
  • application\common\NotifyHandler.php 通知操作的处理类
  • application\example\Notify.php 具体实现

thinkphp5-alipay's People

Contributors

dream2023 avatar

Watchers

 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.