Align merchant settlement and booking checkout with the updated Ladill Pay sales tier. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
Standalone app for **shop, menu & booking storefronts** at `merchant.ladill.com` — QR
|
||||
storefronts with catalog checkout. Sales settle into the one platform UserWallet
|
||||
(15% fee), then withdraw via `account.ladill.com`.
|
||||
(9% fee), then withdraw via `account.ladill.com`.
|
||||
|
||||
Public scans stay at `ladill.com/q/<code>` (blueprint decision — printed codes
|
||||
never migrate). The platform host forwards shop/menu/booking codes to this app (see
|
||||
@@ -23,7 +23,7 @@ main app DB user.
|
||||
|---|---|
|
||||
| `LADILL_SSO_CLIENT_ID` / `LADILL_SSO_CLIENT_SECRET` | `passport:client` on platform |
|
||||
| `BILLING_API_KEY_MERCHANT` | platform `.env` + this app |
|
||||
| `PAY_API_KEY_MERCHANT` | platform `.env` + this app — Ladill Pay checkout (15% sales tier) |
|
||||
| `PAY_API_KEY_MERCHANT` | platform `.env` + this app — Ladill Pay checkout (9% sales tier) |
|
||||
| `IDENTITY_API_KEY_MERCHANT` | platform `.env` + this app |
|
||||
| `PLATFORM_DB_*` | read `ladilldb.platform_settings` (Paystack keys from admin → Billing) |
|
||||
|
||||
@@ -83,7 +83,7 @@ php artisan config:cache route:cache view:cache
|
||||
|
||||
- SSO login at `merchant.ladill.com`
|
||||
- Create a shop, menu, or booking storefront, download QR PNG
|
||||
- Scan `/q/<code>`, place test order, confirm wallet credit (net of 15%)
|
||||
- Scan `/q/<code>`, place test order, confirm wallet credit (net of 9%)
|
||||
- Withdraw from `account.ladill.com/wallet`
|
||||
|
||||
## Product IA (blueprint)
|
||||
|
||||
@@ -27,7 +27,7 @@ class QrSaleOrder extends Model
|
||||
self::FULFILLMENT_CANCELLED => 'Cancelled',
|
||||
];
|
||||
|
||||
public const PLATFORM_FEE_RATE = 0.15;
|
||||
public const PLATFORM_FEE_RATE = 0.09;
|
||||
|
||||
protected $fillable = [
|
||||
'pay_order_id',
|
||||
|
||||
@@ -297,7 +297,7 @@ class MerchantSaleService
|
||||
}
|
||||
|
||||
$paidAmount = round(($data['amount'] ?? 0) / 100, 2);
|
||||
$platformFee = round($paidAmount * 0.15, 2);
|
||||
$platformFee = round($paidAmount * QrSaleOrder::PLATFORM_FEE_RATE, 2);
|
||||
$merchantAmount = round($paidAmount - $platformFee, 2);
|
||||
|
||||
$booking->update([
|
||||
|
||||
Reference in New Issue
Block a user