2017 © Pedro Peláez
 

library thirdparty

pay or oauth or sms api client

image

zodream/thirdparty

pay or oauth or sms api client

  • Sunday, July 22, 2018
  • by zx648383079
  • Repository
  • 1 Watchers
  • 0 Stars
  • 44 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 7 % Grown

The README.md

thirdparty

第三方api 开发, (*1)

第三方接口目录

特别说明

所有错误都通过 throw new Exception();
请注意使用 try 捕获

, (*2)

第三方登录

, (*3)

QQ

配置, (*4)

'qq' => [
    'client_id' => '',
    'redirect_uri' => '',
    'client_secret' => ''
],

跳转网址, (*5)

$uri = QQ::login();

回调, (*6)

$oauth->callback();
$oauth->info();

, (*7)

微信

配置, (*8)

'wechat' => [
    'appid' => '',
    'redirect_uri' =>  ,
    'secret' => ''
],

跳转网址, (*9)

$uri = QQ::login();

回调, (*10)

$oauth->callback();
$oauth->info();

, (*11)

微博

配置, (*12)

'weibo' => [
    'client_id' => ' ',
    'redirect_uri' => '',
    'client_secret' => ''
],

跳转网址, (*13)

$uri = QQ::login();

回调, (*14)

$oauth->callback();
$oauth->info();

, (*15)

支付

, (*16)

微信APP支付

配置, (*17)

'wechat' => array(
    'appid' => '应用ID',
    'mch_id' => '商户号',
    'device_info' => 'web',
    'notify_url' => '异步回调网址',
    'trade_type' => 'APP',
    'key' => '密钥'
)

下订单, (*18)

$pay = new WeChat();
$order = $pay->order([
    'body' => '应用名-商品名',
    'out_trade_no' => 订单号,
    'total_fee' => 1分钱,
    'spbill_create_ip' => IP,
    'time_start' => date('Ymdis')
]);

调起支付的参数, (*19)

$pay->pay([
    'timestamp' =>  $model->created_at
])

异步回调, (*20)

$pay = new WeChat();
$data = $pay->callback();
if (empty($data)) {
    die($pay->appCallbackReturn([
        'return_code' => 'FAIL',
        'return_msg' => $pay->getError()
    ]));
}
die($pay->notifySuccess()); //成功时输出

, (*21)

支付宝APP支付

特别注意:支付宝签名需要包含 sign_type, 验签时不能包含 sign_type

配置, (*22)

'alipay' => array(
    'key' => '',
    'privateKeyFile' => '/alipay/rsa_private_key.pem',
    //'publicKeyFile' => '/alipay/alipay_rsa_public_key.pem',
    'publicKey' => '',
    'notify_url' => '',
    'partner' => '商户号',
    'seller_id' => 收款账号
)

调起支付的参数, (*23)

$pay = new AliPay();
$pay->mobilePayOrder([
    'timestamp' => date('Y-m-d H:i:s'),
    'subject' => 标题,
    'out_trade_no' => 订单号,
    'total_fee' => 0.01 元,
    'body' => 介绍
]);

异步回调, (*24)

$pay = new AliPay();
$data = $pay->callback();
die('success'); //成功时输出

, (*25)

第三方短信

, (*26)

阿里大于

配置, (*27)

'sms' => array(
    'app_key' => '',
    'secret' => '',
)

发送短信, (*28)

$sms = new ALiDaYu();
$sms->send('手机号', '模板id', [模板参数], '签名');

, (*29)

i互亿

配置, (*30)

'sms' => array(
    'account' => '账号',
    'password' => '密码',
    'template' => '{code}',   // 设置验证码模板
)

发送验证码, (*31)

IHuYi::sendCode('13412341234', '123456'): bool|ErrorException;

发送短信, (*32)

IHuYi::send('13412341234', '');

查询余额, (*33)

IHuYi::balance();

, (*34)

其他

, (*35)

搜索

百度链接提交, (*36)

Search::putBaiDu(['site' => '', 'token' => '']);

The Versions

22/07 2018

dev-master

9999999-dev https://github.com/zodream/thirdparty

pay or oauth or sms api client

  Sources   Download

MIT Apache Licence 2.0

The Requires

 

zodream thirdparty api

06/07 2018

2.2

2.2.0.0 https://github.com/zodream/thirdparty

pay or oauth or sms api client

  Sources   Download

MIT

The Requires

 

zodream thirdparty api

27/02 2018

v2.1

2.1.0.0 https://github.com/zodream/thirdparty

pay or oauth or sms api client

  Sources   Download

MIT

The Requires

 

zodream thirdparty api

25/01 2018

dev-dev-1.9

dev-dev-1.9 https://github.com/zodream/thirdparty

pay or oauth or sms api client

  Sources   Download

MIT

The Requires

 

zodream thirdparty api

24/01 2018

v2.0

2.0.0.0 https://github.com/zodream/thirdparty

pay or oauth or sms api client

  Sources   Download

MIT

The Requires

 

zodream thirdparty api

10/01 2018

v1.1

1.1.0.0 https://github.com/zodream/thirdparty

pay or oauth or sms api client

  Sources   Download

Apache Licence 2.0

The Requires

 

zodream thirdparty api

04/01 2018

v1.0

1.0.0.0 https://github.com/zodream/thirdparty

pay or oauth or sms api client

  Sources   Download

Apache Licence 2.0

The Requires

 

zodream thirdparty api