Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get Tokenization key in Woocommerce Rest API?

We are using the Woocommerce Rest API for the Mobile Application Development like Android And IOS. We have integrated the payment method as Braintree using the plugin WooCommerce PayPal Powered by Braintree Payment Gateway.

It is working fine on our website but the Mobile applications need the client token or Tokenization key for integrating the Braintree SDKs.

This plugin does not store any Tokenization key or Client Token in our database so how will give it in APIs for Integration? It stores Only merchant id in woocommerce Braintree settings.

So, How we will Integrate the Braintree Payment Gateway on the website and mobile application using WooCommerce REST API.

Please suggest if anyone have Idea...

like image 454
Ajay Ghaghretiya Avatar asked Dec 19 '17 12:12

Ajay Ghaghretiya


1 Answers

To obtain a tokenization key:

  1. Log into either the production Control Panel or the sandbox Control Panel, depending on which environment you are working in

  2. Navigate to Settings -> API Keys

You should see your key under the Tokenization Keys section. If no key appears, click Generate New Tokenization Key. Copy this key.


To use this tokenization key in your android app:

  1. Place the key (copied after the above steps) in your /res/values/strings.xml

  2. In your code, get the key from your string resources you just placed in the above step.

  3. Supply this key as the 2nd parameter when initializing braintree using BraintreeFragment.newInstance(activity, tokenizationKey);

like image 77
Abdul Wasae Avatar answered Oct 05 '22 23:10

Abdul Wasae