Axerve API client made for PHP
This PHP package is automatically generated by the Axerve Codegen project:
- API version: 1.0.0
- Build package: io.axerve.codegen.v3.generators.php.PhpClientCodegen
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
require_once('/path/to/AxerveClient-php/vendor/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = Axerve\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Axerve\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Axerve\Client\Api\PaymentApi(
// 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 \Axerve\Client\Model\Body(); // \Axerve\Client\Model\Body |
try {
$result = $apiInstance->apiV1CheckCreditCardPost($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PaymentApi->apiV1CheckCreditCardPost: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Axerve\Client\Api\PaymentApi(
// 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()
);
$body = new \Axerve\Client\Model\CancelPaymentRequestModel(); // \Axerve\Client\Model\Body6 |
try {
$apiInstance->apiV1PaymentCancelPost($body);
} catch (Exception $e) {
echo 'Exception when calling PaymentApi->apiV1PaymentCancelPost: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Axerve\Client\Api\PaymentApi(
// 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()
);
$body = new \Axerve\Client\Model\Body4(); // \Axerve\Client\Model\Body4 |
try {
$apiInstance->apiV1PaymentCapturePost($body);
} catch (Exception $e) {
echo 'Exception when calling PaymentApi->apiV1PaymentCapturePost: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Axerve\Client\Api\PaymentApi(
// 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()
);
$body = new \Axerve\Client\Model\CreatePaymentModel(); // \Axerve\Client\Model\Body1 |
try {
$result = $apiInstance->create($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PaymentApi->apiV1PaymentCreatePost: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Axerve\Client\Api\PaymentApi(
// 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()
);
$payment_id = "payment_id_example"; // string |
$language_id = "language_id_example"; // string |
$payment_token = "payment_token_example"; // string |
try {
$result = $apiInstance->apiV1PaymentMethodsPaymentIdLanguageIdGet($payment_id, $language_id, $payment_token);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PaymentApi->apiV1PaymentMethodsPaymentIdLanguageIdGet: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Axerve\Client\Api\PaymentApi(
// 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()
);
$body = new \Axerve\Client\Model\Body5(); // \Axerve\Client\Model\Body5 |
try {
$apiInstance->apiV1PaymentRefundPost($body);
} catch (Exception $e) {
echo 'Exception when calling PaymentApi->apiV1PaymentRefundPost: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Axerve\Client\Api\PaymentApi(
// 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()
);
$body = new \Axerve\Client\Model\SubmitPaymentModel(); // \Axerve\Client\Model\Body3 |
$payment_token = "payment_token_example"; // string |
try {
$apiInstance->submit($body, $payment_token);
} catch (Exception $e) {
echo 'Exception when calling PaymentApi->apiV1PaymentSubmitPost: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Axerve\Client\Api\PaymentApi(
// 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()
);
$body = new \Axerve\Client\Model\Body2(); // \Axerve\Client\Model\Body2 |
try {
$result = $apiInstance->apiV1PaymentUpdatePost($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PaymentApi->apiV1PaymentUpdatePost: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: ApiKeyAuth
$config = Axerve\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Axerve\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Axerve\Client\Api\PaymentApi(
// 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
);
$shop_login = "shop_login_example"; // string |
try {
$result = $apiInstance->apiV1ShopMethodsShopLoginGet($shop_login);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PaymentApi->apiV1ShopMethodsShopLoginGet: ', $e->getMessage(), PHP_EOL;
}
?>
All URIs are relative to https://sandbox.gestpay.net
Class | Method | HTTP request | Description |
---|---|---|---|
PaymentApi | apiV1CheckCreditCardPost | POST /api/v1/check/creditCard/ | |
PaymentApi | apiV1PaymentCancelPost | POST /api/v1/payment/cancel/ | |
PaymentApi | apiV1PaymentCapturePost | POST /api/v1/payment/capture/ | |
PaymentApi | apiV1PaymentCreatePost | POST /api/v1/payment/create | |
PaymentApi | apiV1PaymentMethodsPaymentIdLanguageIdGet | GET /api/v1/payment/methods/{paymentId}/{languageId} | |
PaymentApi | apiV1PaymentRefundPost | POST /api/v1/payment/refund/ | |
PaymentApi | apiV1PaymentSubmitPost | POST /api/v1/payment/submit | |
PaymentApi | apiV1PaymentUpdatePost | POST /api/v1/payment/update | |
PaymentApi | apiV1ShopMethodsShopLoginGet | GET /api/v1/shop/methods/{shopLogin} |
- Apiv1checkcreditCardCreditcard
- Apiv1paymentcreateOrderDetails
- Apiv1paymentcreateOrderDetailsCustomerDetail
- Apiv1paymentcreateOrderDetailsShippingAddress
- Apiv1paymentcreatePaymentChannel
- Apiv1paymentcreateShippingDetails
- Apiv1paymentsubmitBuyer
- Apiv1paymentsubmitPaymentTypeDetails
- Apiv1paymentsubmitPaymentTypeDetailsCreditcard
- Apiv1paymentsubmitResponseURLs
- Body
- Body1
- Body2
- Body3
- Body4
- Body5
- Body6
- InlineResponse200
- InlineResponse2001
- InlineResponse2001Error
- InlineResponse2001Payload
- InlineResponse2002
- InlineResponse2002Payload
- InlineResponse2002PayloadUserRedirect
- InlineResponse2003
- InlineResponse2003Payload
- InlineResponse2003PayloadLogo
- InlineResponse2003PayloadPaymentMethod
- InlineResponse2004
- InlineResponse2004Payload
- InlineResponse200Error
- InlineResponse200Payload
- InlineResponse200PayloadLogo
- InlineResponse200PayloadPaymentMethod
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header