Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClientToken factory #16

Open
juandpr opened this issue Sep 29, 2016 · 2 comments
Open

ClientToken factory #16

juandpr opened this issue Sep 29, 2016 · 2 comments

Comments

@juandpr
Copy link

juandpr commented Sep 29, 2016

How can I use this Bundle to get a ClientToken (that class doesn't have the method "factory")?

@monkeyfunky
Copy link

This is how I managed to do it:

$gateway = new \Braintree_Gateway(array(
			'accessToken' => 'youraccesstoken',
		));
		
		$clientToken = $gateway->clientToken()->generate();
		
		return array('clientToken' => $clientToken);

So basically it sort of seems like if you need classes that don't have the factory method this bundle can't help you.

@Keloo
Copy link

Keloo commented Oct 9, 2017

You can simulate it this way:
$this->get('comet_cult_braintree.factory'); // don't delete it's to init the Configuration; $clientToken = \Braintree_ClientToken::generate();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants