See also the PaymentMethod response object.

Look up a payment method by token.

PHP
Copy
Copied
$paymentMethod = $gateway->paymentMethod()->find('token');
This code snippet now uses gateway instance methods instead of class-level methods. Learn more.

If the payment method can't be found, you'll receive a Braintree_Exception_NotFound exception.

Arguments
token required, string

The alphanumeric value that references a specific payment method stored in your Vault.

Examples

Single PayPal account

If you want to look up a single PayPal account using its token, use the find method.

PHP
Copy
Copied
$paypalAccount = $gateway->payPalAccount()->find('token');
This code snippet now uses gateway instance methods instead of class-level methods. Learn more.

If the PayPal account can't be found, you'll receive a Braintree_Exception_NotFound exception.

Still have questions?

If you can’t find an answer, contact our Support team