Braintree\TransactionGateway::createSignature PHP Метод

createSignature() публичный статический Метод

creates a full array signature of a valid gateway request
public static createSignature ( ) : array
Результат array gateway request signature format
    public static function createSignature()
    {
        return ['amount', 'billingAddressId', 'channel', 'customerId', 'deviceData', 'deviceSessionId', 'fraudMerchantId', 'merchantAccountId', 'orderId', 'paymentMethodNonce', 'paymentMethodToken', 'purchaseOrderNumber', 'recurring', 'serviceFeeAmount', 'sharedPaymentMethodToken', 'sharedCustomerId', 'sharedShippingAddressId', 'sharedBillingAddressId', 'shippingAddressId', 'taxAmount', 'taxExempt', 'threeDSecureToken', 'transactionSource', 'type', 'venmoSdkPaymentMethodCode', ['riskData' => ['customerBrowser', 'customerIp', 'customer_browser', 'customer_ip']], ['creditCard' => ['token', 'cardholderName', 'cvv', 'expirationDate', 'expirationMonth', 'expirationYear', 'number']], ['customer' => ['id', 'company', 'email', 'fax', 'firstName', 'lastName', 'phone', 'website']], ['billing' => ['firstName', 'lastName', 'company', 'countryName', 'countryCodeAlpha2', 'countryCodeAlpha3', 'countryCodeNumeric', 'extendedAddress', 'locality', 'postalCode', 'region', 'streetAddress']], ['shipping' => ['firstName', 'lastName', 'company', 'countryName', 'countryCodeAlpha2', 'countryCodeAlpha3', 'countryCodeNumeric', 'extendedAddress', 'locality', 'postalCode', 'region', 'streetAddress']], ['threeDSecurePassThru' => ['eciFlag', 'cavv', 'xid']], ['options' => ['holdInEscrow', 'storeInVault', 'storeInVaultOnSuccess', 'submitForSettlement', 'addBillingAddressToPaymentMethod', 'venmoSdkSession', 'storeShippingAddressInVault', 'payeeEmail', ['threeDSecure' => ['required']], ['paypal' => ['payeeEmail', 'customField', 'description', ['supplementaryData' => ['_anyKey_']]]], ['amexRewards' => ['requestId', 'points', 'currencyAmount', 'currencyIsoCode']]]], ['customFields' => ['_anyKey_']], ['descriptor' => ['name', 'phone', 'url']], ['paypalAccount' => ['payeeEmail']], ['apple_pay_card' => ['number', 'cardholder_name', 'cryptogram', 'expiration_month', 'expiration_year']], ['industry' => ['industryType', ['data' => ['folioNumber', 'checkInDate', 'checkOutDate', 'travelPackage', 'departureDate', 'lodgingCheckInDate', 'lodgingCheckOutDate', 'lodgingName', 'roomRate']]]]];
    }

Usage Example

 /**
  * create signatures for different call types
  * @ignore
  */
 public static function init()
 {
     self::$_createCustomerSignature = [self::$_transparentRedirectKeys, ['customer' => CustomerGateway::createSignature()]];
     self::$_updateCustomerSignature = [self::$_transparentRedirectKeys, 'customerId', ['customer' => CustomerGateway::updateSignature()]];
     self::$_transactionSignature = [self::$_transparentRedirectKeys, ['transaction' => TransactionGateway::createSignature()]];
     self::$_createCreditCardSignature = [self::$_transparentRedirectKeys, ['creditCard' => CreditCardGateway::createSignature()]];
     self::$_updateCreditCardSignature = [self::$_transparentRedirectKeys, 'paymentMethodToken', ['creditCard' => CreditCardGateway::updateSignature()]];
 }