Пример #1
0
 function testFind_exposesNullThreeDSecureInfoIfNoneExists()
 {
     $http = new Braintree_HttpClientApi(Braintree_Configuration::$global);
     $nonce = $http->nonce_for_new_card(array("creditCard" => array("number" => "4111111111111111", "expirationMonth" => "11", "expirationYear" => "2099")));
     $foundNonce = Braintree_PaymentMethodNonce::find($nonce);
     $info = $foundNonce->threeDSecureInfo;
     $this->assertEquals($nonce, $foundNonce->nonce);
     $this->assertNull($info);
 }
 function testFind_nonExistantNonce()
 {
     $this->setExpectedException('Braintree_Exception_NotFound');
     Braintree_PaymentMethodNonce::find('not_a_nonce');
 }