コード例 #1
0
 /**
  * Setup
  */
 public function setUp()
 {
     Base::mode('test');
     $login_info = $this->getFixtures()->offsetGet('moneris_us');
     $this->gateway = new MonerisUs($login_info);
     $this->amount = 10;
     $this->creditcard = new CreditCard(array("first_name" => "John", "last_name" => "Doe", "number" => "4242424242424242", "month" => "01", "year" => "2015", "verification_value" => "000"));
     $this->options = array('order_id' => 'REF' . $this->gateway->generateUniqueId(), 'description' => 'Moneris Test Transaction', 'address' => array('name' => 'John Dows', 'address1' => '1 Main St', 'zip' => '95131', 'state' => 'CA', 'country' => 'United States', 'city' => 'San Jose'), 'shipping_address' => array('name' => 'John Dows', 'address1' => '1 Main St', 'zip' => '95131', 'state' => 'CA', 'country' => 'United States', 'city' => 'San Jose'), 'street_number' => '1', 'street_name' => 'Main St');
 }
コード例 #2
0
 /**
  * Setup
  */
 public function setUp()
 {
     Base::mode('test');
     $login_info = $this->getFixtures()->offsetGet('eway');
     $this->gateway = new Eway($login_info);
     $this->amount = 100;
     $this->creditcard = new CreditCard(array("first_name" => "John", "last_name" => "Doe", "number" => "4444333322221111", "month" => "01", "year" => "2015", "verification_value" => "000"));
     $this->options = array('order_id' => 'REF' . $this->gateway->generateUniqueId(), 'description' => 'Eway Test Transaction', 'address' => array('address1' => '1234 Street', 'zip' => '98004', 'state' => 'WA'), 'email' => '*****@*****.**');
 }
コード例 #3
0
 public function setUp()
 {
     Base::mode('test');
     $options = $this->getFixtures()->offsetGet('paypal_express');
     $options['currency'] = 'EUR';
     $this->gateway = new PaypalExpress($options);
     $this->amount = 100;
     $this->options = array('order_id' => 'REF' . $this->gateway->generateUniqueId(), 'email' => "*****@*****.**", 'description' => 'Paypal Express Test Transaction', 'billing_address' => array('address1' => '1234 Penny Lane', 'city' => 'Jonsetown', 'state' => 'NC', 'country' => 'US', 'zip' => '23456'), 'ip' => '10.0.0.1');
 }
コード例 #4
0
 /**
  * Setup
  */
 function setUp()
 {
     Base::mode('test');
     $options = $this->getFixtures()->offsetGet('piraeus_paycenter');
     $this->gateway = new PiraeusPaycenter($options);
     $this->amount = 1;
     $this->creditcard = new CreditCard(array("first_name" => "John", "last_name" => "Doe", "number" => "4111111111111111", "month" => "01", "year" => "2015", "verification_value" => "000"));
     $this->options = array('order_id' => 'REF' . $this->gateway->generateUniqueId(), 'description' => 'Test Transaction', 'cavv' => 'xxx', 'eci_flag' => 'xxx', 'xid' => 'xxx', 'enrolled' => 'Y', 'pares_status' => 'Y', 'signature_verification' => 'Y', 'country' => 'US', 'address' => array('address1' => '1234 Street', 'zip' => '98004', 'state' => 'WA'));
 }
コード例 #5
0
 protected function setUp()
 {
     Base::mode('test');
     $login_info = $this->getFixtures()->offsetGet('worldpay');
     $this->gateway = new Worldpay($login_info);
     $this->amount = 100.0;
     $this->creditcard = new CreditCard(array('number' => '5105105105105100', 'month' => 11, 'year' => 2009, 'first_name' => 'John', 'last_name' => 'Doe', 'verification_value' => '000', 'type' => 'master'));
     $this->options = array('order_id' => '1234', 'billing_address' => array('name' => 'John Doe', 'address1' => '1234 my address', 'city' => 'Neverland', 'state' => 'ON', 'country' => 'CA', 'zip' => '90210', 'phone' => '555-555-5555'), 'email' => '*****@*****.**');
 }
コード例 #6
0
 public function setUp()
 {
     Base::mode('test');
     $options = $this->getFixtures()->offsetGet('iridium');
     $this->amount = 10;
     $this->gateway = new Iridium($options);
     $this->creditcard = new CreditCard(array("type" => 'VC', "first_name" => "John", "last_name" => "Doe", "number" => '4976000000003436', "month" => "12", "year" => "2015", "verification_value" => "452"));
     $this->options = array('order_id' => 'REF' . $this->gateway->generateUniqueId(), 'email' => "*****@*****.**", 'description' => 'Iridium Test Transaction', 'billing_address' => array('address1' => '32 Edward Street', 'city' => 'Camborne', 'state' => 'Cornwall', 'country' => 'US', 'zip' => 'TR14 8PA'), 'ip' => '10.0.0.1', 'currency' => 'USD');
 }
