Rebrand to Waseel, swap Stripe for Areeba, add phone-ready auth and DB seed

- Rename app: Waseel (name, slug, scheme waseel://, com.waseel.app ids, splash)
- Payments: replace Stripe with Areeba hosted checkout (create/verify API routes,
  lib/areeba.ts, WebBrowser-based payment flow)
- Maps: migrate address autocomplete to Places API (New), drop legacy library
- Web support: map stub for web (native maps are iOS/Android only)
- Auth: keep email + Google OAuth; fix OAuth redirect for Expo Go
- Add scripts/seed-db.mjs (schema + Lebanese driver seed)
- Pin Expo SDK 51 compatible package versions
This commit is contained in:
Krikorios
2026-08-22 15:53:41 +03:00
parent a2f46e6c03
commit 62dc5e9d53
22 changed files with 20837 additions and 369 deletions
+35
View File
@@ -0,0 +1,35 @@
import { retrieveOrder } from "@/lib/areeba";
export async function POST(req: Request) {
const body = await req.json();
const { orderId, resultIndicator, successIndicator } = body;
if (!orderId)
return new Response(JSON.stringify({ error: "Missing order id." }), {
status: 400,
});
try {
const order = await retrieveOrder(orderId);
// The gateway appends resultIndicator to the return URL after payment;
// it must match the successIndicator issued when the session was created.
const indicatorMatches =
!successIndicator || resultIndicator === successIndicator;
return new Response(
JSON.stringify({
success: order.paid && indicatorMatches,
status: order.status,
amount: order.amount,
currency: order.currency,
}),
);
} catch (err) {
console.log("[AREEBA_PAYMENT_VERIFY]: ", err);
return new Response(JSON.stringify({ error: "Internal Server Error" }), {
status: 500,
});
}
}