function Braintree_TransactionTest::testSale_withCustomFields in Commerce Braintree 7
File
- braintree_php/
tests/ integration/ TransactionTest.php, line 309
Class
Code
function testSale_withCustomFields() {
$result = Braintree_Transaction::sale(array(
'amount' => '100.00',
'creditCard' => array(
'number' => '5105105105105100',
'expirationDate' => '05/12',
),
'customFields' => array(
'store_me' => 'custom value',
),
));
$this
->assertTrue($result->success);
$transaction = $result->transaction;
$customFields = $transaction->customFields;
$this
->assertEquals('custom value', $customFields['store_me']);
}