PHP code example of rocketgate / sdk

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

    

rocketgate / sdk example snippets




e "vendor/rocketgate/src/GatewayCodes.php";
;

use RocketGate\Sdk\GatewayRequest;
use RocketGate\Sdk\GatewayResponse;
use RocketGate\Sdk\GatewayService;

$request  = new GatewayRequest();
$response = new GatewayResponse();
$service  = new GatewayService();

$request->Set(GatewayRequest::MERCHANT_ID(), "1");
$request->Set(GatewayRequest::MERCHANT_PASSWORD(), "testpassword");

// [...]
sh
git clone https://github.com/rocketgate/rocketgate-php-sdk.git vendor/rocketgate
sh
$ php ./Purchase.php