PHP code example of vkopytich13 / cybersource-rest-client-php
1. Go to this page and download the library: Download vkopytich13/cybersource-rest-client-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/ */
vkopytich13 / cybersource-rest-client-php example snippets
// For TESTING use
// $this->runEnv = "apitest.cybersource.com";
// For PRODUCTION use
$this->runEnv = "api.cybersource.com";
json
{
" ">=5.6",
"cybersource/rest-client-php": "0.0.25"
}
}
$this->authType = "HTTP_SIGNATURE";
$this->runEnv = "apitest.cybersource.com";
$this->merchantID = <merchantID>;
$this->apiKeyID = <merchantKeyId>;
$this->secretKey = <merchantSecretKey>;
$this->enableLog = true;
$this->logSize = <logMaximumSize>;
$this->logFile = <logDirectory>;
$this->logFilename = <logFilename>;
$this->proxyUrl = <proxyHost>;
$this->proxyHost = <proxyPort>;
$this->useMetaKey = false;
$this->authType = "JWT";
$this->runEnv = "apitest.cybersource.com";
$this->merchantID = <merchantID>;
$this->keyAlias = <keyAlias>;
$this->keyPass = <keyPassword>;
$this->keyFilename = <keyFileName>";
$this->keyDirectory = <keysDirectory>;
$this->enableLog = true;
$this->logSize = <logMaximumSize>;
$this->logFile = <logDirectory>;
$this->logFilename = <logFilename>;
$this->proxyUrl = <proxyHost>;
$this->proxyHost = <proxyPort>;
$this->useMetaKey = false;
$this->authType = "HTTP_SIGNATURE";
$this->merchantID = <child merchantID>;
$this->apiKeyID = <MetaKey merchantKeyId>;
$this->secretKey = <Metakey merchantsecretKey>;
$this->useMetaKey = true;
$this->portfolioID = <Portfolio ID>;
$this->authenticationType = "JWT";
$this->merchantID = <child merchantID>;
$this->keyAlias = <keyAlias>;
$this->keyPass = <keyPassword>;
$this->keyFileName = <keyFileName>;
$this->keyDirectory = <keysDirectory>;
$this->useMetaKey = true;