function Braintree_TransactionTest::testSale_withDescriptor in Commerce Braintree 7
File
- braintree_php/
tests/ integration/ TransactionTest.php, line 951
Class
Code
function testSale_withDescriptor() {
$result = Braintree_Transaction::sale(array(
'amount' => '100.00',
'creditCard' => array(
'number' => '5105105105105100',
'expirationDate' => '05/12',
),
'descriptor' => array(
'name' => '123*123456789012345678',
'phone' => '3334445555',
),
));
$this
->assertTrue($result->success);
$transaction = $result->transaction;
$this
->assertEquals('123*123456789012345678', $transaction->descriptor->name);
$this
->assertEquals('3334445555', $transaction->descriptor->phone);
}