The Hosted Fields integration allows you to create your own payment form using custom styles and layout. An iframe is added dynamically to the page using the Braintree JavaScript SDK. The iframe includes the Hosted Fields payment form. When the customer submits the form, Hosted Fields collects the card details securely and attempts to tokenize them. If tokenization succeeds, you can send the generated token nonce to your view to make a transaction using the Python braintree module.
We will create a view for processing payments. The whole checkout process will work as follows:
- In the view, a client token is generated using the braintree Python module. This token is used in the next step to instantiate ...