public static function Braintree_Customer::updateSignature in Commerce Braintree 7
creates a full array signature of a valid update request
Return value
array update request format
3 calls to Braintree_Customer::updateSignature()
- Braintree_Customer::update in braintree_php/
lib/ Braintree/ Customer.php - updates the customer record
- Braintree_CustomerTest::testUpdateSignature_doesNotAlterOptionsInCreditCardUpdateSignature in braintree_php/
tests/ unit/ CustomerTest.php - Braintree_TransparentRedirect::init in braintree_php/
lib/ Braintree/ TransparentRedirect.php - create signatures for different call types @ignore
File
- braintree_php/
lib/ Braintree/ Customer.php, line 164
Class
- Braintree_Customer
- Creates and manages Customers
Code
public static function updateSignature() {
$creditCardSignature = Braintree_CreditCard::updateSignature();
foreach ($creditCardSignature as $key => $value) {
if (is_array($value) and array_key_exists('options', $value)) {
array_push($creditCardSignature[$key]['options'], 'updateExistingToken');
}
}
$signature = array(
'id',
'company',
'email',
'fax',
'firstName',
'lastName',
'phone',
'website',
array(
'creditCard' => $creditCardSignature,
),
array(
'customFields' => array(
'_anyKey_',
),
),
);
return $signature;
}