API definition for Reach's Drop-In API's. This version of the OpenAPI is intended for use with code generation tools.
PHP 7.4 and later. Should also work with PHP 8.0.
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/withreach/reach-client-php.git"
}
],
"require": {
"withreach/reach-client-php": "*@dev"
}
}Then run composer install
Download the files and include autoload.php:
<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new OpenAPI\Client\Api\OrderApi(
// 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
);
$order_id = cc7236aa-d11b-436c-a29c-d26cecadc847; // string | Order ID to be cancelled.
try {
$apiInstance->cancelOrder($order_id);
} catch (Exception $e) {
echo 'Exception when calling OrderApi->cancelOrder: ', $e->getMessage(), PHP_EOL;
}All URIs are relative to https://api.sandbox.withreach.com
| Class | Method | HTTP request | Description |
|---|---|---|---|
| OrderApi | cancelOrder | DELETE /v1/orders/{OrderId}/cancel | Cancel an Order. |
| OrderApi | captureOrder | POST /v1/orders/{OrderId}/capture | Capture an Order. |
| OrderApi | createOrder | POST /v1/orders | Create a new order |
| OrderApi | createRefund | POST /v1/orders/{OrderId}/refunds | Issue a refund against an order |
| OrderApi | getRefundById | GET /v1/orders/{OrderId}/refunds/{RefundId} | Retrieve a refund by id for a given order id |
| OrderApi | getRefundList | GET /v1/orders/{OrderId}/refunds | Retrieve a list of refunds for a given order id |
| OrderApi | retrieveOrder | GET /v1/orders/{OrderId} | Retrieve an Order. |
| RatesApi | getRate | GET /v2.21/getRate | Fetches information about a single rate offer. This will return information about the rate offer so long as it exists, even if it has expired. |
| RatesApi | getRates | GET /v2.21/getRates | Fetches the list of current foreign exchange rate offers that are available to the merchant. |
| SessionApi | cancelSession | DELETE /v1/session/{SessionId}/cancel | Cancel a non-final Session |
| SessionApi | createSession | POST /v1/session | Create a new Session |
| SessionApi | retrieveSession | GET /v1/session/{SessionId} | Retrieve a Session |
| SessionApi | updateSession | PUT /v1/session/{SessionId} | Update a session. |
- Action
- Address
- BankDetails
- BillingProfile
- CaptureResultResource
- Card
- Discount
- Display
- Error
- Expiry
- FieldErrors
- Ideal
- Item
- Online
- Order
- Payment
- Paypal
- RateOffer
- RateOffers
- Refund
- Session
- ShippingDetails
- Times
- Type: HTTP basic authentication
To run the tests, use:
composer install
vendor/bin/phpunitThis PHP package is automatically generated by the OpenAPI Generator project:
- API version:
1.0.0 - Build package:
org.openapitools.codegen.languages.PhpClientCodegen