コード例 #7
0
 public function setUp()
 {
     Base::mode('test');
     $login_info = $this->getFixtures()->offsetGet('realex');
     $this->gateway = new Realex($login_info);
     $this->amount = 100;
     $this->creditcard = new CreditCard(array("first_name" => "John", "last_name" => "Doe", "number" => "4111111111111111", "month" => "01", "year" => "2015", "verification_value" => "000"));
     $this->options = array('order_id' => 'REF' . $this->gateway->generateUniqueId(), 'address' => array('address1' => '1234 Street', 'zip' => '98004', 'state' => 'WA', 'country' => 'USA'));
 }
コード例 #8
0
 /**
  * Setup
  */
 public function setUp()
 {
     Base::mode('test');
     $login_info = $this->getFixtures()->offsetGet('fat_zebra');
     $login_info['region'] = 'CA';
     $this->gateway = new FatZebra($login_info);
     $this->amount = 10;
     $this->creditcard = new CreditCard(array("first_name" => "John", "last_name" => "Doe", "number" => "5123456789012346", "month" => "01", "year" => "2015", "verification_value" => "000"));
     $this->options = array('order_id' => 'REF' . $this->gateway->generateUniqueId(), 'ip' => '10.0.0.1');
 }
コード例 #9
0
 public function setUp()
 {
     Base::mode('test');
     $options = $this->getFixtures()->offsetGet('paypal_pro');
     $options['currency'] = 'USD';
     $this->gateway = new Paypal($options);
     $this->amount = 100;
     $this->creditcard = new CreditCard(array("first_name" => "John", "last_name" => "Doe", "number" => "4381258770269608", "month" => "1", "year" => "2015", "verification_value" => "000"));
     $this->options = array('order_id' => 'REF' . $this->gateway->generateUniqueId(), 'email' => "*****@*****.**", 'description' => 'Paypal Pro Test Transaction', 'billing_address' => array('address1' => '1234 Penny Lane', 'city' => 'Jonsetown', 'state' => 'NC', 'country' => 'US', 'zip' => '23456'), 'ip' => '10.0.0.1');
 }
コード例 #10
0
 /**
  * Setup
  */
 public function setUp()
 {
     Base::mode('test');
     $login_info = $this->getFixtures()->offsetGet('authorize_net');
     $this->gateway = new AuthorizeNet($login_info);
     $this->amount = 100;
     $this->creditcard = new CreditCard(array("first_name" => "John", "last_name" => "Doe", "number" => "4111111111111111", "month" => "01", "year" => "2015", "verification_value" => "000"));
     $this->options = array('order_id' => 'REF' . $this->gateway->generateUniqueId(), 'description' => 'Autorize.net Test Transaction', 'address' => array('address1' => '1234 Street', 'zip' => '98004', 'state' => 'WA'));
     $this->recurring_options = array('amount' => 100, 'order_id' => 'REF' . $this->gateway->generateUniqueId(), 'subscription_name' => 'Test Subscription 1', 'billing_address' => array('first_name' => 'John' . $this->gateway->generateUniqueId(), 'last_name' => 'Smith'), 'frequency' => 11, 'period' => 'months', 'start_date' => date("Y-m-d", strtotime('tomorrow')), 'occurrences' => 1);
 }
コード例 #11
0
 /**
  * Setup
  */
 public function setUp()
 {
     Base::mode('test');
     $login_info = $this->getFixtures()->offsetGet('mercury');
     $login_info['tokenization'] = false;
     $this->gateway = new Mercury($login_info);
     $this->amount = 10;
     $this->creditcard = new CreditCard(array("first_name" => "John", "last_name" => "Doe", "number" => "5499990123456781", "month" => "11", "year" => "2013", "verification_value" => "123"));
     $this->options = array('order_id' => $this->gateway->generateUniqueId(), 'description' => 'Mercury Test Transaction', 'address' => array('address1' => '1234 Street', 'zip' => '98004', 'state' => 'WA'));
 }
