/** * create signatures for different call types * @ignore */ public static function init() { self::$_createCustomerSignature = array(self::$_transparentRedirectKeys, array('customer' => Braintree_CustomerGateway::createSignature())); self::$_updateCustomerSignature = array(self::$_transparentRedirectKeys, 'customerId', array('customer' => Braintree_CustomerGateway::updateSignature())); self::$_transactionSignature = array(self::$_transparentRedirectKeys, array('transaction' => Braintree_TransactionGateway::createSignature())); self::$_createCreditCardSignature = array(self::$_transparentRedirectKeys, array('creditCard' => Braintree_CreditCardGateway::createSignature())); self::$_updateCreditCardSignature = array(self::$_transparentRedirectKeys, 'paymentMethodToken', array('creditCard' => Braintree_CreditCardGateway::updateSignature())); }
function testUpdateSignature_doesNotAlterOptionsInCreditCardUpdateSignature() { Braintree_CustomerGateway::updateSignature(); foreach (Braintree_CreditCardGateway::updateSignature() as $key => $value) { if (is_array($value) and array_key_exists('options', $value)) { $this->assertEquals(array('makeDefault', 'verificationMerchantAccountId', 'verifyCard', 'verificationAmount', 'venmoSdkSession'), $value['options']); } } }