INVOZO FOR A CUSTOM SHOP, PHP 8.1 OR NEWER

invozo.php          the client, no other library is needed
config.sample.php   copy it as config.php and paste your API key
connect.php         run from the command line: checks the key and sets the confirmations
pay.php             the buyer's Pay button posts here and lands on the Invozo page
webhook.php         Invozo calls it when an order is paid or refunded
orders.php          an example kept in a file: replace its functions with your database

1. Copy config.sample.php as config.php and paste the key from your Invozo account, Shops.
2. php connect.php https://your-shop.com/invozo/webhook.php
   Put the secret it shows in config.php.
3. php connect.php
   It has to say: Webhook: works.
4. Replace the functions in orders.php with your own database, then delete orders.json.
5. In your checkout: <form method="post" action="/invozo/pay.php"><input type="hidden" name="order" value="1042"><button>Pay by card</button></form>

Keep config.php and orders.json away from visitors. The included .htaccess does that on Apache and LiteSpeed.
Full guide: https://install.invozo.eu/php/
