コード例 #1
0
 public function setUp()
 {
     parent::setUp();
     $apiLoginId = getenv('AUTHORIZE_NET_API_LOGIN_ID');
     $transactionKey = getenv('AUTHORIZE_NET_TRANSACTION_KEY');
     //        //todo: Remove this before final commit
     $apiLoginId = '3wM8sJ9qR';
     $transactionKey = '3K2e3z44EKz3g326';
     if ($apiLoginId && $transactionKey) {
         $logger = new \Monolog\Logger('authorizenet_cim');
         $logger->pushHandler(new \Monolog\Handler\StreamHandler('/var/log/php/debug.log', \Monolog\Logger::DEBUG));
         $logger->pushHandler(new \Monolog\Handler\FirePHPHandler());
         $adapter = new PsrLogAdapter($logger);
         $logPlugin = new LogPlugin($adapter, MessageFormatter::DEBUG_FORMAT);
         $client = new Client();
         $client->addSubscriber($logPlugin);
         $this->gateway = new CIMGateway($client, $this->getHttpRequest());
         $this->gateway->setDeveloperMode(true);
         $this->gateway->setApiLoginId($apiLoginId);
         $this->gateway->setTransactionKey($transactionKey);
     } else {
         // No credentials were found, so skip this test
         $this->markTestSkipped();
     }
 }
コード例 #2
0
 public function setUp()
 {
     parent::setUp();
     $apiLoginId = getenv('AUTHORIZE_NET_API_LOGIN_ID');
     $transactionKey = getenv('AUTHORIZE_NET_TRANSACTION_KEY');
     if ($apiLoginId && $transactionKey) {
         $client = new Client();
         $this->gateway = new CIMGateway($client, $this->getHttpRequest());
         $this->gateway->setDeveloperMode(true);
         $this->gateway->setApiLoginId($apiLoginId);
         $this->gateway->setTransactionKey($transactionKey);
     } else {
         // No credentials were found, so skip this test
         $this->markTestSkipped();
     }
 }