Creating a Transaction
Follow step-by-step instructions to create and search transactions, and practice it yourself.
Create a transaction
To create a transaction, we use the transaction.sale()
method from the Braintree gateway. This method requires, at least, the following two parameters:
- Amount
- Payment method nonce
In the code below, we are creating a transaction in lines 12–19. We have specified the amount and the payment method nonce in line 13 and line 15 respectively. Moreover, we provide an option in line 17 as an instruction that the ...
Get hands-on with 1400+ tech skills courses.