1. Go to this page and download the library: Download zipmoney/merchantapi-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/ */
zipmoney / merchantapi-php example snippets
onfigure API key authorization: Authorization
\zipMoney\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
\zipMoney\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Bearer');
\zipMoney\Configuration::getDefaultConfiguration()->setEnvironment('ENVIRONMENT HERE'); // Allowed values are ( sandbox | production )
\zipMoney\Configuration::getDefaultConfiguration()->setPlatform('PLATFORM HERE'); // E.g. Magento/1.9.1.2
$api_instance = new zipMoney\Api\ChargesApi();
$id = "id_example"; // string | The id of the authorised charge
$idempotency_key = "idempotency_key_example"; // string | The unique idempotency key.
try {
$result = $api_instance->chargesCancel($id, $idempotency_key);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ChargesApi->chargesCancel: ', $e->getMessage(), PHP_EOL;
}