CATRION CAPITAL — MOBILE / MULTICURRENCY / PAYMENT UPGRADE
============================================================

Deployment target
-----------------
https://catrion-capital.com.ng

IMPORTANT
---------
1. Back up the live website files and database before replacing files.
2. Upload the entire upgraded project, or use the replacement package while preserving the same folder structure.
3. Do not expose or publish any *-config.php file. The included .htaccess blocks direct browser access to configuration files.
4. Payment-provider names and credentials are intentionally not shown on customer-facing pages.

Public callback URLs
--------------------
Naira deposit callback:
https://catrion-capital.com.ng/nekpay-callback.php

Dollar/Crypto callback:
https://catrion-capital.com.ng/nowpayments-callback.php

Naira payout callback:
https://catrion-capital.com.ng/nekpay-transfer-callback.php

Core upgrade summary
--------------------
- Compact mobile-first Dashboard.
- Persistent language preference from Login/Register into the account.
- Small global language selector on customer pages.
- Country selector on Login/Register.
- Country determines the initial display currency; users may switch display currency on Dashboard.
- USD is the fallback/default display currency for international/legacy users.
- Internal accounting stays in NGN; other currencies are display equivalents.
- Platform USD/NGN rate defaults to $1 = N1,500 and is editable in Admin > Settings > Finance.
- Display exchange rates for IDR, EUR, GBP and other currencies are admin-editable.
- $1 welcome bonus is stored as a locked bonus and becomes spendable/withdrawable only after a successful deposit and plan activation.
- Naira deposit minimum: N4,000 hard floor.
- Dollar/Crypto deposit minimum: $3 hard floor; default max: $5,000.
- Naira and Dollar deposit amount presets are admin-editable.
- Naira deposit warning for OPay is admin-editable.
- Dollar/Crypto deposit includes currency + network selection.
- Crypto payment is white-label on Catrion pages and will only proceed when the returned stablecoin amount matches the selected Dollar amount within the validation tolerance.
- Naira checkout is presented inside the Catrion payment shell when the external checkout permits iframe embedding. A fallback payment-window link remains available if the external checkout blocks embedding.
- Invest page has compact live plans plus Naira/Dollar flyer guides.
- Withdrawal password is exactly six digits and is created in Profile.
- Users must bind a Naira bank or USDT BEP20 wallet before withdrawing.
- Crypto withdrawal destination is USDT on BNB Smart Chain (BEP20) only.
- Withdrawal minimum: $1 equivalent.
- Withdrawal amount is reserved/deducted immediately when the request is created.
- A user cannot create another withdrawal while one is pending/processing/approved.
- Naira withdrawal: Admin approval submits the payout automatically and waits for the signed payout callback before marking it paid.
- Crypto withdrawal: Admin sends USDT manually, enters the BEP20 transaction hash, then confirms paid/approved.
- Rejected/cancelled requests refund the reserved amount only when it is safe to do so.
- Admin payment settings include the FX rate, welcome bonus, deposit/withdrawal minimums, preset amounts, fees, display-currency rates and warning text.

Admin settings to review after upload
-------------------------------------
Admin > Settings > Finance
- USD/NGN platform rate
- Welcome bonus in USD
- Naira deposit minimum / maximum
- Crypto deposit minimum / maximum
- Naira quick amount presets
- Crypto quick amount presets
- OPay Naira deposit warning
- Minimum withdrawal in USD
- Maximum withdrawal
- Withdrawal percentage/fixed fee
- Display currency rate JSON

Admin > Plans
- Plan status
- Naira investment amount
- Daily income
- Duration
- Premium/standard category
- Plan images

Testing sequence
----------------
1. Register a brand-new test user and choose a non-English language + country.
2. Confirm language remains selected after login and the top-right language selector is present.
3. Confirm Dashboard defaults to the country's currency and can switch to USD/NGN/EUR/GBP/IDR etc.
4. Confirm new account shows the $1 welcome bonus locked.
5. Test Naira deposit with at least N4,000. Do NOT test with OPay for the deposit.
6. Confirm a successful Naira callback credits the wallet exactly once.
7. Test a $3 stablecoin deposit using one of the enabled currency/network combinations.
8. Confirm the payment page shows the exact selected Dollar amount and the correct network/address.
9. Confirm interim crypto statuses do not credit the wallet; only final completion does.
10. Activate an investment after the successful deposit and confirm the $1 welcome bonus unlocks into the main balance once.
11. Set a six-digit withdrawal password in Profile.
12. Bind a supported Naira bank and submit a Naira withdrawal.
13. Confirm balance is reserved immediately and the withdrawal button is locked while pending.
14. In Admin > Withdrawals, approve the Naira request and confirm it moves to processing, then paid only after the payout callback.
15. Bind a USDT BEP20 wallet and test crypto withdrawal. Send the USDT manually, then enter the transaction hash in Admin and confirm paid.
16. Confirm all deposits, withdrawals, wallet entries, notifications and admin actions are recorded.

Payout troubleshooting
----------------------
If Naira payout approval returns an insufficient provider-balance error, the withdrawal remains pending and the user's funds stay reserved. Fund the payout account, then retry.

If the payout server reports an unauthorized IP, the hosting server IP must be authorized for the payout merchant before automatic approval can succeed.

White-label note
----------------
The customer pages never name the payment providers. The Naira payment rail currently returns a hosted payment URL. Catrion embeds that hosted checkout in its own payment shell when allowed. Because the hosted checkout is cross-origin, Catrion cannot remove branding that the external checkout itself renders inside its iframe. Fully native bank details would require a provider API that returns account/payment instructions directly rather than only a hosted checkout URL.

END
