Fix Mini Paystack checkout by redirecting instead of iframe embed.
Deploy Ladill Mini / deploy (push) Successful in 29s

Paystack blocks checkout in third-party iframes, so payment QRs now navigate to the hosted checkout URL and prefer authorization_url from the initialize response.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-07 21:34:33 +00:00
co-authored by Cursor
parent 3bcab953f9
commit c51229e10c
2 changed files with 16 additions and 8 deletions
+10 -1
View File
@@ -71,9 +71,18 @@ class MiniPaymentService
],
]);
$checkoutUrl = $paystackData['authorization_url']
?? (isset($paystackData['access_code']) && $paystackData['access_code'] !== ''
? 'https://checkout.paystack.com/'.$paystackData['access_code']
: '');
if ($checkoutUrl === '') {
throw new RuntimeException('Could not start Paystack checkout. Please try again.');
}
return [
'payment' => $payment,
'checkout_url' => 'https://checkout.paystack.com/'.($paystackData['access_code'] ?? ''),
'checkout_url' => $checkoutUrl,
];
}