fix(rcart): use popup for Transak payment in all envs #3
|
|
@ -158,8 +158,7 @@ class FolkPaymentPage extends HTMLElement {
|
|||
// Listen for Transak postMessage events
|
||||
window.addEventListener('message', this.handleTransakMessage);
|
||||
|
||||
// Staging blocks iframes (X-Frame-Options: sameorigin) — use popup
|
||||
if (this.transakEnv === 'STAGING') {
|
||||
// Transak blocks iframes (X-Frame-Options: sameorigin) — always use popup
|
||||
this.transakPopup = window.open(
|
||||
data.widgetUrl,
|
||||
'transak-payment',
|
||||
|
|
@ -172,7 +171,6 @@ class FolkPaymentPage extends HTMLElement {
|
|||
this.transakPopup = null;
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
} catch (e) {
|
||||
this.error = e instanceof Error ? e.message : String(e);
|
||||
}
|
||||
|
|
@ -570,8 +568,7 @@ class FolkPaymentPage extends HTMLElement {
|
|||
|
||||
private renderCardTab(): string {
|
||||
if (this.transakUrl) {
|
||||
// Staging: Transak blocks iframes, show popup status instead
|
||||
if (this.transakEnv === 'STAGING') {
|
||||
// Transak blocks iframes (X-Frame-Options: sameorigin) — show popup status
|
||||
return `
|
||||
<div class="tab-body" style="text-align:center">
|
||||
<div class="transak-popup-status">
|
||||
|
|
@ -581,11 +578,6 @@ class FolkPaymentPage extends HTMLElement {
|
|||
</div>
|
||||
</div>`;
|
||||
}
|
||||
return `
|
||||
<div class="transak-container">
|
||||
<iframe src="${this.transakUrl}" class="transak-iframe" allow="camera;microphone;payment" frameborder="0"></iframe>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
return `
|
||||
<div class="tab-body">
|
||||
|
|
|
|||
Loading…
Reference in New Issue