Fix Mini Paystack checkout by redirecting instead of iframe embed.
Deploy Ladill Mini / deploy (push) Successful in 29s
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:
@@ -19,8 +19,6 @@
|
||||
amount: @js(old('amount')),
|
||||
loading: false,
|
||||
errorMsg: @js(session('error')),
|
||||
showSheet: false,
|
||||
checkoutUrl: '',
|
||||
async submitPay() {
|
||||
const value = parseFloat(this.amount);
|
||||
if (!value || value <= 0) {
|
||||
@@ -46,9 +44,12 @@
|
||||
this.loading = false;
|
||||
return;
|
||||
}
|
||||
this.checkoutUrl = data.checkout_url;
|
||||
this.showSheet = true;
|
||||
this.loading = false;
|
||||
if (!data.checkout_url) {
|
||||
this.errorMsg = 'Could not start payment. Please try again.';
|
||||
this.loading = false;
|
||||
return;
|
||||
}
|
||||
window.location.assign(data.checkout_url);
|
||||
} catch (e) {
|
||||
this.errorMsg = 'Network error. Please try again.';
|
||||
this.loading = false;
|
||||
@@ -133,7 +134,5 @@
|
||||
<p class="mt-4 text-center text-[11px] text-slate-400">Secured by Paystack · Powered by Ladill Mini</p>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@include('partials.paystack-sheet')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user