You are here

public static function Braintree_CreditCard::sale in Commerce Braintree 7

create a new sale for the current card

Parameters

string $token:

array $transactionAttribs:

Return value

object Braintree_Result_Successful or Braintree_Result_Error

See also

Braintree_Transaction::sale()

2 calls to Braintree_CreditCard::sale()
Braintree_CreditCard::saleNoValidate in braintree_php/lib/Braintree/CreditCard.php
create a new sale using this card, assuming validations will pass
Braintree_CreditCardTest::testSale_createsASaleUsingGivenToken in braintree_php/tests/integration/CreditCardTest.php

File

braintree_php/lib/Braintree/CreditCard.php, line 251

Class

Braintree_CreditCard
Creates and manages Braintree CreditCards

Code

public static function sale($token, $transactionAttribs) {
  self::_validateId($token);
  return Braintree_Transaction::sale(array_merge($transactionAttribs, array(
    'paymentMethodToken' => $token,
  )));
}