Apirone invoices is a white label solution that can be integrated in any kind of projects.
yarnyarn serveyarn buildyarn lintYou can change the default behavior of the application by configuring some settings even the application has already been built. Create a script that runs before the application starts and set window.invoice_app_config object.
For example, you can add the following to your html:
<html>
<head>
...
<script>
window.invoice_app_config = {
service_url: 'https://apirone.com/api/v2/',
wallets_ep: 'wallets',
invoices_ep: 'invoices/%s',
images_relative_path: 'img',
invoice_id_key: 'id',
embed: true,
logo: true,
qr_only: true,
mount_point: '.my-mount-point-for-app',
};
</script>
<script type="module" crossorigin defer src="./script.min.js"></script>
<link rel="stylesheet" crossorigin href="./style.min.css">
</head>
<body>
<div id="app"></div>
</body>
</html>-
service_urlDefines the URL prefix for requests to the Apirone API RESTful service. The fallback value can be seen in the example above. -
wallets_epDefines the URL suffix endpoint for querying wallets in the Apirone API RESTful service. The fallback value can be seen in the example above. -
invoices_epDefines a URL suffix endpoint for requesting invoice information from the Apirone API RESTful service. Use the%splaceholder for the invoice ID. The fallback value can be seen in the example above. For example, you could define it asinvoices&id=%s, and for the default service URL and the invoice IDABC123, the full URL would be:https://apirone.com/api/v2/invoices&id=ABC123 -
images_relative_pathSpecifies the relative path to images used by the application,imgby default. -
invoice_id_keyOverrides the invoice id query parameter key ifid(the default) is already used for other purposes in the target system. -
embedThe Embed parameter set totruedisables the linkback handler and disables the display of the Apirone logo,falseby default. -
logoThetruevalue always displays the Apirone logo. You can also specify a custom logo as a string of HTML code. Thefalsevalue disables the logo entirely. If this value is not specified, the logo is displayed according to theembedparameter. -
qr_onlyThe value can be used if you want to see only a QR code on app pagefalseby default. -
mount_pointThe value of CSS selector that can be used if you want to mount the application into an HTML element with a selector other than#app. The default is#app.
All of these settings are not required.
So, you can embed the application to any environment.
docker build -t invoice-app ./
docker run -it -p 80:80 -d invoice-app
