Ejemplo n.º 1
0
 function testAuthorizationWithConfig()
 {
     $config = new Braintree_Configuration(array('environment' => 'development', 'merchant_id' => 'integration_merchant_id', 'publicKey' => 'badPublicKey', 'privateKey' => 'badPrivateKey'));
     $http = new Braintree_Http($config);
     $result = $http->_doUrlRequest('GET', $config->baseUrl() . '/merchants/integration_merchant_id/customers');
     $this->assertEquals(401, $result['status']);
 }
Ejemplo n.º 2
0
 function testSslError()
 {
     try {
         Braintree_Configuration::environment('sandbox');
         $this->setExpectedException('Braintree_Exception_SSLCertificate');
         //ip address of api.braintreegateway.com
         Braintree_Http::_doUrlRequest('get', '204.109.13.121');
     } catch (Exception $e) {
         Braintree_Configuration::environment('development');
         throw $e;
     }
     Braintree_Configuration::environment('development');
 }