Documentation RelayPay API v2.0.0
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/relaypay-public/merchant-php-client.git"
}
],
"require": {
"relaypay-public/merchant-php-client": "*@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');
$apiInstance = new RelayPay\Api\ECommerceApi(
// 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()
);
$x_api_key = 'x_api_key_example'; // string
$x_merchant_id = 'x_merchant_id_example'; // string
$order_id = 'order_id_example'; // string
try {
$result = $apiInstance->getMerchantTransaction($x_api_key, $x_merchant_id, $order_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ECommerceApi->getMerchantTransaction: ', $e->getMessage(), PHP_EOL;
}
All URIs are relative to https://api.sandbox.relaypay.io/api
Class | Method | HTTP request | Description |
---|---|---|---|
ECommerceApi | getMerchantTransaction | GET /e-commerce/transaction | Get merchant transaction by a specified orderId |
ECommerceApi | getMerchantTxs | GET /e-commerce/transaction/history | Get all bill payment transactions for the merchant |
ECommerceApi | getMerchantWebhookLogs | GET /e-commerce/transaction/webhooks | Get merchant webhook logs in date range |
ECommerceApi | setEcommerceRequest | POST /e-commerce/request | Ecommerce provider sends a transaction request. |
ECommerceApi | setEcommerceSalesforce | POST /e-commerce/salesforce | Ecommerce provider pushes a Salesforce specific data for authorisation. |
MerchantSignatureTestingApi | generateSign | POST /merchant/generate-sign | Testing header signature generation. |
MerchantSignatureTestingApi | verifyEcommerceApiKeys | POST /e-commerce/verify-signature | Ecommerce provider verifies signed request. |
- EcommerceIncomingRequest
- EcommerceMerchantTransaction
- EcommerceResponse
- MerchantSalesforcePlugin
- MerchantWebhookLog
- PageEcommerceMerchantTransaction
- PageMerchantWebhookLog
- Pageable
- SortObject
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
To run the tests, use:
composer install
vendor/bin/phpunit
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
2.0.0
- Generator version:
7.10.0
- Generator version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen