You are here

public static function Braintree_TransparentRedirect::updateCustomerData in Commerce Braintree 7

Returns the trData string for updating a customer.

The customerId of the customer to update is required.

<code> $trData = Braintree_TransparentRedirect::updateCustomerData(array( 'redirectUrl' => 'http://example.com/redirect_here', 'customerId' => 'customer123', )); </code>

Parameters

array $params:

Return value

string

2 calls to Braintree_TransparentRedirect::updateCustomerData()
Braintree_CustomerTest::updateCustomerViaTr in braintree_php/tests/integration/CustomerTest.php
Braintree_TransparentRedirectTest::testUpdateCustomerFromTransparentRedirect in braintree_php/tests/integration/TransparentRedirectTest.php

File

braintree_php/lib/Braintree/TransparentRedirect.php, line 232

Class

Braintree_TransparentRedirect
Static class providing methods to build Transparent Redirect urls

Code

public static function updateCustomerData($params) {
  Braintree_Util::verifyKeys(self::$_updateCustomerSignature, $params);
  if (!isset($params['customerId'])) {
    throw new InvalidArgumentException('expected params to contain customerId of customer to update');
  }
  $params["kind"] = Braintree_TransparentRedirect::UPDATE_CUSTOMER;
  return self::_data($params);
}