function Braintree_CreditCardTest::testUpdate_withCardVerificationAndSpecificMerchantAccount in Commerce Braintree 7
File
- braintree_php/
tests/ integration/ CreditCardTest.php, line 687
Class
Code
function testUpdate_withCardVerificationAndSpecificMerchantAccount() {
$customer = Braintree_Customer::createNoValidate();
$initialCreditCard = Braintree_CreditCard::create(array(
'customerId' => $customer->id,
'number' => '5105105105105100',
'expirationDate' => '05/12',
))->creditCard;
$result = Braintree_CreditCard::update($initialCreditCard->token, array(
'billingAddress' => array(
'region' => 'IL',
),
'options' => array(
'verificationMerchantAccountId' => Braintree_TestHelper::nonDefaultMerchantAccountId(),
'verifyCard' => true,
),
));
$this
->assertFalse($result->success);
$this
->assertEquals(Braintree_Result_CreditCardVerification::PROCESSOR_DECLINED, $result->creditCardVerification->status);
$this
->assertEquals(Braintree_TestHelper::nonDefaultMerchantAccountId(), $result->creditCardVerification->merchantAccountId);
}