PHP code example of soberanes / cybersource-rest-client-php

1. Go to this page and download the library: Download soberanes/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/ */

    

soberanes / cybersource-rest-client-php example snippets


// For TESTING use
//  $this->runEnv = "cyberSource.environment.SANDBOX";
// For PRODUCTION use
  $this->runEnv = "cyberSource.environment.PRODUCTION";
json
{
  " ">=5.6",
  "soberanes/cybersource-rest-client-php": "0.0.16"
  }
}

   $this->authType = "HTTP_SIGNATURE";
   $this->runEnv = "cyberSource.environment.SANDBOX";
   $this->merchantID = <merchantID>;
   $this->apiKeyID = <merchantKeyId>;
   $this->screteKey = <merchantSecretKey>;

   $this->enableLog = true;
   $this->logSize = <logMaximumSize>;
   $this->logFile = <logDirectory>;
   $this->logFilename = <logFilename>;

   $this->proxyUrl = <proxyHost>;
   $this->proxyHost = <proxyPort>;


   $this->authType = "JWT";
   $this->runEnv = "cyberSource.environment.SANDBOX";
   $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>;