private static function Braintree_TransparentRedirect::_data in Commerce Braintree 7
@ignore
5 calls to Braintree_TransparentRedirect::_data()
- Braintree_TransparentRedirect::createCreditCardData in braintree_php/
lib/ Braintree/ TransparentRedirect.php - returns the trData string for creating a credit card,
- Braintree_TransparentRedirect::createCustomerData in braintree_php/
lib/ Braintree/ TransparentRedirect.php - returns the trData string for creating a customer.
- Braintree_TransparentRedirect::transactionData in braintree_php/
lib/ Braintree/ TransparentRedirect.php - returns the trData string for creating a transaction
- Braintree_TransparentRedirect::updateCreditCardData in braintree_php/
lib/ Braintree/ TransparentRedirect.php - Returns the trData string for updating a credit card.
- Braintree_TransparentRedirect::updateCustomerData in braintree_php/
lib/ Braintree/ TransparentRedirect.php - Returns the trData string for updating a customer.
File
- braintree_php/
lib/ Braintree/ TransparentRedirect.php, line 278
Class
- Braintree_TransparentRedirect
- Static class providing methods to build Transparent Redirect urls
Code
private static function _data($params) {
if (!isset($params['redirectUrl'])) {
throw new InvalidArgumentException('expected params to contain redirectUrl');
}
$params = self::_underscoreKeys($params);
$now = new DateTime('now', new DateTimeZone('UTC'));
$trDataParams = array_merge($params, array(
'api_version' => Braintree_Configuration::API_VERSION,
'public_key' => Braintree_Configuration::publicKey(),
'time' => $now
->format('YmdHis'),
));
ksort($trDataParams);
$trDataSegment = http_build_query($trDataParams, null, '&');
$trDataHash = self::_hash($trDataSegment);
return "{$trDataHash}|{$trDataSegment}";
}