VetCare PayPal checkout

1. Back up your current files and database.
2. Run migration.sql ONCE in your database using phpMyAdmin.
3. Replace reservations.php and add paypal_config.php, paypal_api.php and
   paypal_checkout.php in the same folder as database.php.
   Keep your existing database.php, reservations.css, and other site files.
4. Create a sandbox REST app at https://developer.paypal.com/dashboard/.
   Put its client ID and secret in paypal_config.php (server side only).
5. Set PAYPAL_BASE_URL to your actual project URL, e.g.
   http://localhost/vetcare. Keep currency PHP because your prices are pesos.
6. Enable PHP cURL and mysqli/mysqlnd. Use PHP 7.4+ (PHP 8 recommended).
7. Sign in to VetCare, book an appointment, and click Pay with PayPal.
   Use a separate PayPal sandbox personal buyer account, not the seller.
8. Confirm a completed payment becomes Paid, returning again does not charge
   twice, cancellation remains Pending, and another user cannot pay your booking.
9. For live payments set PAYPAL_MODE to live, use live REST app credentials,
   and configure an HTTPS application URL. Do not share the client secret.

Notes
- Amount comes from payments.amount, not browser input. Paid is saved only
  after a completed PayPal capture with matching PHP amount and order identity.
- Existing Pending records can be paid through PayPal; paid records are kept.
- This integration uses the logged-in return flow and a retry via Pay with
  PayPal to reconcile an existing order. It does not include a webhook worker.
  If a buyer closes the browser, payment can stay Pending locally until they
  return/retry. For unattended production reconciliation, add verified PayPal
  capture webhooks or a scheduled server reconciliation job.
- Do not change amount/currency or delete PayPal order IDs for an active order.
  An expired order requires reconciliation before an administrator resets it.
- The database schema and database.php were not provided. The migration assumes
  the tables/columns shown in the supplied page and transactional MySQL tables.
- PHP is unavailable in the editing environment. No PHP runtime, database,
  sandbox checkout, or live transaction was executed here. Perform the sandbox
  checks above before enabling live payments.
- Original appointment scheduling behavior is retained, including its existing
  concurrency limitations for simultaneous bookings.

API reference: https://developer.paypal.com/api/rest/integration/orders-api
