# Testing

Use a staging Digiflazz credential and `testing=true` only where supported.

## DB
- Import database.sql.
- Verify foreign keys.
- Verify unique member_code/email/api_key/ref_id.

## Authentication
- Register valid.
- Duplicate email.
- Login valid/invalid.
- Suspended account.
- Logout.

## H2H
- Valid signature.
- Invalid signature.
- Timestamp ± tolerance.
- IP whitelist.
- Duplicate ref_id.
- Concurrent order against same balance.

## Webhooks
- Valid X-Hub-Signature.
- Invalid signature returns 401.
- Success updates once.
- Failed refunds once.
- Duplicate webhook is idempotent.

## Telegram
- Invalid secret returns 401.
- Non-admin chat returns 403.
- Approve and reject.
- Double-click button does not credit twice.

## Upload
- JPEG/PNG/WEBP accepted.
- PHP/script MIME rejected.
- Oversize rejected.
