Laravel Nova Braintree Component in orders create page
Hello. I'm implementing the Braintree component for nova according to the documentation. I have a table of orders and it already contains a Braintree field, to which an attribute is passed in the database, where the “nonce” of the completed payment will be stored. To get it, you need to execute a function that sends a request to the Braintree API and receives a “nonce” in response, which will be stored in the required field in the database. The problem is that I created a separate button in the field, when clicked, the request is sent and the response of the request is stored as needed. But in fact, it is necessary for the request to be sent when I was already trying to create an order. I need to somehow connect to the general submission of the form, and before it creates a resource, send a request, wait for a response, receive a “nonce” and write it to the table if received, and if there is no “nonce”, then throws a validation error. Any ideas how to connect to general form submition?
Please or to participate in this conversation.