Invoice component
Gain a better understanding of the invoice component, how to create and mount it, as well as how to submit the information it collects from customers
Last updated
Gain a better understanding of the invoice component, how to create and mount it, as well as how to submit the information it collects from customers
Last updated
The invoice component collects information needed to comply with Taiwan's e-invoicing requirements. For background on these requirements, refer to .
To use the component, you'll need to , , and .
In the data
returned by , you can use to determine whether this component must be displayed.
If done()
returns true
, this indicates that customers entered a properly formatted carrier value, and your code can advance them to the next stage of the checkout.
A false
value indicates that customers either didn't provide a value or it's incorrectly formatted, and you shouldn't allow the checkout to advance. In this case, the component prompts customers to try again and offers them formatting assistance.
To create an instance of the invoice component, pass 'invoiceattribute'
to .
To attach the invoice component to your DOM, pass the id
of its container to .
The invoice component exposes done()
, which submits the customer's input and returns a boolean. It requires that you use the operator and, therefore, must be called inside an .