private static function baseSignature($options) { $billingAddressSignature = Braintree_AddressGateway::createSignature(); return array('customerId', 'paymentMethodNonce', 'token', 'billingAddressId', 'deviceData', array('options' => $options), array('billingAddress' => $billingAddressSignature)); }
private static function baseSignature() { $billingAddressSignature = Braintree_AddressGateway::createSignature(); $optionsSignature = array('failOnDuplicatePaymentMethod', 'makeDefault', 'verificationMerchantAccountId', 'verifyCard'); return array('billingAddressId', 'cardholderName', 'cvv', 'deviceData', 'expirationDate', 'expirationMonth', 'expirationYear', 'number', 'paymentMethodNonce', 'token', array('options' => $optionsSignature), array('billingAddress' => $billingAddressSignature)); }
function testCreateSignature() { $expected = array('customerId', 'paymentMethodNonce', 'token', 'billingAddressId', 'deviceData', array('options' => array('makeDefault', 'verifyCard', 'failOnDuplicatePaymentMethod', 'verificationMerchantAccountId')), array('billingAddress' => Braintree_AddressGateway::createSignature())); $this->assertEquals($expected, Braintree_PaymentMethodGateway::createSignature()); }