function Braintree_CustomerTest::testCreate_withCreditCardAndSpecificVerificationMerchantAccount in Commerce Braintree 7
File
- braintree_php/
tests/ integration/ CustomerTest.php, line 193
Class
Code
function testCreate_withCreditCardAndSpecificVerificationMerchantAccount() {
$result = Braintree_Customer::create(array(
'firstName' => 'Mike',
'lastName' => 'Jones',
'company' => 'Jones Co.',
'email' => 'mike.jones@example.com',
'phone' => '419.555.1234',
'fax' => '419.555.1235',
'website' => 'http://example.com',
'creditCard' => array(
'number' => '5105105105105100',
'expirationDate' => '05/12',
'cvv' => '123',
'cardholderName' => 'Mike Jones',
'options' => array(
'verificationMerchantAccountId' => Braintree_TestHelper::nonDefaultMerchantAccountId(),
'verifyCard' => true,
),
),
));
Braintree_TestHelper::assertPrintable($result);
$this
->assertFalse($result->success);
$this
->assertEquals(Braintree_Result_CreditCardVerification::PROCESSOR_DECLINED, $result->creditCardVerification->status);
$this
->assertEquals('2000', $result->creditCardVerification->processorResponseCode);
$this
->assertEquals('Do Not Honor', $result->creditCardVerification->processorResponseText);
$this
->assertEquals('M', $result->creditCardVerification->cvvResponseCode);
$this
->assertEquals(null, $result->creditCardVerification->avsErrorResponseCode);
$this
->assertEquals('I', $result->creditCardVerification->avsPostalCodeResponseCode);
$this
->assertEquals('I', $result->creditCardVerification->avsStreetAddressResponseCode);
}