Collect MoMo MSISDN and open waiting page on Pay.
Deploy Ladill Mini / deploy (push) Successful in 42s
Deploy Ladill Mini / deploy (push) Successful in 42s
Payment QR was still Paystack-only: no customer_phone and mobile iframe sheet. Require MoMo number, pass it to Ladill Pay, and full-page redirect for mtn_momo waiting URLs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -27,6 +27,7 @@ class PaymentController extends Controller
|
||||
|
||||
$validated = $request->validate([
|
||||
'amount' => 'required|numeric|min:0.01',
|
||||
'customer_phone' => 'required|string|max:32',
|
||||
]);
|
||||
|
||||
try {
|
||||
@@ -40,7 +41,10 @@ class PaymentController extends Controller
|
||||
}
|
||||
|
||||
if ($request->expectsJson()) {
|
||||
return response()->json(['checkout_url' => $result['checkout_url']]);
|
||||
return response()->json([
|
||||
'checkout_url' => $result['checkout_url'],
|
||||
'provider' => $result['provider'] ?? null,
|
||||
]);
|
||||
}
|
||||
|
||||
return redirect()->away($result['checkout_url']);
|
||||
|
||||
Reference in New Issue
Block a user