Giter Club home page Giter Club logo

yunpay's Introduction

composer require putyy/yun-pay:dev-master

yun-pay

云账户综合服务平台(//www.yunzhanghu.com/) api调用相关封装

本包主要调用方式分为两种

1.传入参数对象调用服务

require_once __DIR__ . '/bootstrap.php';

/**
 * 下单
 * 不同平台不同 data
 * 自行查阅 WGCYunPay\Data\Pay 相关data类
 */
$AliPayData = new \WGCYunPay\Data\Pay\AliPayData();
$AliPayData->order_id   = '2019002156137016397187466';
$AliPayData->real_name  = 'LW放下';
$AliPayData->id_card    = '500781598308210373';
$AliPayData->pay        = '1.00';
$AliPayData->notes      = '这只是一个测试';
$AliPayData->pay_remark = '这只是一个打款备注';
$AliPayData->card_no    = '18225298987';

$GoPay = new \WGCYunPay\Service\PayService($config, $AliPayData);
$res   = $GoPay->query();
var_dump($res);

2.链式操作调用

require_once __DIR__ . '/bootstrap.php';

//var_dump($config);
// 查询订单
$order = new \WGCYunPay\Service\OrderService($config);
$res   = $order
       ->setOrderId('2019002156137016ss3971231341211')
       ->setChannel('支付宝')
       ->query();
var_dump($res);

具体看tests目录的例子

个人博客 欢迎来访


yunpay's People

Contributors

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