hraph / paygreen-api-php
PHP SQK 用于 Paygreen.io 支付提供商
1.1.1
2021-11-12 15:44 UTC
Requires
- php: >=7.1
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.12
- phpunit/phpunit: ^7.4
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-09-12 22:24:58 UTC
README
使用 OpenAPI 生成器生成的 Paygreen.io 支付提供商的 PHP SDK
Paygreen.io API 的规范可在 此处 获取
需求
PHP 7.1 及以上版本
安装与使用
Composer
通过 Composer 安装
运行 composer require hraph/paygreen-api-php
手动安装
下载文件并包含 autoload.php
require_once('/path/to/paygreen-api-php/vendor/autoload.php');
测试
运行单元测试
composer install ./vendor/bin/phpunit
入门
请按照 安装说明 进行操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); $apiInstance = new Hraph\PaygreenApi\Api\AuthentificationOAuthApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); $client_id = 'client_id_example'; // string | Variable OAuth contenant `accessPublic`. Exemple : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $grant_type = 'grant_type_example'; // string | Variable OAuth contenant la valeur du \"grant type\" OAuth (valeur: authorization_code) $code = 'code_example'; // string | Variable OAuth contenant le code generate après l'appel authorize OAuth try { $result = $apiInstance->apiAuthAccessTokenPost($client_id, $grant_type, $code); print_r($result); } catch (Exception $e) { echo 'Exception when calling AuthentificationOAuthApi->apiAuthAccessTokenPost: ', $e->getMessage(), PHP_EOL; } ?>
API 端点文档
所有 URI 都相对于 https://paygreen.fr
模型文档
- Account
- Address
- Association
- AuthAccessToken
- CardPrint
- ExecuteTransaction
- InlineResponse200
- InlineResponse2001
- InlineResponse20010
- InlineResponse20011
- InlineResponse20012
- InlineResponse20013
- InlineResponse2002
- InlineResponse2003
- InlineResponse2004
- InlineResponse2005
- InlineResponse2006
- InlineResponse2007
- InlineResponse2008
- InlineResponse2009
- Kyc
- PartnerConfig
- PatchAmount
- Payins
- PayinsBuyer
- PayinsShippingAddress
- PayinsBillingAddress
- PayinsCard
- PayinsMulti
- PayinsRecc
- PayinsReccOrderDetails
- Rib
- Shareholder
- Shop
- ShopPatch
- ShopWithVad
- Solidarity
- Transaction
- TransactionBuyer
- TransactionShippingAddress
- TransactionBillingAddress
- TransactionCard
- TransactionDonation
- TransactionResult
- TransactionSchedules
- Transfer