Skip to content

justapnet/justap-server-sdk-php

Repository files navigation

justap-server-sdk-php

  • API version: 1.0
  • Build package: io.swagger.codegen.languages.PhpClientCodegen

Document

https://www.justap.cn/docs

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/justapnet/justap-server-sdk-php.git"
    }
  ],
  "require": {
    "justapnet/justap-server-sdk-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/justap-server-sdk-php/vendor/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');

// Configure API key authorization: ApiKeyAuth
$config = Justapnet\Justap\Configuration::getDefaultConfiguration()->setApiKey('X-JUSTAP-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Justapnet\Justap\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-JUSTAP-API-KEY', 'Bearer');

$apiInstance = new Justapnet\Justap\Api\DefaultApi(
    // 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
);
$body = new \Justapnet\Justap\Model\V1CreateUserRequest(); // \Justapnet\Justap\Model\V1CreateUserRequest | 

try {
    $result = $apiInstance->businessUserServiceCreateUser($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->businessUserServiceCreateUser: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to http://127.0.0.1:21011

Class Method HTTP request Description
DefaultApi businessUserServiceCreateUser POST /v1/business_users 创建 Business User 对象
DefaultApi businessUserServiceDeleteUser DELETE /v1/business_users/{id} 删除 Business User 对象
DefaultApi businessUserServiceListAllUsers GET /v1/business_users 查询 Business User 对象列表
DefaultApi businessUserServiceRetrieveUser GET /v1/business_users/{id} 查询 Business User 对象
DefaultApi businessUserServiceSearchUsers GET /v1/business_users/search 查询 Business User 对象列表
DefaultApi businessUserServiceUpdateUser PUT /v1/business_users/{user.id} 更新 Business User 对象
DefaultApi businessUserServiceUpdateUser2 PATCH /v1/business_users/{user.id} 更新 Business User 对象
DefaultApi chargeServiceCharges POST /transaction/v1/charges 创建 Charge 对象
DefaultApi chargeServiceCharges2 POST /v1/charges 创建 Charge 对象
DefaultApi chargeServiceQueryCharge GET /transaction/v1/charges/{charge_id} 查询 Charge 对象
DefaultApi chargeServiceQueryCharge2 GET /v1/charges/{charge_id} 查询 Charge 对象
DefaultApi chargeServiceQueryCharge3 GET /v1/charges/merchant_trade_id/{merchant_trade_id} 查询 Charge 对象
DefaultApi chargeServiceQueryChargeList GET /transaction/v1/charges 查询 Charge 对象列表
DefaultApi chargeServiceQueryChargeList2 GET /v1/charges 查询 Charge 对象列表
DefaultApi chargeServiceReverseCharge POST /transaction/v1/charges/{charge_id}/reverse 撤销 Charge 对象
DefaultApi chargeServiceReverseCharge2 POST /v1/charges/{charge_id}/reverse 撤销 Charge 对象
DefaultApi refundServiceQueryRefund GET /transaction/v1/charges/{charge_id}/refunds/{refund_id} 查询 Refund 对象
DefaultApi refundServiceQueryRefund2 GET /v1/refunds/{refund_id} 查询 Refund 对象
DefaultApi refundServiceQueryRefundList GET /transaction/v1/charges/{charge_id}/refunds 查询 Refund 对象列表
DefaultApi refundServiceQueryRefundList2 GET /v1/refunds 查询 Refund 对象列表
DefaultApi refundServiceRefunds POST /transaction/v1/refunds 创建 Refund 对象
DefaultApi refundServiceRefunds2 POST /v1/refunds 创建 Refund 对象
DefaultApi royaltyServiceCreateRoyalty POST /v1/royalties 创建 Royalty 对象
DefaultApi royaltyServiceListAllRoyalties GET /v1/royalties 查询 Royalty 对象列表
DefaultApi royaltyServiceRetrieveRoyalty GET /v1/royalties/{id} 查询 Royalty 对象
DefaultApi settlementServiceCreateSettlementAccount POST /v1/settlement_accounts 创建结算账户
DefaultApi settlementServiceDeleteSettlementAccount DELETE /v1/settlement_accounts/{id} 删除结算账户
DefaultApi settlementServiceListAllSettlementAccounts GET /v1/settlement_accounts 查询结算账户列表
DefaultApi settlementServiceRetrieveSettlementAccount GET /v1/settlement_accounts/{id} 查询结算账户
DefaultApi settlementServiceSearchSettlementAccounts GET /v1/settlement_accounts/search 查询结算账户列表
DefaultApi settlementServiceUpdateSettlementAccount PUT /v1/settlement_accounts/{settlementAccount.id} 更新结算账户
DefaultApi settlementServiceUpdateSettlementAccount2 PATCH /v1/settlement_accounts/{settlementAccount.id} 更新结算账户
CheckoutServiceApi checkoutServiceCreateUnionQrCheckout POST /v1/checkout/union_qr 通过聚合收款码创建订单
CustomerServiceApi customerServiceCreateCustomer POST /v1/customers
CustomerServiceApi customerServiceDeleteCustomer DELETE /v1/customers/{id}
CustomerServiceApi customerServiceListAllCustomers GET /v1/customers
CustomerServiceApi customerServiceRetrieveCustomer GET /v1/customers/{id}
CustomerServiceApi customerServiceSearchCustomers GET /v1/customers/search
CustomerServiceApi customerServiceUpdateCustomer POST /v1/customers/{id}

Documentation For Models

Documentation For Authorization

ApiKeyAuth

  • Type: API key
  • API key parameter name: X-JUSTAP-API-KEY
  • Location: HTTP header

Author

support@justap.net