1. Go to this page and download the library: Download zerogrey/axerve-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zerogrey / axerve-php example snippets
onfigure 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;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.