PHP code example of cedricblondeau / php-moneris-eselectplus
1. Go to this page and download the library: Download cedricblondeau/php-moneris-eselectplus 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/ */
cedricblondeau / php-moneris-eselectplus example snippets
use CedricBlondeau\Moneris;
// Config
$config = new Config('test_api_key', 'store1');
$config->setEnvironment(Config::ENV_TESTING);
// Purchase transaction
$transaction = new Moneris\Transaction\Basic\Purchase($config, array(
'cc_number' => '4242424242424242',
'expiry_month' => 10,
'expiry_year' => 18,
'order_id' => 'test' . date("dmy-G:i:s"),
'amount' => 100
));
// CURL
$httpClient = new Moneris\Http\Client\Curl($transaction);
$result = $httpClient->execute();