public function setUp() { Merchant_Billing_Base::mode('test'); $this->gateway = new Merchant_Billing_PaypalExpress(array('login' => PAYPAL_LOGIN, 'password' => PAYPAL_PASS, 'signature' => PAYPAL_SIG, 'currency' => 'EUR')); $this->amount = 100; $this->options = array('order_id' => 'REF' . $this->gateway->generate_unique_id(), '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'); }
public function setUp() { Merchant_Billing_Base::mode('test'); $this->gateway = new Merchant_Billing_Paypal(array('login' => PAYPAL_PRO_LOGIN, 'password' => PAYPAL_PRO_PASS, 'signature' => PAYPAL_PRO_SIG, 'currency' => 'USD')); $this->amount = 100; $this->creditcard = new Merchant_Billing_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->generate_unique_id(), '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'); }
protected function setUp() { Merchant_Billing_Base::mode('test'); $this->gateway = new Merchant_Billing_PayflowUk(array('login' => PAYPAL_LOGIN, 'password' => PAYPAL_PASS, 'currency' => 'GBP')); $this->amount = 100.0; $this->creditcard = new Merchant_Billing_CreditCard(array('number' => '5105105105105100', 'month' => 11, 'year' => 2009, 'first_name' => 'Cody', 'last_name' => 'Fauser', 'verification_value' => '000', 'type' => 'master')); $this->options = array('billing_address' => array('name' => 'Cody Fauser', 'address1' => '1234 Shady Brook Lane', 'city' => 'Ottawa', 'state' => 'ON', 'country' => 'CA', 'zip' => '90210', 'phone' => '555-555-5555'), 'email' => '*****@*****.**'); }
/** * Constructor. * * @param KConfig $config An optional KConfig object with configuration options. * * @return void */ public function __construct(KConfig $config) { parent::__construct($config); //activate the test mode if ($config->test_mode) { Merchant_Billing_Base::mode('test'); } $this->_gateway_config = $config->toArray(); }
/** * Loads a gateway object with the passed options * * @param string $options * @return void * @author Dean */ function _load($options = array()) { App::Import('Vendor', 'AktiveMerchant', array('file' => 'aktive_merchant' . DS . 'lib' . DS . 'merchant.php')); if (isset($this->config['testing']) && $this->config['testing']) { Merchant_Billing_Base::mode('test'); } $gatewayClass = 'Merchant_Billing_' . $this->config['gateway']; $this->gateway = new $gatewayClass($this->config); }
/** * Setup */ function setUp() { Merchant_Billing_Base::mode('test'); $options = array('acquire_id' => 'x', 'merchant_id' => 'y', 'pos_id' => 'z', 'user' => 'b', 'password' => 'a', 'channel_type' => 'c'); $this->gateway = new Merchant_Billing_PiraeusPaycenter($options); $this->amount = 100; $this->creditcard = new Merchant_Billing_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->generate_unique_id(), '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')); }
/** * Setup */ function setUp() { Merchant_Billing_Base::mode('test'); $login_info = array('login' => 'x', 'password' => 'y'); $this->gateway = new Merchant_Billing_Cardstream($login_info); $this->amount = 100; $this->creditcard = new Merchant_Billing_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->generate_unique_id(), 'description' => 'Cardstream Test Transaction', 'address' => array('address1' => '1234 Street', 'zip' => '98004', 'state' => 'WA')); }
/** * Setup */ function setUp() { Merchant_Billing_Base::mode('test'); $login_info = array('login' => AUTH_NET_LOGIN, 'password' => AUTH_NET_PASS); $this->gateway = new Merchant_Billing_AuthorizeNetTest($login_info); $this->amount = 100; $this->creditcard = new Merchant_Billing_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->generate_unique_id(), 'description' => 'Autorize.net Test Transaction', 'address' => array('address1' => '1234 Street', 'zip' => '98004', 'state' => 'WA')); $this->recurring_options = array('amount' => 100, 'subscription_name' => 'Test Subscription 1', 'billing_address' => array('first_name' => 'John' . $this->gateway->generate_unique_id(), 'last_name' => 'Smith'), 'length' => 11, 'unit' => 'months', 'start_date' => date("Y-m-d", time()), 'occurrences' => 1); }
/** * Setup */ function setUp() { Merchant_Billing_Base::mode('test'); $options = array('login' => 'x', 'password' => 'y', 'client_id' => 'z', 'currency' => 'EUR'); $this->gateway = new Merchant_Billing_HsbcSecureEpayments($options); $this->amount = 100; $this->creditcard = new Merchant_Billing_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->generate_unique_id(), 'description' => 'Test Transaction', 'country' => 'US', 'address' => array('address1' => '1234 Street', 'zip' => '98004', 'state' => 'WA')); $this->authorization = '483e6382-7d13-3001-002b-0003bac00fc9'; }
<?php require_once '../../lib/merchant.php'; require_once '../login.php'; Merchant_Billing_Base::mode('test'); try { $gateway = new Merchant_Billing_PiraeusPaycenter(array('acquire_id' => acquire_id, 'merchant_id' => merchant_id, 'pos_id' => pos_id, 'user' => user, 'password' => e_password, 'channel_type' => channel_type)); $cc = new Merchant_Billing_CreditCard(array("first_name" => "Test", "last_name" => "User", "number" => "4111111111111111", "month" => "01", "year" => "2011", "verification_value" => "123")); $options = array('order_id' => $gateway->generate_unique_id()); $response = $gateway->purchase('1', $cc, $options); if ($response->success()) { echo 'Success Authorize<br />'; echo $response->message() . "<br />"; } else { echo $response->message(); } } catch (Exception $e) { echo $e->getMessage(); }
public static function mode($mode) { self::$mode = $mode; self::$gateway_mode = $mode; self::$integration_mode = $mode; }