Tuesday 23 June 2015

Hosted Field Integration - Braintree

Hosted Field Integration - Braintree


Question:What is Hosted Field in Braintree?
Hosted Fields are fields which are in another websites but displaying on your own website. It gives such a look, Customer will think its on your website but in actual its on braintree website. Payment Form files are in Iframe.
Following are the fields which can display in your website.
Credit card Number
Expiry Date
CVV Number



Question: What is purpose of hosted Fields?
If you want to accept the credit card/debit card in your website to charge from customer. You have to take the PCI compliance.
With using hosted field of braintree, you need not to worry about PCI Compliance.
Basically, Hosted Fields are developed to Solved the PCI 3.0..


Question: How hosted fields helps to solve the issue PCI Compliance?
Suppose you have payment page, where customer can fill credit card information.

Braintree create a payment-form dynamically in your website with use of java-script. This form is in iframe but and you can do lot of styling customization.

In this way, customer add the credit card info in your website but in actual its on braintree. that's why you need not to worry about PCI Compliance. Also when user submit the form, credit card information goes on braintree and use them & you will get a "nonce" variable.


Question:Explain Hosted Field in single line?
Hosted Fields are small, transparent iframes that replace the sensitive credit card inputs in your checkout flow/payment-form.


Question: What are two different ways to integrate the Hosted Fields?
Following are two different way.
1) Drop-in: It is quick way to integrate with braintree, In this payment form is pre-formated.
2) Custom with Hosted Fields: In this, you can do lot of styling customization.



Question: Which browser support the Hosted fields of braintree?
On web, Hosted Fields supports IE 8+ and Safari (OS X and iOS), Firefox, and Chrome (desktop, Android, and iOS).


Question: What is YOUR_CLIENT_TOKEN?
To process anything in client side like create transaction, create customer, update details etc you need a new YOUR_CLIENT_TOKEN.
YOUR_CLIENT_TOKEN is unique random token created from server side(in your application). Following function generate the token?
Braintree_ClientToken::generate();