stone/open_api_sdk

There is no license information available for the latest version (dev-master) of this package.

外部合作SDK

dev-master 2017-07-07 02:38 UTC

This package is not auto-updated.

Last update: 2024-11-19 18:41:36 UTC


README

composer require stone/open_api_sdk:dev-master

使用

加密解密:

use Stone\SDK\Util\Crypt;

$key = config('pub_key');
$params = [
    'appId' => '123123123',
    'outTradeNo' => '456456456456234',
];
$encrypted = Crypt::partnerEncrypt($params, $key);
//var_dump($encrypted);

$private_key = config('private_key');
$data = Crypt::platformDecrypt($encrypted, $private_key);
//var_dump($data);

开发测试

下载代码

git clone https://github.com/StoneGroup/open_api_php_sdk.git

初始化测试环境

cd open_api_php_sdk
composer dumpautoload

单元测试

phpunit