public static function Braintree_Customer::sale in Commerce Braintree 7
create a new sale for a customer
Parameters
string $customerId:
array $transactionAttribs:
Return value
object Braintree_Result_Successful or Braintree_Result_Error
See also
2 calls to Braintree_Customer::sale()
- Braintree_Customer::saleNoValidate in braintree_php/
lib/ Braintree/ Customer.php - create a new sale for a customer, assuming validations will pass
- Braintree_CustomerTest::testSale_createsASaleUsingGivenToken in braintree_php/
tests/ integration/ CustomerTest.php
File
- braintree_php/
lib/ Braintree/ Customer.php, line 259
Class
- Braintree_Customer
- Creates and manages Customers
Code
public static function sale($customerId, $transactionAttribs) {
self::_validateId($customerId);
return Braintree_Transaction::sale(array_merge($transactionAttribs, array(
'customerId' => $customerId,
)));
}