zfmaster / optile-opg-lib
v1.1.290
2019-10-25 10:35 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-09-25 22:03:28 UTC
README
RESTful API,用于服务器之间通过 optile Open Payment Gateway (OPG) 进行支付通信。调用此 API 需要授权。## 当前版本 * API 服务版本:1.1.289 * API 模型版本:1.20.87
此 PHP 包由 Swagger Codegen 项目自动生成
- API 版本:1.1.289
- 构建包:io.swagger.codegen.languages.PhpClientCodegen。更多信息,请访问 https://www.optile.net
需求
PHP 5.5 及更高版本
安装与使用
Composer
要通过 Composer 安装绑定,请在 composer.json 中添加以下内容
{
"repositories": [
{
"type": "git",
"url": "https://github.com/zfmaster/optile-opg-lib.git"
}
],
"require": {
"zfmaster/optile-opg-lib": "*@dev"
}
}
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门指南
请遵循 安装过程,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: payment_auth $config = Optile\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Optile\Api\ActivationApi( // 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(), $config ); $list_id = "list_id_example"; // string | The `longId` of a `LIST` session to complete an `ACTIVATION` operation $network = "network_example"; // string | The code of selected payment network $operation = new \Optile\Model\Operation(); // \Optile\Model\Operation | Holds information for `ACTIVATION` operation with selected payment network $view = array("view_example"); // string[] | Enables or disables view options to configure response when creating or retrieving `LIST`. Multiple options can be combined in the single value of the `view` query parameter. Use comma (\",\") to separate options. See \"Get LIST session details\" for more detailed information about the `view` query parameter. try { $result = $apiInstance->activatePaymentNetwork($list_id, $network, $operation, $view); print_r($result); } catch (Exception $e) { echo 'Exception when calling ActivationApi->activatePaymentNetwork: ', $e->getMessage(), PHP_EOL; } ?>
API 端点文档
所有 URI 都相对于 https://api.sandbox.oscato.com/api
模型文档
- AccountFormData
- AccountInfo
- AccountInputData
- AccountLinks
- AccountMask
- AccountRegistration
- Activation
- ActivationLinks
- Address
- ApplicableNetworkDesc
- Callback
- Charge
- ChargeLinks
- Checkbox
- Clearing
- ClientInfo
- Company
- CompanyIdentities
- Contract
- Customer
- CustomerAccount
- CustomerAddresses
- CustomerCollectedDetails
- CustomerFormData
- CustomerLinks
- CustomerRegistration
- DeregistrationData
- ErrorInfo
- ExpressList
- ExpressNetworkLinks
- ExpressNetworks
- ExpressOperation
- ExpressPreset
- ExpressPresetLinks
- ExpressPresetUpdate
- ExpressTransaction
- ExtraElement
- ExtraElements
- FormData
- Identification
- Identities
- Identity
- InputElement
- Installment
- InstallmentItem
- Installments
- InstallmentsPlan
- Interaction
- ListLinks
- LongReference
- Mandate
- MandateAuthentication
- Name
- NetworkLinks
- NetworkList
- NetworkSelection
- Networks
- Operation
- OperationPreselection
- OperationResult
- Parameter
- Payment
- PaymentAmount
- PaymentRecurring
- Payout
- PayoutLinks
- PhoneNumber
- Phones
- Preselection
- Preset
- PresetAccount
- PresetLinks
- Product
- ProviderParameters
- RecurringCallback
- RecurringPreselection
- RecurringTransaction
- Redirect
- Registration
- ReturnCode
- RiskData
- RiskDataCustomer
- RiskDataGift
- RiskDataPayment
- RiskDataShipping
- Route
- RouteCosts
- Routing
- SelectOption
- StandalonePreselection
- StandaloneStyle
- StandaloneTransaction
- Status
- Style
- Transaction
- ApplicableExpressNetwork
- ApplicableNetwork
授权文档
payment_auth
- 类型:HTTP 基本认证