public static function Braintree_TransparentRedirect::transactionData in Commerce Braintree 7
returns the trData string for creating a transaction
Parameters
array $params:
Return value
string
8 calls to Braintree_TransparentRedirect::transactionData()
- Braintree_TestHelper::createViaTr in braintree_php/
tests/ TestHelper.php - Braintree_TransactionTest::createTransactionViaTr in braintree_php/
tests/ integration/ TransactionTest.php - Braintree_TransparentRedirectTest::testCreateTransactionFromTransparentRedirect in braintree_php/
tests/ integration/ TransparentRedirectTest.php - CommerceBraintreeCofTest::createTrDataInfo in tests/
commerce_braintree_cof.test - Return an array with credit card info.
- CommerceBraintreeCofTest::testCommerceBraintreeCofRequest in tests/
commerce_braintree_cof.test - Test a card on File request. Be sure we store the credit card.
File
- braintree_php/
lib/ Braintree/ TransparentRedirect.php, line 167
Class
- Braintree_TransparentRedirect
- Static class providing methods to build Transparent Redirect urls
Code
public static function transactionData($params) {
Braintree_Util::verifyKeys(self::$_transactionSignature, $params);
$params["kind"] = Braintree_TransparentRedirect::CREATE_TRANSACTION;
$transactionType = isset($params['transaction']['type']) ? $params['transaction']['type'] : null;
if ($transactionType != Braintree_Transaction::SALE && $transactionType != Braintree_Transaction::CREDIT) {
throw new InvalidArgumentException('expected transaction[type] of sale or credit, was: ' . $transactionType);
}
return self::_data($params);
}