Today we will see how to make payments in our React Native application. To do this, we will use braintree. Braintree is a service that helps accept, process and split payments. It is a Paypal service.

To use braintree, you need to create an account. After that, we can use their sandbox to test our application.

In the sandbox, we can see the total of transactions, the total sales volume, and a bunch of other options. Also, we can list our transactions.

Using the sandbox, we can use fake cards, as you can see in the page Testing and Go Live. There are some cards that can return errors and we can test our application with these errors.

Currently, braintree has some SDK. For ruby, python, php, JavaScript and other languages. I have set up the Ruby one, using the braintree example app.

In our Ruby side, we receive the following request:

result = :amount => amount, :payment_method_nonce => 'fake-valid-nonce', :options => { :submit_for_settlement...