Cryptain for Magento 2 (2.4.x)
==============================

Install
1. Copy the "app" folder into your Magento root (so you get app/code/Cryptain/Payment).
2. From the Magento root run:
     php bin/magento module:enable Cryptain_Payment
     php bin/magento setup:upgrade
     php bin/magento setup:di:compile          (production mode only)
     php bin/magento setup:static-content:deploy   (production mode only)
     php bin/magento cache:flush
3. Admin → Stores → Configuration → Sales → Payment Methods → "Cryptain — crypto payments":
   enable it and paste your Cryptain URL, public key, secret key and webhook secret
   (Cryptain dashboard → Stores → your store).
4. In the Cryptain dashboard set the store's Webhook URL to:
     https://YOUR-MAGENTO-SITE/cryptain/webhook

How it works
- The customer chooses "Pay with crypto" and places the order (status: Pending Payment).
- They are sent to the Cryptain checkout to pay.
- When the payment is confirmed, the webhook creates the Magento invoice and moves the order to Processing.
- Expired invoices cancel the order.
