定制 trollweb/afterpay-api 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

ClassMethodHTTP requestDescription
CheckoutApicheckoutAuthorizePaymentPOST /api/v3/checkout/authorizeApproves 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.
CheckoutApicheckoutAvailablePaymentMethodsPOST /api/v3/checkout/payment-methodsReturns 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.
CheckoutApicheckoutCreateContractPOST /api/v3/checkout/{checkoutId}/contractCreates an installment and/or direct debit contract that can be displayed for the customer.
CommonApicommonCustomerLookupPOST /api/v3/lookup/customerReturns the customers address based on social security number or mobile number.
CommonApicommonGetStatusGET /api/v3/statusGets the status of the service
CommonApicommonGetVersionGET /api/v3/versionGets the version of the service
CommonApicommonValidateAddressPOST /api/v3/validate/addressCheck 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.
CommonApicommonValidateBankAccountPOST /api/v3/validate/bank-accountValidates 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
CustomerAccountApicustomerAccountAddEventPOST /api/v3/customer-account/{accountNumber}/eventAdd event to account
CustomerAccountApicustomerAccountAddTransactionPOST /api/v3/customer-account/{accountNumber}/transactionAdd transaction to account
CustomerAccountApicustomerAccountApplyForCreditPOST /api/v3/customer-accountApply for customer account credit
CustomerAccountApicustomerAccountCreateUserPOST /api/v3/customer-account/{accountNumber}/userAdd user to account
CustomerAccountApicustomerAccountCreditLimitGET /api/v3/customer-account/{accountNumber}/credit-limitGet remaining account credit limit
CustomerAccountApicustomerAccountDeleteTransactionDELETE /api/v3/customer-account/{accountNumber}/transaction/{transactionId}Cancels transaction made by account
CustomerAccountApicustomerAccountLookupBySSNGET /api/v3/customer-account/{ssn}Find customer account by SSN (social security number)
OrderManagementApiorderManagementAddShippingDetailsPOST /api/v3/orders/{orderNumber}/captures/{captureNumber}/shipping-detailsAdd new shipping details information to the capture.
OrderManagementApiorderManagementCapturePOST /api/v3/orders/{orderNumber}/capturesCompletes the payment that has been authorized. Typically done when the order is shipped. Can be a full or partial capture of the order amount.
OrderManagementApiorderManagementDeleteShippingDetailsDELETE /api/v3/orders/{orderNumber}/captures/{captureNumber}/shipping-details/{shippingNumber}Delete shipping details information from the specific capture.
OrderManagementApiorderManagementGetCaptureGET /api/v3/orders/{orderNumber}/captures/{captureNumber}Returns all or specific captured payments of the order
OrderManagementApiorderManagementGetOrderGET /api/v3/orders/{orderNumber}Returns the contents of the specified order
OrderManagementApiorderManagementGetRefundGET /api/v3/orders/{orderNumber}/refunds/{refundNumber}Returns all or specific refunds of the order.
OrderManagementApiorderManagementGetShippingDetailsGET /api/v3/orders/{orderNumber}/captures/{captureNumber}/shipping-details/{shippingNumber}Returns all or specific shipping details information of the capture.
OrderManagementApiorderManagementGetVoidGET /api/v3/orders/{orderNumber}/voids/{voidNumber}Returns all or specific voided (cancelled) authorizations of the order.
OrderManagementApiorderManagementRefundPOST /api/v3/orders/{orderNumber}/refundsRefunds a partially or fully captured payment.
OrderManagementApiorderManagementUpdateShippingDetailsPATCH /api/v3/orders/{orderNumber}/captures/{captureNumber}/shipping-details/{shippingNumber}Update shipping details information of the specific capture.
OrderManagementApiorderManagementVoidPOST /api/v3/orders/{orderNumber}/voidsVoid (cancel) an authorization that has not been captured.
ProductApiproductAvailableInstallmentPlansPOST /api/v3/lookup/installment-plansReturns the available installment plans for the specific product/basket value. Returns monthly installment amount, interest and fees. Typically used on a product page.
SearchApisearchSearchInvoicesProcessedPOST /api/v3/search/invoices/processedReturns invoices matching criteria

Documentation For Models

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 我们能提供哪些服务?
定制开发 / 二次开发

基于 trollweb/afterpay-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 3.31k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2017-04-18