citypay / citypay-api-client-php
欢迎使用CityPay API,这是一个强大的HTTP API支付解决方案,专为无缝的端到端交易处理而设计。我们的API支持广泛的支付操作,满足各种商业需求。无论您是集成互联网支付、处理邮购/电话订单(MOTO)交易、管理带有循环和持续授权支付的订阅,还是处理3-D Secure认证的复杂性,我们的API都能满足您的需求。此外,我们还提供授权、退款、预授权、取消/作废和完成处理等功能,以及支持标记化支付。
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
- dev-main
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-test/bitbucket-pipeline
- dev-feature/client-build-1.1.2
- dev-feature/client-build-1.1.1
- dev-feature/direct_post_mac
- dev-feature/client-build-1.0.8
- dev-feature/client-build-1.0.7
- dev-feature/client-build-1.0.6
- dev-feature/client-build-1.0.5
- dev-feature/client-build-1.0.4
- dev-feature/client-build-1.0.3
This package is auto-updated.
Last update: 2024-09-19 08:57:20 UTC
README
欢迎使用CityPay API,这是一个强大的HTTP API支付解决方案,专为无缝的端到端交易处理而设计。我们的API支持广泛的支付操作,满足各种商业需求。无论您是集成互联网支付、处理邮购/电话订单(MOTO)交易、管理带有循环和持续授权支付的订阅,还是处理3-D Secure认证的复杂性,我们的API都能满足您的需求。此外,我们还提供授权、退款、预授权、取消/作废和完成处理等功能,以及支持标记化支付。
合规性和安全概述
确保支付交易的安全性和符合行业标准至关重要。我们的API采用严格的安全措施和合规性协议,以保护敏感信息并满足Visa、MasterCard和PCI安全标准委员会的严格要求。关键合规性和安全措施
- TLS加密:所有数据传输必须使用TLS 1.2或更高版本,并采用强加密。我们的基础设施严格执行这一要求,以维护传输中数据的完整性和机密性。我们定期扫描和评估我们的TLS端点,以识别和缓解漏洞。
- 数据存储禁令:禁止存储敏感卡持卡人数据(CHD),如卡安全码(CSC)或主要账户号码(PAN)。我们的API旨在最大限度地减少您接触敏感数据的机会,从而减轻您的合规负担。
- 数据屏蔽:为了保护消费者和符合规定,不得在收据或任何面向客户的材料上显示完整的卡号。我们的API自动屏蔽PAN,仅显示最后四位数字,以便安全生成收据。
- 网络扫描:如果您的应用程序是基于Web的,则定期扫描您的托管环境是强制性的,以识别和纠正潜在漏洞。这一主动措施对于维护安全且符合规定的在线存在至关重要。
- PCI合规性:遵守PCI DSS标准不是可选项;它是支付生态系统安全合法运营的要求。有关合规性要求和资源的详细信息,请访问PCI安全标准委员会网站https://www.pcisecuritystandards.org/。
- 请求验证:我们的API包括验证每个请求合法性的机制,确保其与有效账户相关并来自可信来源。我们利用远程IP地址验证和复杂的应用程序防火墙技术来阻止各种常见的安全威胁。
入门
在集成CityPay API之前,请确保您的应用程序和开发实践与概述的合规性和安全措施相一致。这一准备步骤对于顺利集成过程和支付处理操作的长期成功至关重要。
有关API端点、请求/响应格式和代码示例的更多详细信息,请参阅文档的后续部分。我们的目标是为您提供所有必要的工具和信息,以便将我们的支付处理功能无缝集成到您的应用程序中。
感谢您选择CityPay API。我们期待着用我们的安全、合规和灵活的API解决方案来支持您的支付处理需求。
如需更多信息,请访问https://www.citypay.com/contacts/。
安装与使用
要求
PHP 7.4及更高版本。也应在PHP 8.0上运行。
Composer
要通过Composer安装绑定,请将以下内容添加到composer.json
{ "repositories": [ { "type": "vcs", "url": "https://github.com/citypay/citypay-api-client-php.git" } ], "require": { "citypay/citypay-api-client-php": "*@dev" } }
然后运行composer install
手动安装
下载文件并包含autoload.php
<?php require_once('/path/to/CityPay/vendor/autoload.php');
入门
请按照安装程序操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: cp-api-key $config = CityPay\Configuration::getDefaultConfiguration()->setApiKey(cp-api-key, $apiKey = ApiKey::newKey($clientId, $licenceKey); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = CityPay\Configuration::getDefaultConfiguration()->setApiKey(cp-api-key, $apiKey = ApiKey::newKey($clientId, $licenceKey); $apiInstance = new CityPay\Api\AuthorisationAndPaymentApi( // 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 ); $auth_request = new \CityPay\Model\AuthRequest(); // \CityPay\Model\AuthRequest try { $result = $apiInstance->authorisationRequest($auth_request); print_r($result); } catch (Exception $e) { echo 'Exception when calling AuthorisationAndPaymentApi->authorisationRequest: ', $e->getMessage(), PHP_EOL; }
API端点
所有URI都相对于https://api.citypay.com
模型
- AccountCreate
- AccountStatus
- Acknowledgement
- AclCheckRequest
- AclCheckResponseModel
- AirlineAdvice
- AirlineSegment
- AuthReference
- AuthReferences
- AuthRequest
- AuthResponse
- Batch
- BatchReportRequest
- BatchReportResponseModel
- BatchTransaction
- BatchTransactionReportRequest
- BatchTransactionReportResponse
- BatchTransactionResultModel
- Bin
- BinLookup
- CResAuthRequest
- CaptureRequest
- Card
- CardHolderAccount
- CardStatus
- ChargeRequest
- CheckBatchStatus
- CheckBatchStatusResponse
- ContactDetails
- Decision
- DirectPostRequest
- DirectTokenAuthRequest
- DomainKeyCheckRequest
- DomainKeyRequest
- DomainKeyResponse
- Error
- EventDataModel
- Exists
- ExternalMPI
- ListMerchantsResponse
- MCC6012
- Merchant
- MerchantBatchReportRequest
- MerchantBatchReportResponse
- MerchantBatchResponse
- NetSummaryResponse
- PaResAuthRequest
- PaylinkAddress
- PaylinkAdjustmentRequest
- PaylinkAttachmentRequest
- PaylinkAttachmentResult
- PaylinkBillPaymentTokenRequest
- PaylinkCardHolder
- PaylinkCart
- PaylinkCartItemModel
- PaylinkConfig
- PaylinkCustomParam
- PaylinkEmailNotificationPath
- PaylinkErrorCode
- PaylinkFieldGuardModel
- PaylinkPartPayments
- PaylinkResendNotificationRequest
- PaylinkSMSNotificationPath
- PaylinkStateEvent
- PaylinkTokenCreated
- PaylinkTokenRequestModel
- PaylinkTokenStatus
- PaylinkTokenStatusChangeRequest
- PaylinkTokenStatusChangeResponse
- PaylinkUI
- PaymentIntent
- PaymentIntentReference
- Ping
- ProcessBatchRequest
- ProcessBatchResponse
- RefundRequest
- RegisterCard
- RemittanceData
- RemittanceReportRequest
- RemittanceReportResponse
- RemittedClientData
- RequestChallenged
- RetrieveRequest
- ThreeDSecure
- TokenisationResponseModel
- VoidRequest
Authorization
为API定义的认证方案
cp-api-key
- 类型:API密钥
- API密钥参数名:cp-api-key
- 位置:HTTP头
cp-domain-key
- 类型:API密钥
- API密钥参数名:cp-domain-key
- 位置:URL查询字符串
测试
要运行测试,请使用
composer install vendor/bin/phpunit
作者
关于本包
此PHP包是由OpenAPI Generator项目自动生成的
- API版本:
6.6.40
- 包版本:
1.1.2
- 生成器版本:
7.5.0
- 包版本:
- 构建包:
org.openapitools.codegen.languages.PhpClientCodegen