juliocapuano / pay-simple-sdk
此包是PHP对PaySimple Api的简单实现
v1.3.5
2022-04-29 14:41 UTC
Requires
- php: >=7.2
- ext-json: *
- guzzlehttp/guzzle: ^7.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.17
- fzaninotto/faker: ^1.9
- phpunit/phpunit: ^9.5
- roave/security-advisories: dev-latest
- vimeo/psalm: ^4.3
README
此包是PHP对PaySimple Api的简单实现
安装
您可以通过composer安装此包
composer require juliocapuano/pay-simple-sdk
用法
初始化客户端基础
$user_id ='<< PaySimple User ID >>'; $api_key ='<< PaySimple API Key >>'; $is_sanbox = true; // sanbox API for testing (optional) $paysimple = new PaySimple\V4\PaySimple($user_id, $api_key,[$is_sanbox]);
访问方法
// instance $paysimple = new PaySimple\V4\PaySimple($user_id, $api_key,[$is_sanbox]); // primary methods for specific instances $customerServiceInstance = $paysimple->customers(); $accountServiceInstance = $paysimple->accounts(); $paymentServiceInstance = $paysimple->payments(); $merchantServiceInstance = $paysimple->merchant(); $recurrentPaymentServiceInstance = $paysimple->recurrentPayments(); // creating customer instance $customer_data =[...]; // array data $new_customer = $paysimple->customers()->new($customer_data); // or $new_customer = $customerServiceInstance->new($customer_data);
测试
composer test
鸣谢
许可证
MIT许可证(MIT)。请参阅许可证文件以获取更多信息。