PROTECTED COMMERCE v1.6.0 UPGRADE

1. Back up /home/coopcomn/public_html/escrow and export the MySQL database.
2. Keep your existing live config.php.
3. Upload/extract the v1.6 app over /home/coopcomn/public_html/escrow/.
4. Run:
   cd /home/coopcomn/public_html/escrow
   /usr/local/bin/ea-php74 tools/migrate_v1_6.php

5. Edit config.php. Replace the old payments section with:

'payments' => [
    'mode' => 'paystack',
    'paystack' => [
        'secret_key' => 'sk_test_YOUR_PAYSTACK_TEST_SECRET_KEY',
        'channels' => [],
    ],
],

Never put the Paystack secret key in PrestaShop or browser-side code.

6. Check configuration:
   /usr/local/bin/ea-php74 tools/paystack_check.php

7. In your Paystack dashboard set the webhook URL to:
   https://khamsfoods.com.ng/escrow/paystack/webhook

8. Upgrade PrestaShop using protectedcommerce_prestashop_v1_6_0.zip.
   Do not uninstall the existing module first. Existing Protected Commerce API key and webhook secret are preserved/migrated.

9. In the PrestaShop module click Test Merchant Connection.

10. Place a NEW test order:
    PrestaShop checkout
    -> select Protected Commerce
    -> Protected Commerce payment page
    -> Pay securely with Paystack
    -> complete Paystack test payment
    -> app verifies payment
    -> FUNDED
    -> merchant Mark shipped
    -> buyer Manage Protected Transaction
    -> Confirm Delivery
    -> Accept Item & Release Payment / Open Dispute

11. Only after test mode is working should you replace sk_test_... with sk_live_....

PAYSTACK CALLBACK:
https://khamsfoods.com.ng/escrow/paystack/callback

PAYSTACK WEBHOOK:
https://khamsfoods.com.ng/escrow/paystack/webhook

IMPORTANT:
The Paystack secret key is not included in this ZIP.
