function Braintree_CreditCardTest::testGatewayRejectionIsNullOnProcessorDecline in Commerce Braintree 7
File
- braintree_php/
tests/ integration/ CreditCardTest.php, line 890
Class
Code
function testGatewayRejectionIsNullOnProcessorDecline() {
$old_merchant_id = Braintree_Configuration::merchantId();
$old_public_key = Braintree_Configuration::publicKey();
$old_private_key = Braintree_Configuration::privateKey();
Braintree_Configuration::merchantId('processing_rules_merchant_id');
Braintree_Configuration::publicKey('processing_rules_public_key');
Braintree_Configuration::privateKey('processing_rules_private_key');
$customer = Braintree_Customer::createNoValidate();
$result = Braintree_CreditCard::create(array(
'customerId' => $customer->id,
'number' => '5105105105105100',
'expirationDate' => '05/2011',
'cvv' => '200',
'options' => array(
'verifyCard' => true,
),
));
Braintree_Configuration::merchantId($old_merchant_id);
Braintree_Configuration::publicKey($old_public_key);
Braintree_Configuration::privateKey($old_private_key);
$this
->assertFalse($result->success);
$this
->assertNull($result->creditCardVerification->gatewayRejectionReason);
}