コード例 #12
0
 /**
  * Setup
  */
 function setUp()
 {
     Base::mode('test');
     $options = $this->getFixtures()->offsetGet('hsbc');
     $options['currency'] = 'EUR';
     $this->gateway = new HsbcSecureEpayments($options);
     $this->amount = 100;
     $this->creditcard = new CreditCard(array("first_name" => "John", "last_name" => "Doe", "number" => "4111111111111111", "month" => "01", "year" => "2015", "verification_value" => "000"));
     $this->options = array('order_id' => 'REF' . $this->gateway->generateUniqueId(), 'description' => 'Test Transaction', 'country' => 'US', 'address' => array('address1' => '1234 Street', 'zip' => '98004', 'state' => 'WA'));
     $this->authorization = '483e6382-7d13-3001-002b-0003bac00fc9';
 }
コード例 #13
0
 public function setUp()
 {
     Base::mode('test');
     $options = $this->getFixtures()->offsetGet('bridge_pay');
     $this->amount = 100;
     $authorization = 'OK9757|837495';
     $this->gateway = new BridgePay($options);
     $this->creditcard = new CreditCard(array("type" => 'master', "first_name" => "John", "last_name" => "Doe", "number" => "4381258770269608", "month" => "01", "year" => "2015", "verification_value" => "000"));
     $this->options = array('order_id' => 'REF' . $this->gateway->generateUniqueId(), 'email' => "*****@*****.**", 'billing_address' => array('address1' => '1234 Penny Lane', 'city' => 'Jonsetown', 'state' => 'NC', 'country' => 'US', 'zip' => '23456'), 'ip' => '10.0.0.1');
     //$b->authorize($amount, $creditcard, $options);
     //echo '========================================='. "\n";
     //$b->purchase($amount, $creditcard, $options);
     //echo '========================================='. "\n";
     //$b->capture( $amount, $authorization, $options);
     //echo '========================================='. "\n";
     //$b->refund( $amount, $authorization, $options);
     //echo '========================================='. "\n";
     //$b->void($authorization, $options);
 }
コード例 #14
0
ファイル: index.php プロジェクト: bluetechy/Aktive-Merchant
<?php

require_once '../../autoload.php';
require_once '../../vendor/autoload.php';
require_once '../login.php';
use AktiveMerchant\Billing\Base;
use AktiveMerchant\Billing\CreditCard;
Base::mode('test');
# Remove this on production mode
#Alternative way to get a gateway instanse.
$gateway = Base::gateway('worldpay', array('login' => WORLDPAY_LOGIN, 'password' => WORLDPAY_PASS, 'inst_id' => WORLDPAY_INSTALLATION_ID));
$cc = new CreditCard(array("first_name" => "John", "last_name" => "Doe", "number" => "4111111111111111", "month" => "01", "year" => "2015", "verification_value" => "000"));
$options = array('order_id' => 'REF' . $gateway->generateUniqueId(), 'description' => 'Worldpay Test Transaction', 'address' => array('address1' => '1234 Street', 'zip' => '98004', 'state' => 'WA', 'country' => 'US'));
try {
    if (false == $cc->isValid()) {
        var_dump($cc->errors());
    } else {
        $response = $gateway->authorize("0.01", $cc, $options);
        echo $response->message() . "\n";
    }
} catch (Exception $e) {
    echo $e->getMessage() . "\n";
}
コード例 #15
0
ファイル: index.php プロジェクト: bluetechy/Aktive-Merchant
<?php

require_once '../../autoload.php';
require_once '../login.php';
use AktiveMerchant\Billing\Base;
use AktiveMerchant\Billing\CreditCard;
Base::mode('test');
# Remove this on production mode
#Alternative way to get a gateway instanse.
$gateway = Base::gateway('authorize_net', array('login' => AUTH_NET_LOGIN, 'password' => AUTH_NET_PASS));
$cc = new CreditCard(array("first_name" => "John", "last_name" => "Doe", "number" => "4111111111111111", "month" => "01", "year" => "2015", "verification_value" => "000"));
$options = array('order_id' => 'REF' . $gateway->generateUniqueId(), 'description' => 'Autorize.net Test Transaction', 'address' => array('address1' => '1234 Street', 'zip' => '98004', 'state' => 'WA'));
try {
    if (false == $cc->isValid()) {
        var_dump($cc->errors());
    } else {
        $response = $gateway->authorize("0.01", $cc, $options);
        echo $response->message() . "\n";
    }
} catch (Exception $e) {
    echo $e->getMessage() . "\n";
}
コード例 #16
0
<?php

require_once '../../autoload.php';
use AktiveMerchant\Billing\Base;
use AktiveMerchant\Billing\Gateways\Moneris;
session_start();
Base::mode('test');
#Remove this line on production mode
try {
    $gateway = new Moneris(array('store_id' => 'store1', 'api_token' => 'yesguy', 'region' => 'CA'));
} catch (Exception $exc) {
    echo $exc->getMessage();
}