lib/Braintree/TransparentRedirectGateway.php
public function updateCreditCardData($params)
    {
        Util::verifyKeys(
                self::$_updateCreditCardSignature,
                $params
                );
        if (!isset($params['paymentMethodToken'])) {
            throw new InvalidArgumentException(
                   'expected params to contain paymentMethodToken.'
                   );
        }
        $params["kind"] = TransparentRedirect::UPDATE_PAYMENT_METHOD;
        return $this->_data($params);
    }
public function updateCreditCardData($params)
    {
        Util::verifyKeys(
                self::$_updateCreditCardSignature,
                $params
                );
        if (!isset($params['paymentMethodToken'])) {
            throw new InvalidArgumentException(
                   'expected params to contain paymentMethodToken.'
                   );
        }
        $params["kind"] = TransparentRedirect::UPDATE_PAYMENT_METHOD;
        return $this->_data($params);
    }
public function updateCreditCardData ( $ params ) { Util :: verifyKeys ( self :: $ _updateCreditCardSignature , $ params ) ; if ( ! isset ( $ params [ 'paymentMethodToken' ] ) ) { throw new InvalidArgumentException ( 'expected params to contain paymentMethodToken.' ) ; } $ params [ "kind" ] = TransparentRedirect :: UPDATE_PAYMENT_METHOD ; return $ this -> _data ( $ params ) ; }
Returns the trData string for updating a credit card.

The paymentMethodToken of the credit card to update is required.

<code>
$trData = TransparentRedirect::updateCreditCardData(array(
'redirectUrl' => 'http://example.com/redirect_here',
'paymentMethodToken' => 'token123',
));
</code>

@param array $params
@return string
Returns the trData string for updating a credit card .