Giter VIP home page Giter VIP logo

fuiou-pay's Introduction

📦 基于富友支付提供的文档开发的PHP SDK

要求

  1. PHP >= 7.2.5
  2. Composer

引入

$ composer require miposent/fuiou-pay

使用

先初始化:

<?php

use Miposent\FuiOuPay\Application;

$config = [
	'mode'         => 'dev',         //模式:dev=测试环境,pro=正式
	'ins_cd'       => 'xxxxxx',      //机构号(富有支付提供)
	'mchnt_cd'     => 'xxxxxxx',     //商户号(富有支付提供)
	'private_key'  => 'xxxxxxxxxx',  //私钥
	'public_key'   => 'xxxxxxxxxx',  //公钥
	'before_func'   =>function(array $request){}, //请求前回调用处理方法
	'after_func'   =>function(array $request,array $response){} //请求后回调用处理方法
];

$app = new Application($config );

普通线下扫码API:

<?php

use Miposent\FuiOuPay\Application;

//条码支付,商户扫用户二维码收款
$app->prepare->micropay($param);

//主扫统一下单
$app->prepare->preCreate($param);

//微信公众号(小程序)、支付宝服务窗(小程序)统一下单
$app->prepare->wxPreCreate($param);

//订单查询
$app->prepare->commonQuery($param);

//退款申请
$app->prepare->commonRefund($param);

//关闭订单
$app->prepare->closeOrder($param);

//撤销接口
$app->prepare->cancelOrder($param);

//退款查询
$app->prepare->refundQuery($param);

//历史订单查询
$app->prepare->hisTradeQuery($param);

//微信授权码查询openid / 银联授权码获取user_id
$app->prepare->auth2Openid($param);

//服务商模式获取openid
$app->prepare->getOpenid($param);

//微信委托代扣
$app->prepare->withhold($param);

//微信委托代扣查询
$app->prepare->withholdQuery($param);

扫码支付增值API:

//查询可结算资金信息
$app->scan->queryWithdrawAmt($param);

//查询手续费信息
$app->scan->queryFeeAmt($param);

//发起结算
$app->scan->withdraw($param);

//资金划拨查询
$app->scan->queryChnlPayAmt($param);

//钱包结算(原钱包提现)
$app->scan->walletWithdraw($param);

//钱包结算即时到账查询(原钱包提现D0查询)
$app->scan->walletWithdraw($param);

//退款账户余额查询接口
$app->scan->walletQueryWithdrawT0($param);

//退款账户余额查询接口
$app->scan->queryBalance($param);

//结算交易查询接口
$app->scan->querySettlement($param);

//微信刷脸支付,获取调用凭证
$app->scan->wxPayFaceGetAuthInfo($param);

//微信数据上报SDK签名获取接口
$app->scan->wxPayFaceGetDeviceSign($param);

其他

//解析xml
\Miposent\FuiOuPay\Core\Xml::decode($re);

注意

1.有时result_code报102错误时,有可能是要求参数问题,尽可能把参数全填(除reserved外),值默认空字符;
2.SDK不做日志处理,若需记录日志,请在初始化配置before_func和after_func中进行记录;

申明

本SDK是开源免费,因要求需要有与富友支付进行合作才可以使用此SDK

fuiou-pay's People

Contributors

miposent 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.