# Furnify Payments + Install Button Update

## Payment features added

### Manual GCash payment
Customers can choose **GCash manual payment / upload proof** during checkout.

Configure GCash details in:

```php
data/settings.php
```

Update:

```php
'payments' => array(
    'manual_gcash' => array(
        'enabled' => true,
        'account_name' => 'Your GCash Account Name',
        'mobile_number' => '09XX XXX XXXX',
        'qr_image' => 'assets/images/gcash-qr.png',
    ),
)
```

Upload your GCash QR image to:

```text
assets/images/gcash-qr.png
```

### Credit card / online GCash payment
The site is ready for payment-link workflow through providers like PayMongo, Maya, Xendit, or your bank checkout link.

Important: Do **not** collect or store credit card numbers on this website. Use a secure checkout/payment link from your payment provider.

Configure the default payment link in:

```php
data/settings.php
```

```php
'online_checkout' => array(
    'enabled' => true,
    'provider_label' => 'Secure Card / GCash Checkout',
    'payment_link' => 'https://your-secure-payment-link',
)
```

For per-order links, admin can paste the generated payment link in:

```text
Admin > Orders > View Order > Payment link
```

## Admin payment monitoring

Admin can view payment details in:

```text
/admin/orders.php
/admin/order-view.php?id=ORDER_ID
```

Admin can update:

- order status
- payment status
- amount paid
- balance due
- payment reference
- payment link
- uploaded proof of payment

Payment proofs are stored privately in:

```text
storage/payment_proofs/
```

They are only viewable through the admin proof viewer:

```text
/admin/payment-proof.php?id=ORDER_ID
```

## Database migration

For a fresh install, import:

```text
database/schema.sql
```

If you already imported an older Furnify database, run this once:

```text
database/migration_payment_install.sql
```

## Sticky install button

The website now includes a sticky **Install Furnify App** button.

Behavior:

- Shows only when the app is not installed.
- On Android/Chrome, it uses the native PWA install prompt when available.
- On iPhone/iPad, it opens install instructions because iOS uses Safari Share > Add to Home Screen.
- Automatically hides when the app is installed or opened in standalone mode.

## iOS install instructions

1. Open the site in Safari.
2. Tap Share.
3. Tap Add to Home Screen.
4. Tap Add.

## Android install instructions

1. Tap Install Furnify App when the button appears.
2. If no popup appears, tap Chrome menu ⋮.
3. Tap Install app or Add to Home screen.
