trollweb/afterpay-api
Composer 安装命令:
composer require trollweb/afterpay-api
包简介
Swagger generated api library for https://developer.afterpay.io/api
README 文档
README
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
This PHP package is automatically generated by the Swagger Codegen project:
- API version: v3
- Build package: io.swagger.codegen.languages.PhpClientCodegen
Requirements
PHP 5.4.0 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/afterpay-api/afterpay-api-lib.git"
}
],
"require": {
"afterpay-api/afterpay-api-lib": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php:
require_once('/path/to/SwaggerClient-php/autoload.php');
Tests
To run the unit tests:
composer install
./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Trollweb\AfterPayApi\Api\CheckoutApi();
$request = new \Trollweb\AfterPayApi\Model\AuthorizePaymentRequest(); // \Trollweb\AfterPayApi\Model\AuthorizePaymentRequest |
try {
$result = $api_instance->checkoutAuthorizePayment($request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CheckoutApi->checkoutAuthorizePayment: ', $e->getMessage(), PHP_EOL;
}
?>
Documentation for API Endpoints
All URIs are relative to https://api.afterpay.io
| Class | Method | HTTP request | Description |
|---|---|---|---|
| CheckoutApi | checkoutAuthorizePayment | POST /api/v3/checkout/authorize | Approves the payment for a specified customer and basket. Main use-cases are One-Step and Two-Step Authorization. Full fraud and credit scoring applied. If the online-shop customer enter the incorrect address data, the system delivers a suggestion for a corrected address. |
| CheckoutApi | checkoutAvailablePaymentMethods | POST /api/v3/checkout/payment-methods | Returns the available payment methods for a specified basket value and offers available for client. Returns monthly installment amount, interest and fees. Sending in customer data and contents of the basket to enhance the result is optional. If the online-shop customer enters the incorrect address data, the system delivers suggestion for a corrected address. Main use-case is Two-Step Authorize. |
| CheckoutApi | checkoutCreateContract | POST /api/v3/checkout/{checkoutId}/contract | Creates an installment and/or direct debit contract that can be displayed for the customer. |
| CommonApi | commonCustomerLookup | POST /api/v3/lookup/customer | Returns the customers address based on social security number or mobile number. |
| CommonApi | commonGetStatus | GET /api/v3/status | Gets the status of the service |
| CommonApi | commonGetVersion | GET /api/v3/version | Gets the version of the service |
| CommonApi | commonValidateAddress | POST /api/v3/validate/address | Check of the delivered customer addresses as well as a phonetic and associative identification of duplicates. Additionally, checks of client specific negative or positive lists can be processed. Usually, the AddressCheck is used for the pure verification of the address data e.g. for registration processes. |
| CommonApi | commonValidateBankAccount | POST /api/v3/validate/bank-account | Validates and evaluates the account and bank details in the context of direct debit payment. It is possible to transfer either the combination of BankCode and AccountNumber or IBAN and BIC |
| CustomerAccountApi | customerAccountAddEvent | POST /api/v3/customer-account/{accountNumber}/event | Add event to account |
| CustomerAccountApi | customerAccountAddTransaction | POST /api/v3/customer-account/{accountNumber}/transaction | Add transaction to account |
| CustomerAccountApi | customerAccountApplyForCredit | POST /api/v3/customer-account | Apply for customer account credit |
| CustomerAccountApi | customerAccountCreateUser | POST /api/v3/customer-account/{accountNumber}/user | Add user to account |
| CustomerAccountApi | customerAccountCreditLimit | GET /api/v3/customer-account/{accountNumber}/credit-limit | Get remaining account credit limit |
| CustomerAccountApi | customerAccountDeleteTransaction | DELETE /api/v3/customer-account/{accountNumber}/transaction/{transactionId} | Cancels transaction made by account |
| CustomerAccountApi | customerAccountLookupBySSN | GET /api/v3/customer-account/{ssn} | Find customer account by SSN (social security number) |
| OrderManagementApi | orderManagementAddShippingDetails | POST /api/v3/orders/{orderNumber}/captures/{captureNumber}/shipping-details | Add new shipping details information to the capture. |
| OrderManagementApi | orderManagementCapture | POST /api/v3/orders/{orderNumber}/captures | Completes the payment that has been authorized. Typically done when the order is shipped. Can be a full or partial capture of the order amount. |
| OrderManagementApi | orderManagementDeleteShippingDetails | DELETE /api/v3/orders/{orderNumber}/captures/{captureNumber}/shipping-details/{shippingNumber} | Delete shipping details information from the specific capture. |
| OrderManagementApi | orderManagementGetCapture | GET /api/v3/orders/{orderNumber}/captures/{captureNumber} | Returns all or specific captured payments of the order |
| OrderManagementApi | orderManagementGetOrder | GET /api/v3/orders/{orderNumber} | Returns the contents of the specified order |
| OrderManagementApi | orderManagementGetRefund | GET /api/v3/orders/{orderNumber}/refunds/{refundNumber} | Returns all or specific refunds of the order. |
| OrderManagementApi | orderManagementGetShippingDetails | GET /api/v3/orders/{orderNumber}/captures/{captureNumber}/shipping-details/{shippingNumber} | Returns all or specific shipping details information of the capture. |
| OrderManagementApi | orderManagementGetVoid | GET /api/v3/orders/{orderNumber}/voids/{voidNumber} | Returns all or specific voided (cancelled) authorizations of the order. |
| OrderManagementApi | orderManagementRefund | POST /api/v3/orders/{orderNumber}/refunds | Refunds a partially or fully captured payment. |
| OrderManagementApi | orderManagementUpdateShippingDetails | PATCH /api/v3/orders/{orderNumber}/captures/{captureNumber}/shipping-details/{shippingNumber} | Update shipping details information of the specific capture. |
| OrderManagementApi | orderManagementVoid | POST /api/v3/orders/{orderNumber}/voids | Void (cancel) an authorization that has not been captured. |
| ProductApi | productAvailableInstallmentPlans | POST /api/v3/lookup/installment-plans | Returns the available installment plans for the specific product/basket value. Returns monthly installment amount, interest and fees. Typically used on a product page. |
| SearchApi | searchSearchInvoicesProcessed | POST /api/v3/search/invoices/processed | Returns invoices matching criteria |
Documentation For Models
- Account
- AccountProduct
- AddEventToAccountRequest
- AddEventToAccountResponse
- AddShippingDetailsRequest
- AddShippingDetailsResponse
- AddTransactionRequest
- AddTransactionResponse
- AdditionalData
- AdditionalTransactionInfo
- Address
- Airline
- ApplyForAccountCreditRequest
- ApplyForAccountCreditResponse
- AuthorizePaymentRequest
- AuthorizePaymentResponse
- AvailableInstallmentPlansRequest
- AvailableInstallmentPlansResponse
- AvailablePaymentMethodsRequest
- AvailablePaymentMethodsResponse
- Bus
- Campaign
- CampaignInfo
- CancellationItem
- Cancellations
- Capture
- CaptureItem
- CaptureRequest
- CaptureResponse
- CheckoutCustomer
- ConsolidatedInvoice
- Contract
- CreateContractRequest
- CreateContractResponse
- CreateUserRequest
- CreateUserResponse
- Customer
- CustomerLookupRequest
- CustomerLookupResponse
- CustomerResponse
- CustomerRisk
- DeleteShippingDetailsResponse
- DeleteTransactionResponse
- DirectDebit
- DirectDebitInfo
- EventItem
- Ferry
- GetAllCapturesResponse
- GetAllRefundsResponse
- GetAllShippingDetailsResponse
- GetOrderResponse
- GetRemainingLimitResponse
- GetStatusResponse
- GetVersionResponse
- GetVoidsResponse
- Hotel
- Installment
- InstallmentInfo
- Insurance
- Invoice
- Itinerary
- ListTransactionsResponse
- LookupAccountBySsnResponse
- LookupAddress
- MarkInvoicesProcessedRequest
- MarkInvoicesProcessedResponse
- Marketplace
- OkResult
- Order
- OrderItem
- OrderItemExtended
- OrderRisk
- OrderSummary
- ParkCustomer
- PartnerData
- Passenger
- Payment
- PaymentMethod
- References
- Refund
- RefundItem
- RefundOrderItem
- RefundOrderRequest
- RefundOrderResponse
- Rental
- ResponseMessage
- ResponseOrderDetails
- ShippingDetails
- ShippingDetailsWithNumber
- Subscription
- Train
- Transaction
- UpdateShippingDetailsRequest
- UpdateShippingDetailsResponse
- UserProfile
- ValidateAddressRequest
- ValidateAddressResponse
- ValidateBankAccountRequest
- ValidateBankAccountResponse
- VoidAuthorizationRequest
- VoidAuthorizationResponse
Documentation For Authorization
apiKey
- Type: API key
- API key parameter name: X-Auth-Key
- Location: HTTP header
Author
trollweb/afterpay-api 适用场景与选型建议
trollweb/afterpay-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.31k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 04 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「api」 「sdk」 「swagger」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 trollweb/afterpay-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 trollweb/afterpay-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 trollweb/afterpay-api 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
Alfabank REST API integration
Zero-dependency raw PHP DNS resolver, domain-ownership verification, and intoDNS/MxToolbox-style diagnostics. Queries authoritative nameservers directly over sockets — never trusts the recursive cache for ownership checks.
A lightweight plain-PHP framework for database-backed CRUD APIs.
bughq error tracking - PHP SDK
ABsurge PHP SDK for feature flags and A/B testing
统计信息
- 总下载量: 3.31k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2017-04-18