@spot-flow/checkout-inline-js 0.2.4-dev.1 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -36621,7 +36621,7 @@ class hu {
|
|
|
36621
36621
|
renderPaymentOptions(e) {
|
|
36622
36622
|
const t = e.querySelector(".payment-options"), i = In(this.currency, this.localCurrency);
|
|
36623
36623
|
if (t) {
|
|
36624
|
-
const s = this.merchantDetail.plan ? [se.
|
|
36624
|
+
const s = this.merchantDetail.plan ? [se.mobile_money] : this.merchantDetail.paymentMethods.filter((a) => a !== "ussd").filter((a) => !(i !== "USD" && a === "stablecoin")).map((a) => se[a]);
|
|
36625
36625
|
if (this.isMobile) {
|
|
36626
36626
|
let a = '<div class="">';
|
|
36627
36627
|
s.forEach((o) => {
|
|
@@ -37308,9 +37308,9 @@ class Su {
|
|
|
37308
37308
|
i && s && (i.classList.remove("hidden"), s.classList.add("hidden"));
|
|
37309
37309
|
const a = ft();
|
|
37310
37310
|
(() => {
|
|
37311
|
-
var l, c;
|
|
37311
|
+
var l, c, p, m;
|
|
37312
37312
|
if (this.retryingPayment) {
|
|
37313
|
-
const
|
|
37313
|
+
const g = {
|
|
37314
37314
|
channel: "mobile_money",
|
|
37315
37315
|
reference: this.reference,
|
|
37316
37316
|
mobileMoney: {
|
|
@@ -37325,19 +37325,24 @@ class Su {
|
|
|
37325
37325
|
};
|
|
37326
37326
|
return mt(
|
|
37327
37327
|
this.token,
|
|
37328
|
-
|
|
37328
|
+
g,
|
|
37329
37329
|
this.rdtCode,
|
|
37330
37330
|
this.url
|
|
37331
37331
|
);
|
|
37332
37332
|
} else {
|
|
37333
|
-
const
|
|
37333
|
+
const g = {
|
|
37334
37334
|
amount: this.amount,
|
|
37335
37335
|
channel: "mobile_money",
|
|
37336
37336
|
currency: this.currency,
|
|
37337
37337
|
customer: this.customer,
|
|
37338
37338
|
reference: this.reference,
|
|
37339
37339
|
callBackUrl: this.callBackUrl,
|
|
37340
|
-
metadata:
|
|
37340
|
+
metadata: {
|
|
37341
|
+
...this.metadata,
|
|
37342
|
+
...((l = this.merchantDetails) == null ? void 0 : l.subscription_id) && {
|
|
37343
|
+
subscription_id: (c = this.merchantDetails) == null ? void 0 : c.subscription_id
|
|
37344
|
+
}
|
|
37345
|
+
},
|
|
37341
37346
|
mobileMoney: {
|
|
37342
37347
|
code: t.code,
|
|
37343
37348
|
// "mtn-gh",
|
|
@@ -37349,8 +37354,8 @@ class Su {
|
|
|
37349
37354
|
},
|
|
37350
37355
|
...this.localCurrency && { localCurrency: this.localCurrency },
|
|
37351
37356
|
isCheckout: !0,
|
|
37352
|
-
...((
|
|
37353
|
-
taxQuoteId: (
|
|
37357
|
+
...((p = this.merchantDetails) == null ? void 0 : p.taxQuoteId) && {
|
|
37358
|
+
taxQuoteId: (m = this.merchantDetails) == null ? void 0 : m.taxQuoteId
|
|
37354
37359
|
},
|
|
37355
37360
|
...this.countryCode && {
|
|
37356
37361
|
countryCode: this.countryCode
|
|
@@ -37359,7 +37364,7 @@ class Su {
|
|
|
37359
37364
|
};
|
|
37360
37365
|
return ul(
|
|
37361
37366
|
this.token,
|
|
37362
|
-
|
|
37367
|
+
g,
|
|
37363
37368
|
this.rdtCode,
|
|
37364
37369
|
this.url
|
|
37365
37370
|
);
|
package/dist/checkout-inline.js
CHANGED
|
@@ -1991,7 +1991,7 @@ or you can use record.mirror to access the mirror instance during recording.`;le
|
|
|
1991
1991
|
<!-- Tab options -->
|
|
1992
1992
|
</div>
|
|
1993
1993
|
</div>
|
|
1994
|
-
</div>`;class Nc{constructor(e){d(this,"container");d(this,"email");d(this,"amount",0);d(this,"metadata");d(this,"currency");d(this,"localCurrency");d(this,"mainLoader");d(this,"trialAmount");d(this,"trial");d(this,"merchantDetail");d(this,"onAction");d(this,"isMobile");d(this,"onClose");d(this,"currentPaymentMethod");d(this,"countryCode");this.container=e.container,this.email=e.email,this.amount=e.amount||0,this.metadata=e.metadata,this.currency=e.currency,this.localCurrency=e.localCurrency,this.merchantDetail=e.merchantDetail,this.onAction=e.onAction,this.isMobile=e.isMobile,this.trial=e.trial,this.onClose=e.onClose,this.trialAmount=e.trialAmount,this.currentPaymentMethod=e.currentPaymentMethod,this.countryCode=this.countryCode=e.currency==="XOF"||e.currency==="XAF"||e.localCurrency==="XOF"||e.localCurrency==="XAF"?e.countryCode:""}attachListeners(){const e=this.container.querySelectorAll(".tab-button");Array.from(e).forEach(o=>{const a=o.dataset.name||"",l=o.querySelector(".tab-button-icon"),c=o.querySelector(".tab-button-label");l&&(l.innerHTML=se[a].icon),c&&(c.textContent=se[a].label),o.addEventListener("click",p=>{p.preventDefault(),this.onAction(a)})});const i=this.container.querySelector("#close-btn");i&&i.addEventListener("click",()=>{this.onClose(!0)});const s=document.getElementById("go-back");s==null||s.addEventListener("click",()=>{this.onAction("")})}renderComponent(){var wn,Wn,On,je,kn,Zn,me,xe,Qe,ze,De,hn,H,ye,te,Ce,qe,ne,Un,Bt,hi,mi,pi,vi,Qn,bi,re,fi,gi,yi,Ci,wi,ki,Si,gt,yt,xi,Ai,Mi,Li,Ct,Je,Ti,Sn,_i,Rt;this.container.innerHTML=this.render(),this.mainLoader=new ke(this.container),this.amount=this.amount;const e=this.container.querySelector("#merchant-logo-container"),t=this.container.querySelector("#merchant-logo"),i=this.container.querySelector("#merchant-email"),s=this.container.querySelector("#merchant-email-mob"),o=this.container.querySelector("#trial-info"),a=this.container.querySelector("#todays-total-amount"),l=this.container.querySelector("#plan-name"),c=this.container.querySelector("#plan-name-mob"),p=this.container.querySelector("#payment-fees"),m=this.container.querySelector("#currency-cursor"),g=this.container.querySelector("#currency-cursor-mob"),b=this.container.querySelector("#payment-rate-display"),y=this.container.querySelector("#payment-rate-display-mob"),w=this.container.querySelector("#designated-rate"),f=this.container.querySelector("#designated-rate-mob"),k=this.container.querySelector("#designated-rate-no-plan"),x=this.container.querySelector("#source-rate"),A=this.container.querySelector("#source-rate-mob"),M=this.container.querySelector("#tax-rate"),E=this.container.querySelector("#tax-rate-mob"),D=this.container.querySelector("#tooltip-localCurrency"),G=this.container.querySelector("#tooltip-localCurrency-mob"),Z=this.container.querySelector("#select-payment-method-text"),K=this.container.querySelector("#amount-text"),Q=this.container.querySelector("#what-is-this"),de=this.container.querySelector("#reflect"),_e=this.container.querySelector("#please-note"),j=this.container.querySelector("#what-is-this-mob"),Oe=this.container.querySelector("#reflect-mob"),ge=this.container.querySelector("#please-note-mob"),Ge=this.container.querySelector("#to-pay-text"),Se=this.container.querySelector("#language-dropdown");if(Se){const an=this.currency==="USD"?this.localCurrency:this.currency,Vn=(wn=Ni(an,this.countryCode))==null?void 0:wn.language,xn=new Set;xn.add("en"),Vn&&Vn!=="en"&&xn.add(Vn),Ae.getTranslationError()||pn&&!xn.has(pn)&&xn.add(pn),xn.size===1?Se.classList.add("hidden"):Se.classList.remove("hidden"),xn.forEach(Ye=>{const mn=new Option(Ye,Ye);mn.value=Ye,mn.text=Dc[Ye]||Ye,Ye===R()&&(mn.selected=!0),Se.appendChild(mn)}),Ae.subscribeToLoading(Ye=>{Se.disabled=Ye}),Se.addEventListener("change",async Ye=>{const Ei=Ye.target.value;it(Ei);try{await Ae.setLanguage(Ei)}catch(Pi){console.error("Failed to change language:",Pi)}finally{}})}if(Z&&(Z.innerHTML=q.select_payment_method_text),K&&(K.innerHTML=`${q.amount}:`),Ge&&(Ge.innerHTML=`${q["to-pay"]}:`),Q&&(Q.innerHTML=P["what-is-this"]),de&&(de.innerHTML=P["rate-reflect-note"]),_e&&(_e.innerHTML=P["rate-please-note"]),j&&(j.innerHTML=P["what-is-this"]),Oe&&(Oe.innerHTML=P["rate-reflect-note"]),ge&&(ge.innerHTML=P["rate-please-note"]),(Wn=this.merchantDetail)!=null&&Wn.merchantLogo?t&&t.setAttribute("src",(On=this.merchantDetail)==null?void 0:On.merchantLogo):e&&(t==null||t.remove(),e.innerHTML=`<div class="font-semibold text-tone-100 rounded-2xl w-8 h-8 bg-tone-10 container-center uppercase">${this.merchantDetail.merchantName[0]}</div>`),i&&(i.innerHTML=this.email),s&&(s.innerHTML=this.email),l){if((kn=(je=this.merchantDetail)==null?void 0:je.plan)!=null&&kn.title){const an=((me=(Zn=this.merchantDetail)==null?void 0:Zn.plan)==null?void 0:me.title)||"";l.textContent=ui(an)}(xe=this.metadata)!=null&&xe.productName&&(l.textContent=ui(this.metadata.productName))}if(c){if((ze=(Qe=this.merchantDetail)==null?void 0:Qe.plan)!=null&&ze.title){const an=((hn=(De=this.merchantDetail)==null?void 0:De.plan)==null?void 0:hn.title)||"";c.textContent=ui(an)}(H=this.metadata)!=null&&H.productName&&(c.textContent=ui(this.metadata.productName))}if(m&&(this.currency==="USD"?b&&(b.innerHTML=`1 ${((te=(ye=this.merchantDetail)==null?void 0:ye.rate)==null?void 0:te.to)||"-"} = ${((qe=(Ce=this.merchantDetail)==null?void 0:Ce.rate)==null?void 0:qe.from)||"-"} ${Te(((ne=this.merchantDetail.rate)==null?void 0:ne.rate)||1,2)} `):m.innerHTML=""),g&&(this.currency==="USD"?y&&(y.innerHTML=`1 ${((Bt=(Un=this.merchantDetail)==null?void 0:Un.rate)==null?void 0:Bt.to)||"-"} = ${((mi=(hi=this.merchantDetail)==null?void 0:hi.rate)==null?void 0:mi.from)||"-"} ${Te(((pi=this.merchantDetail.rate)==null?void 0:pi.rate)||1,2)} `):g.innerHTML=""),(Qn=(vi=this.merchantDetail)==null?void 0:vi.plan)!=null&&Qn.title||(bi=this.metadata)!=null&&bi.productName?w&&(((fi=(re=this.merchantDetail)==null?void 0:re.plan)==null?void 0:fi.trial)?(o==null||o.classList.remove("hidden"),w.innerHTML=`${this.currency} ${Te(this.amount,2)}`):(w.innerHTML=`${this.currency} ${Te(this.amount,2)}`,o==null||o.classList.add("hidden"))):(k&&(k.innerHTML=`<span> ${this.currency} ${Te(this.amount,2)} </span>`),l&&c&&(l.remove(),c==null||c.remove()),this.localCurrency?w==null||w.remove():p&&p.remove()),f){const an=(yi=(gi=this.merchantDetail)==null?void 0:gi.plan)==null?void 0:yi.trial,Vn=(Si=(ki=(wi=(Ci=this.merchantDetail)==null?void 0:Ci.plan)==null?void 0:wi.trial)==null?void 0:ki.pricingList[0])==null?void 0:Si.amount;an&&a?(a.textContent=`${this.currency} ${Te(Vn,2)}`,f.innerHTML=`${this.currency} ${Te(this.amount,2)}`):f.innerHTML=`${this.currency} ${Te(this.amount,2)}`}x&&(this.localCurrency&&this.localCurrency!==this.currency?x.children[1].innerHTML=`${this.localCurrency} ${Te(this.amount*(((yt=(gt=this.merchantDetail)==null?void 0:gt.rate)==null?void 0:yt.rate)||1),2)}`:x.remove()),A&&(this.localCurrency&&this.localCurrency!==this.currency?A.children[1].innerHTML=`${this.localCurrency} ${Te(this.amount*(((Ai=(xi=this.merchantDetail)==null?void 0:xi.rate)==null?void 0:Ai.rate)||1),2)}`:A.remove());const Cn=this.localCurrency!==this.currency?this.amount*(((Li=(Mi=this.merchantDetail)==null?void 0:Mi.rate)==null?void 0:Li.rate)||1):this.amount;M&&(Ct=this.merchantDetail)!=null&&Ct.taxQuoteId&&(Je=this.merchantDetail)!=null&&Je.totalAmount&&(M.classList.remove("hidden"),M.children[1].innerHTML=`${this.localCurrency!==this.currency?this.localCurrency:this.currency} ${Te(((Ti=this.merchantDetail)==null?void 0:Ti.totalAmount)-Cn,2)}`),E&&(Sn=this.merchantDetail)!=null&&Sn.taxQuoteId&&(_i=this.merchantDetail)!=null&&_i.totalAmount&&(E.classList.remove("hidden"),E.children[1].innerHTML=`${this.localCurrency!==this.currency?this.localCurrency:this.currency} ${Te(((Rt=this.merchantDetail)==null?void 0:Rt.totalAmount)-Cn,2)}`);const un=Ic[this.localCurrency];D&&this.localCurrency&&(D.innerHTML=un?`${un} (${this.localCurrency})`:this.localCurrency),G&&this.localCurrency&&(G.innerHTML=un?`${un} (${this.localCurrency})`:this.localCurrency),this.renderPaymentOptions(this.container),this.attachListeners()}renderPaymentOptions(e){const t=e.querySelector(".payment-options"),i=Hn(this.currency,this.localCurrency);if(t){const s=this.merchantDetail.plan?[se.
|
|
1994
|
+
</div>`;class Nc{constructor(e){d(this,"container");d(this,"email");d(this,"amount",0);d(this,"metadata");d(this,"currency");d(this,"localCurrency");d(this,"mainLoader");d(this,"trialAmount");d(this,"trial");d(this,"merchantDetail");d(this,"onAction");d(this,"isMobile");d(this,"onClose");d(this,"currentPaymentMethod");d(this,"countryCode");this.container=e.container,this.email=e.email,this.amount=e.amount||0,this.metadata=e.metadata,this.currency=e.currency,this.localCurrency=e.localCurrency,this.merchantDetail=e.merchantDetail,this.onAction=e.onAction,this.isMobile=e.isMobile,this.trial=e.trial,this.onClose=e.onClose,this.trialAmount=e.trialAmount,this.currentPaymentMethod=e.currentPaymentMethod,this.countryCode=this.countryCode=e.currency==="XOF"||e.currency==="XAF"||e.localCurrency==="XOF"||e.localCurrency==="XAF"?e.countryCode:""}attachListeners(){const e=this.container.querySelectorAll(".tab-button");Array.from(e).forEach(o=>{const a=o.dataset.name||"",l=o.querySelector(".tab-button-icon"),c=o.querySelector(".tab-button-label");l&&(l.innerHTML=se[a].icon),c&&(c.textContent=se[a].label),o.addEventListener("click",p=>{p.preventDefault(),this.onAction(a)})});const i=this.container.querySelector("#close-btn");i&&i.addEventListener("click",()=>{this.onClose(!0)});const s=document.getElementById("go-back");s==null||s.addEventListener("click",()=>{this.onAction("")})}renderComponent(){var wn,Wn,On,je,kn,Zn,me,xe,Qe,ze,De,hn,H,ye,te,Ce,qe,ne,Un,Bt,hi,mi,pi,vi,Qn,bi,re,fi,gi,yi,Ci,wi,ki,Si,gt,yt,xi,Ai,Mi,Li,Ct,Je,Ti,Sn,_i,Rt;this.container.innerHTML=this.render(),this.mainLoader=new ke(this.container),this.amount=this.amount;const e=this.container.querySelector("#merchant-logo-container"),t=this.container.querySelector("#merchant-logo"),i=this.container.querySelector("#merchant-email"),s=this.container.querySelector("#merchant-email-mob"),o=this.container.querySelector("#trial-info"),a=this.container.querySelector("#todays-total-amount"),l=this.container.querySelector("#plan-name"),c=this.container.querySelector("#plan-name-mob"),p=this.container.querySelector("#payment-fees"),m=this.container.querySelector("#currency-cursor"),g=this.container.querySelector("#currency-cursor-mob"),b=this.container.querySelector("#payment-rate-display"),y=this.container.querySelector("#payment-rate-display-mob"),w=this.container.querySelector("#designated-rate"),f=this.container.querySelector("#designated-rate-mob"),k=this.container.querySelector("#designated-rate-no-plan"),x=this.container.querySelector("#source-rate"),A=this.container.querySelector("#source-rate-mob"),M=this.container.querySelector("#tax-rate"),E=this.container.querySelector("#tax-rate-mob"),D=this.container.querySelector("#tooltip-localCurrency"),G=this.container.querySelector("#tooltip-localCurrency-mob"),Z=this.container.querySelector("#select-payment-method-text"),K=this.container.querySelector("#amount-text"),Q=this.container.querySelector("#what-is-this"),de=this.container.querySelector("#reflect"),_e=this.container.querySelector("#please-note"),j=this.container.querySelector("#what-is-this-mob"),Oe=this.container.querySelector("#reflect-mob"),ge=this.container.querySelector("#please-note-mob"),Ge=this.container.querySelector("#to-pay-text"),Se=this.container.querySelector("#language-dropdown");if(Se){const an=this.currency==="USD"?this.localCurrency:this.currency,Vn=(wn=Ni(an,this.countryCode))==null?void 0:wn.language,xn=new Set;xn.add("en"),Vn&&Vn!=="en"&&xn.add(Vn),Ae.getTranslationError()||pn&&!xn.has(pn)&&xn.add(pn),xn.size===1?Se.classList.add("hidden"):Se.classList.remove("hidden"),xn.forEach(Ye=>{const mn=new Option(Ye,Ye);mn.value=Ye,mn.text=Dc[Ye]||Ye,Ye===R()&&(mn.selected=!0),Se.appendChild(mn)}),Ae.subscribeToLoading(Ye=>{Se.disabled=Ye}),Se.addEventListener("change",async Ye=>{const Ei=Ye.target.value;it(Ei);try{await Ae.setLanguage(Ei)}catch(Pi){console.error("Failed to change language:",Pi)}finally{}})}if(Z&&(Z.innerHTML=q.select_payment_method_text),K&&(K.innerHTML=`${q.amount}:`),Ge&&(Ge.innerHTML=`${q["to-pay"]}:`),Q&&(Q.innerHTML=P["what-is-this"]),de&&(de.innerHTML=P["rate-reflect-note"]),_e&&(_e.innerHTML=P["rate-please-note"]),j&&(j.innerHTML=P["what-is-this"]),Oe&&(Oe.innerHTML=P["rate-reflect-note"]),ge&&(ge.innerHTML=P["rate-please-note"]),(Wn=this.merchantDetail)!=null&&Wn.merchantLogo?t&&t.setAttribute("src",(On=this.merchantDetail)==null?void 0:On.merchantLogo):e&&(t==null||t.remove(),e.innerHTML=`<div class="font-semibold text-tone-100 rounded-2xl w-8 h-8 bg-tone-10 container-center uppercase">${this.merchantDetail.merchantName[0]}</div>`),i&&(i.innerHTML=this.email),s&&(s.innerHTML=this.email),l){if((kn=(je=this.merchantDetail)==null?void 0:je.plan)!=null&&kn.title){const an=((me=(Zn=this.merchantDetail)==null?void 0:Zn.plan)==null?void 0:me.title)||"";l.textContent=ui(an)}(xe=this.metadata)!=null&&xe.productName&&(l.textContent=ui(this.metadata.productName))}if(c){if((ze=(Qe=this.merchantDetail)==null?void 0:Qe.plan)!=null&&ze.title){const an=((hn=(De=this.merchantDetail)==null?void 0:De.plan)==null?void 0:hn.title)||"";c.textContent=ui(an)}(H=this.metadata)!=null&&H.productName&&(c.textContent=ui(this.metadata.productName))}if(m&&(this.currency==="USD"?b&&(b.innerHTML=`1 ${((te=(ye=this.merchantDetail)==null?void 0:ye.rate)==null?void 0:te.to)||"-"} = ${((qe=(Ce=this.merchantDetail)==null?void 0:Ce.rate)==null?void 0:qe.from)||"-"} ${Te(((ne=this.merchantDetail.rate)==null?void 0:ne.rate)||1,2)} `):m.innerHTML=""),g&&(this.currency==="USD"?y&&(y.innerHTML=`1 ${((Bt=(Un=this.merchantDetail)==null?void 0:Un.rate)==null?void 0:Bt.to)||"-"} = ${((mi=(hi=this.merchantDetail)==null?void 0:hi.rate)==null?void 0:mi.from)||"-"} ${Te(((pi=this.merchantDetail.rate)==null?void 0:pi.rate)||1,2)} `):g.innerHTML=""),(Qn=(vi=this.merchantDetail)==null?void 0:vi.plan)!=null&&Qn.title||(bi=this.metadata)!=null&&bi.productName?w&&(((fi=(re=this.merchantDetail)==null?void 0:re.plan)==null?void 0:fi.trial)?(o==null||o.classList.remove("hidden"),w.innerHTML=`${this.currency} ${Te(this.amount,2)}`):(w.innerHTML=`${this.currency} ${Te(this.amount,2)}`,o==null||o.classList.add("hidden"))):(k&&(k.innerHTML=`<span> ${this.currency} ${Te(this.amount,2)} </span>`),l&&c&&(l.remove(),c==null||c.remove()),this.localCurrency?w==null||w.remove():p&&p.remove()),f){const an=(yi=(gi=this.merchantDetail)==null?void 0:gi.plan)==null?void 0:yi.trial,Vn=(Si=(ki=(wi=(Ci=this.merchantDetail)==null?void 0:Ci.plan)==null?void 0:wi.trial)==null?void 0:ki.pricingList[0])==null?void 0:Si.amount;an&&a?(a.textContent=`${this.currency} ${Te(Vn,2)}`,f.innerHTML=`${this.currency} ${Te(this.amount,2)}`):f.innerHTML=`${this.currency} ${Te(this.amount,2)}`}x&&(this.localCurrency&&this.localCurrency!==this.currency?x.children[1].innerHTML=`${this.localCurrency} ${Te(this.amount*(((yt=(gt=this.merchantDetail)==null?void 0:gt.rate)==null?void 0:yt.rate)||1),2)}`:x.remove()),A&&(this.localCurrency&&this.localCurrency!==this.currency?A.children[1].innerHTML=`${this.localCurrency} ${Te(this.amount*(((Ai=(xi=this.merchantDetail)==null?void 0:xi.rate)==null?void 0:Ai.rate)||1),2)}`:A.remove());const Cn=this.localCurrency!==this.currency?this.amount*(((Li=(Mi=this.merchantDetail)==null?void 0:Mi.rate)==null?void 0:Li.rate)||1):this.amount;M&&(Ct=this.merchantDetail)!=null&&Ct.taxQuoteId&&(Je=this.merchantDetail)!=null&&Je.totalAmount&&(M.classList.remove("hidden"),M.children[1].innerHTML=`${this.localCurrency!==this.currency?this.localCurrency:this.currency} ${Te(((Ti=this.merchantDetail)==null?void 0:Ti.totalAmount)-Cn,2)}`),E&&(Sn=this.merchantDetail)!=null&&Sn.taxQuoteId&&(_i=this.merchantDetail)!=null&&_i.totalAmount&&(E.classList.remove("hidden"),E.children[1].innerHTML=`${this.localCurrency!==this.currency?this.localCurrency:this.currency} ${Te(((Rt=this.merchantDetail)==null?void 0:Rt.totalAmount)-Cn,2)}`);const un=Ic[this.localCurrency];D&&this.localCurrency&&(D.innerHTML=un?`${un} (${this.localCurrency})`:this.localCurrency),G&&this.localCurrency&&(G.innerHTML=un?`${un} (${this.localCurrency})`:this.localCurrency),this.renderPaymentOptions(this.container),this.attachListeners()}renderPaymentOptions(e){const t=e.querySelector(".payment-options"),i=Hn(this.currency,this.localCurrency);if(t){const s=this.merchantDetail.plan?[se.mobile_money]:this.merchantDetail.paymentMethods.filter(o=>o!=="ussd").filter(o=>!(i!=="USD"&&o==="stablecoin")).map(o=>se[o]);if(this.isMobile){let o='<div class="">';s.forEach(a=>{o+=`
|
|
1995
1995
|
<div key=${a.key}>
|
|
1996
1996
|
<button class="tab-button gap-2 mb-4 group" data-name="${a.key}">
|
|
1997
1997
|
<div class="lg:block">${a.icon}</div>
|
|
@@ -2217,7 +2217,7 @@ or you can use record.mirror to access the mirror instance during recording.`;le
|
|
|
2217
2217
|
</div>
|
|
2218
2218
|
</div>
|
|
2219
2219
|
</div>
|
|
2220
|
-
</div>`;class zc{constructor(e){d(this,"container");d(this,"onAction");d(this,"callBackUrl");d(this,"paymentResponse");d(this,"paymentResponseHeaders");d(this,"paymentMethod");this.container=e.container,this.onAction=e.onAction,this.callBackUrl=e.callBackUrl,this.paymentResponse=e.paymentResponse,this.paymentResponseHeaders=e.paymentResponseHeaders,this.paymentMethod=e.paymentMethod}attachListeners(){const e=this.container.querySelector(".details-form-button"),t=this.container.querySelector("#mobile-money-button-text"),i=this.container.querySelector("#long-processing-text"),s=this.container.querySelector("#confirmed-text");i&&(i.innerHTML=P["long-processing"]),s&&(s.innerHTML=P["once-confirmed"]),t&&(t.innerHTML=q["merchant-back"]),e&&e.addEventListener("click",()=>{var o;_.track("redirect_to_merchant",{payment_method:this.paymentMethod,status:(o=this.paymentResponse)==null?void 0:o.status}),Pe(this.paymentResponse,this.paymentResponseHeaders,this.callBackUrl)})}renderComponent(){var e;this.container.innerHTML=this.render(),_.track("payment_timeout",{payment_method:this.paymentMethod,status:(e=this.paymentResponse)==null?void 0:e.status}),this.attachListeners()}render(){return jc}}class qc{constructor({container:e,merchantKey:t,localCurrency:i,metadata:s,callBackUrl:o,rdtCode:a,reference:l,onSuccess:c,url:p,customer:m,amount:g,totalAmount:b,token:y,currency:w,disablePaymentMethods:f,hidePaymentMethods:k,showPaymentMethods:x,onClose:A,restartTransactionProcess:M,retryingPayment:E,countryCode:D}){d(this,"contents");d(this,"mobileMoneyForm");d(this,"mobileMoneyValidationForm");d(this,"onSuccess");d(this,"mobileMoneyConfirmation");d(this,"mobileMoneyConfirmationEnd");d(this,"transactionIssuesScreen");d(this,"container");d(this,"pageLoader");d(this,"mainLoader");d(this,"_currentStep");d(this,"successScreen");d(this,"customer");d(this,"activeRef");d(this,"warningScreen");d(this,"amount");d(this,"totalAmount");d(this,"url");d(this,"reference");d(this,"metadata");d(this,"currency");d(this,"localCurrency");d(this,"token");d(this,"callBackUrl");d(this,"rdtCode");d(this,"merchantDetails");d(this,"onClose");d(this,"hidePaymentMethods");d(this,"showPaymentMethods");d(this,"disablePaymentMethods");d(this,"paymentResponse");d(this,"paymentResponseHeaders");d(this,"restartTransactionProcess");d(this,"retryingPayment");d(this,"isMaxRetriesReached");d(this,"isMobile",!1);d(this,"countryCode");d(this,"errorText");d(this,"otpMessage");this.container=e,this.onSuccess=c||(()=>null),this.token=y,this.currency=w,this.amount=g,this.totalAmount=b,this.contents=this.container.querySelector("#payment-content-view"),this._currentStep=1,this.activeRef="",this.token=t,this.customer=m,this.metadata=s,this.localCurrency=i,this.callBackUrl=o,this.localCurrency=i,this.rdtCode=a,this.url=p,this.reference=l,this.merchantDetails={},this.disablePaymentMethods=f,this.hidePaymentMethods=k,this.showPaymentMethods=x,this.onClose=A,this.paymentResponse={},this.paymentResponseHeaders={},this.restartTransactionProcess=M,this.retryingPayment=E,this.isMaxRetriesReached=!1,this.countryCode=D,this.errorText="",this.otpMessage="",_.track("mobile_money_opens",{payment_method:"Mobile Money"}),this.isMobile=window.matchMedia("(max-width: 767px)").matches}get currentStep(){return this._currentStep}set currentStep(e){this._currentStep=e,this.renderMobileMoneyContent()}attachInputListeners(){}async createMobileMoney(e,t){e.stopPropagation(),e.preventDefault();const i=this.container.querySelector(".spinner"),s=this.container.querySelector("#mobile-money-button-text");i&&s&&(i.classList.remove("hidden"),s.classList.add("hidden"));const o=ft();(()=>{var l,c;if(this.retryingPayment){const p={channel:"mobile_money",reference:this.reference,mobileMoney:{code:t.code,phoneNumber:t.phoneNumber,...t.otp&&{otp:t.otp}}};return et(this.token,p,this.rdtCode,this.url)}else{const p={amount:this.amount,channel:"mobile_money",currency:this.currency,customer:this.customer,reference:this.reference,callBackUrl:this.callBackUrl,metadata:this.metadata,mobileMoney:{code:t.code,phoneNumber:t.phoneNumber,...t.otp&&{otp:t.otp}},...this.localCurrency&&{localCurrency:this.localCurrency},isCheckout:!0,...((l=this.merchantDetails)==null?void 0:l.taxQuoteId)&&{taxQuoteId:(c=this.merchantDetails)==null?void 0:c.taxQuoteId},...this.countryCode&&{countryCode:this.countryCode},deviceInformation:o};return Na(this.token,p,this.rdtCode,this.url)}})().then(async({data:l,headers:c})=>{var p,m;if(this.paymentResponse=l,this.paymentResponseHeaders=c,l.providerMessage){const g=await z(l.providerMessage,R());this.errorText=g}if(l.status==="failed"){if(l.providerMessage){const g=await z(l.providerMessage,R());this.currentStep=5,this.warningScreen.setPaymentError(g),this.warningScreen.hideReportIssue()}else this.currentStep=5,this.warningScreen.setPaymentError(P["payment-failed"]),this.warningScreen.hideReportIssue();_.track("start_payment_failed",{payment_method:"Mobile Money",verification_status:"Failed",payment_error:l.providerMessage||"Payment failed"});return}else if(l.status==="success"||l.status==="successful"){this.currentStep=4,_.track("start_payment_success",{payment_method:"Mobile Money",verification_status:"Success"}),Pe(l,c,l==null?void 0:l.callBackUrl);return}else if(((p=l==null?void 0:l.authorization)==null?void 0:p.mode)==="otp"){this.activeRef=l.reference;const g=await z((m=this.paymentResponse)==null?void 0:m.providerMessage,R());this.otpMessage=g,this.currentStep=6;return}else this.currentStep=3}).catch(async l=>{if(_.track("verify_payment",{payment_method:"Mobile Money",verification_status:"Null"}),l.code==="payment_max_retry_attempts")this.isMaxRetriesReached=!0,this.verifyPaymentProcess(),this.currentStep=5,this.warningScreen.setPaymentError(P["maximum-retries"],P["maximum-retries-desc"],q["merchant-back"]);else{const c=await z(l.message,R());this.errorText=c,l.message?(this.currentStep=5,this.warningScreen.setPaymentError(this.errorText)):(this.currentStep=5,this.warningScreen.setPaymentError(P["payment-failed"]))}this.warningScreen.hideReportIssue()}).finally(()=>{i&&s&&(i.classList.add("hidden"),s.classList.remove("hidden"))})}showLoader(){this.pageLoader=new ke(this.contents),this.pageLoader.mountLoader()}submitOtp(e,t){e.preventDefault();const i=this.container.querySelector(".spinner"),s=this.container.querySelector("#mobile-money-button-text"),o={authorization:{otp:t},reference:this.activeRef};_.track("input_MobileMoneyOTP",{payment_method:"Mobile Money",authentication_type:"0TP"}),i&&s&&(i.classList.remove("hidden"),s.classList.add("hidden")),Ot(this.token,o,this.rdtCode,this.url).then(({data:l})=>{l.status==="failed"?(this.activeRef=l.reference,this.currentStep=3):["success","successful","failed"].includes(l.status)?["success","successful"].includes(l.status)&&(this.activeRef=l.reference,this.currentStep=3):(this.activeRef=l.reference,this.currentStep=3)}).catch(async l=>{_.track("verify_payment",{payment_method:"Mobile Money",verification_status:"Failed",authentication_type:"OTP"});const c=this.container.querySelector("#otp-error");if(l.code==="invalid_otp"){if(c){const p=await z(l.message,R());c.innerHTML=p}_.track("verify_payment",{payment_method:"Mobile Money",verification_status:"Failed",authentication_type:"OTP"})}else this.currentStep=3}).finally(()=>{i&&s&&(i.classList.add("hidden"),s.classList.remove("hidden"))})}async verifyPaymentProcess(){try{const e=await Xe(this.token,this.reference,void 0,this.rdtCode,this.url);this.paymentResponse=e.data,this.paymentResponseHeaders=e.headers}catch{this.currentStep=5}}goBackToMerchant(){Pe(this.paymentResponse,this.paymentResponseHeaders,this.callBackUrl)}renderMobileMoneyContent(e){if(e&&(this.merchantDetails=e),this.currentStep===3&&this.disablePaymentMethods("mobile_money"),this.currentStep!==1){const t=document.getElementById("go-back");t&&(t.classList.remove("flex","items-center","gap-2","mb-2"),t.innerHTML="")}switch(this.currentStep===6?this.hidePaymentMethods():this.showPaymentMethods(),this.isMobile&&this.hidePaymentMethods(),this.currentStep){case 1:this.mobileMoneyForm=new Fc({container:this.contents,merchantKey:this.token,url:this.url,onAction:t=>i=>this.createMobileMoney.bind(this)(t,i),ref:this.activeRef,switchScreen:t=>{this.currentStep=t},rdtCode:this.rdtCode,currency:this.currency,localCurrency:this.localCurrency,amount:this.amount,totalAmount:this.totalAmount,restartTransactionProcess:this.restartTransactionProcess.bind(this),merchantDetails:this.merchantDetails,countryCode:this.countryCode||""}),this.mobileMoneyForm.renderContent();break;case 2:this.mainLoader=new ke(this.contents),this.mainLoader.mountLoader("25dvh"),this.mainLoader.updateMessage(Me["please-wait"]);break;case 3:this.mobileMoneyConfirmation=new Uc({container:this.contents,onAction:t=>{this.currentStep=t},ref:this.reference,onSuccess:this.onSuccess.bind(this),token:this.token,rdtCode:this.rdtCode,url:this.url,callBackUrl:this.callBackUrl,setPaymentResponses:(t,i)=>{this.paymentResponse=t,this.paymentResponseHeaders=i}}),this.mobileMoneyConfirmation.renderComponent();break;case 4:this.successScreen=new Fn({container:this.contents,amount:this.totalAmount,currency:this.currency,localCurrency:this.localCurrency,rate:e==null?void 0:e.rate.rate}),this.successScreen.renderComponent();break;case 5:this.warningScreen=new en({container:this.contents,onReportIssue:()=>this.currentStep=9,onAction:this.isMaxRetriesReached?this.goBackToMerchant.bind(this):this.restartTransactionProcess.bind(this)}),this.contents.innerHTML=this.warningScreen.render(),this.warningScreen.attachListener();break;case 6:this.mobileMoneyValidationForm=new Gc({container:this.contents,onClose:this.onClose,onAction:t=>i=>this.submitOtp.bind(this)(t,i),otpMessage:this.otpMessage||Me["enter-phone-otp"]}),this.mobileMoneyValidationForm.renderComponent();break;case 7:this.pageLoader=new ke(this.contents),this.pageLoader.mountLoader(),this.pageLoader.updateMessage("Verifying Payment");break;case 8:this.mobileMoneyConfirmationEnd=new zc({container:this.contents,onAction:t=>{this.currentStep=t},ref:this.reference,onSuccess:this.onSuccess.bind(this),token:this.token,rdtCode:this.rdtCode,url:this.url,callBackUrl:this.callBackUrl,paymentResponse:this.paymentResponse,paymentResponseHeaders:this.paymentResponseHeaders,paymentMethod:"Mobile Money"}),this.mobileMoneyConfirmationEnd.renderComponent();break;case 9:this.transactionIssuesScreen=new st({container:this.contents,onAction:()=>{var t;this.currentStep=5,this.warningScreen.setPaymentError(((t=this.paymentResponse)==null?void 0:t.providerMessage)||"Payment failed")},url:this.url,rdtCode:this.rdtCode,token:this.token,paymentChannel:"mobile_money",callBackUrl:this.callBackUrl,paymentResponse:this.paymentResponse,paymentResponseHeaders:this.paymentResponseHeaders}),this.transactionIssuesScreen.renderTransactionIssuesComponent();break}this.attachInputListeners()}}const Wc=`<div id="eft-authenticate-container" data-section="eft">
|
|
2220
|
+
</div>`;class zc{constructor(e){d(this,"container");d(this,"onAction");d(this,"callBackUrl");d(this,"paymentResponse");d(this,"paymentResponseHeaders");d(this,"paymentMethod");this.container=e.container,this.onAction=e.onAction,this.callBackUrl=e.callBackUrl,this.paymentResponse=e.paymentResponse,this.paymentResponseHeaders=e.paymentResponseHeaders,this.paymentMethod=e.paymentMethod}attachListeners(){const e=this.container.querySelector(".details-form-button"),t=this.container.querySelector("#mobile-money-button-text"),i=this.container.querySelector("#long-processing-text"),s=this.container.querySelector("#confirmed-text");i&&(i.innerHTML=P["long-processing"]),s&&(s.innerHTML=P["once-confirmed"]),t&&(t.innerHTML=q["merchant-back"]),e&&e.addEventListener("click",()=>{var o;_.track("redirect_to_merchant",{payment_method:this.paymentMethod,status:(o=this.paymentResponse)==null?void 0:o.status}),Pe(this.paymentResponse,this.paymentResponseHeaders,this.callBackUrl)})}renderComponent(){var e;this.container.innerHTML=this.render(),_.track("payment_timeout",{payment_method:this.paymentMethod,status:(e=this.paymentResponse)==null?void 0:e.status}),this.attachListeners()}render(){return jc}}class qc{constructor({container:e,merchantKey:t,localCurrency:i,metadata:s,callBackUrl:o,rdtCode:a,reference:l,onSuccess:c,url:p,customer:m,amount:g,totalAmount:b,token:y,currency:w,disablePaymentMethods:f,hidePaymentMethods:k,showPaymentMethods:x,onClose:A,restartTransactionProcess:M,retryingPayment:E,countryCode:D}){d(this,"contents");d(this,"mobileMoneyForm");d(this,"mobileMoneyValidationForm");d(this,"onSuccess");d(this,"mobileMoneyConfirmation");d(this,"mobileMoneyConfirmationEnd");d(this,"transactionIssuesScreen");d(this,"container");d(this,"pageLoader");d(this,"mainLoader");d(this,"_currentStep");d(this,"successScreen");d(this,"customer");d(this,"activeRef");d(this,"warningScreen");d(this,"amount");d(this,"totalAmount");d(this,"url");d(this,"reference");d(this,"metadata");d(this,"currency");d(this,"localCurrency");d(this,"token");d(this,"callBackUrl");d(this,"rdtCode");d(this,"merchantDetails");d(this,"onClose");d(this,"hidePaymentMethods");d(this,"showPaymentMethods");d(this,"disablePaymentMethods");d(this,"paymentResponse");d(this,"paymentResponseHeaders");d(this,"restartTransactionProcess");d(this,"retryingPayment");d(this,"isMaxRetriesReached");d(this,"isMobile",!1);d(this,"countryCode");d(this,"errorText");d(this,"otpMessage");this.container=e,this.onSuccess=c||(()=>null),this.token=y,this.currency=w,this.amount=g,this.totalAmount=b,this.contents=this.container.querySelector("#payment-content-view"),this._currentStep=1,this.activeRef="",this.token=t,this.customer=m,this.metadata=s,this.localCurrency=i,this.callBackUrl=o,this.localCurrency=i,this.rdtCode=a,this.url=p,this.reference=l,this.merchantDetails={},this.disablePaymentMethods=f,this.hidePaymentMethods=k,this.showPaymentMethods=x,this.onClose=A,this.paymentResponse={},this.paymentResponseHeaders={},this.restartTransactionProcess=M,this.retryingPayment=E,this.isMaxRetriesReached=!1,this.countryCode=D,this.errorText="",this.otpMessage="",_.track("mobile_money_opens",{payment_method:"Mobile Money"}),this.isMobile=window.matchMedia("(max-width: 767px)").matches}get currentStep(){return this._currentStep}set currentStep(e){this._currentStep=e,this.renderMobileMoneyContent()}attachInputListeners(){}async createMobileMoney(e,t){e.stopPropagation(),e.preventDefault();const i=this.container.querySelector(".spinner"),s=this.container.querySelector("#mobile-money-button-text");i&&s&&(i.classList.remove("hidden"),s.classList.add("hidden"));const o=ft();(()=>{var l,c,p,m;if(this.retryingPayment){const g={channel:"mobile_money",reference:this.reference,mobileMoney:{code:t.code,phoneNumber:t.phoneNumber,...t.otp&&{otp:t.otp}}};return et(this.token,g,this.rdtCode,this.url)}else{const g={amount:this.amount,channel:"mobile_money",currency:this.currency,customer:this.customer,reference:this.reference,callBackUrl:this.callBackUrl,metadata:{...this.metadata,...((l=this.merchantDetails)==null?void 0:l.subscription_id)&&{subscription_id:(c=this.merchantDetails)==null?void 0:c.subscription_id}},mobileMoney:{code:t.code,phoneNumber:t.phoneNumber,...t.otp&&{otp:t.otp}},...this.localCurrency&&{localCurrency:this.localCurrency},isCheckout:!0,...((p=this.merchantDetails)==null?void 0:p.taxQuoteId)&&{taxQuoteId:(m=this.merchantDetails)==null?void 0:m.taxQuoteId},...this.countryCode&&{countryCode:this.countryCode},deviceInformation:o};return Na(this.token,g,this.rdtCode,this.url)}})().then(async({data:l,headers:c})=>{var p,m;if(this.paymentResponse=l,this.paymentResponseHeaders=c,l.providerMessage){const g=await z(l.providerMessage,R());this.errorText=g}if(l.status==="failed"){if(l.providerMessage){const g=await z(l.providerMessage,R());this.currentStep=5,this.warningScreen.setPaymentError(g),this.warningScreen.hideReportIssue()}else this.currentStep=5,this.warningScreen.setPaymentError(P["payment-failed"]),this.warningScreen.hideReportIssue();_.track("start_payment_failed",{payment_method:"Mobile Money",verification_status:"Failed",payment_error:l.providerMessage||"Payment failed"});return}else if(l.status==="success"||l.status==="successful"){this.currentStep=4,_.track("start_payment_success",{payment_method:"Mobile Money",verification_status:"Success"}),Pe(l,c,l==null?void 0:l.callBackUrl);return}else if(((p=l==null?void 0:l.authorization)==null?void 0:p.mode)==="otp"){this.activeRef=l.reference;const g=await z((m=this.paymentResponse)==null?void 0:m.providerMessage,R());this.otpMessage=g,this.currentStep=6;return}else this.currentStep=3}).catch(async l=>{if(_.track("verify_payment",{payment_method:"Mobile Money",verification_status:"Null"}),l.code==="payment_max_retry_attempts")this.isMaxRetriesReached=!0,this.verifyPaymentProcess(),this.currentStep=5,this.warningScreen.setPaymentError(P["maximum-retries"],P["maximum-retries-desc"],q["merchant-back"]);else{const c=await z(l.message,R());this.errorText=c,l.message?(this.currentStep=5,this.warningScreen.setPaymentError(this.errorText)):(this.currentStep=5,this.warningScreen.setPaymentError(P["payment-failed"]))}this.warningScreen.hideReportIssue()}).finally(()=>{i&&s&&(i.classList.add("hidden"),s.classList.remove("hidden"))})}showLoader(){this.pageLoader=new ke(this.contents),this.pageLoader.mountLoader()}submitOtp(e,t){e.preventDefault();const i=this.container.querySelector(".spinner"),s=this.container.querySelector("#mobile-money-button-text"),o={authorization:{otp:t},reference:this.activeRef};_.track("input_MobileMoneyOTP",{payment_method:"Mobile Money",authentication_type:"0TP"}),i&&s&&(i.classList.remove("hidden"),s.classList.add("hidden")),Ot(this.token,o,this.rdtCode,this.url).then(({data:l})=>{l.status==="failed"?(this.activeRef=l.reference,this.currentStep=3):["success","successful","failed"].includes(l.status)?["success","successful"].includes(l.status)&&(this.activeRef=l.reference,this.currentStep=3):(this.activeRef=l.reference,this.currentStep=3)}).catch(async l=>{_.track("verify_payment",{payment_method:"Mobile Money",verification_status:"Failed",authentication_type:"OTP"});const c=this.container.querySelector("#otp-error");if(l.code==="invalid_otp"){if(c){const p=await z(l.message,R());c.innerHTML=p}_.track("verify_payment",{payment_method:"Mobile Money",verification_status:"Failed",authentication_type:"OTP"})}else this.currentStep=3}).finally(()=>{i&&s&&(i.classList.add("hidden"),s.classList.remove("hidden"))})}async verifyPaymentProcess(){try{const e=await Xe(this.token,this.reference,void 0,this.rdtCode,this.url);this.paymentResponse=e.data,this.paymentResponseHeaders=e.headers}catch{this.currentStep=5}}goBackToMerchant(){Pe(this.paymentResponse,this.paymentResponseHeaders,this.callBackUrl)}renderMobileMoneyContent(e){if(e&&(this.merchantDetails=e),this.currentStep===3&&this.disablePaymentMethods("mobile_money"),this.currentStep!==1){const t=document.getElementById("go-back");t&&(t.classList.remove("flex","items-center","gap-2","mb-2"),t.innerHTML="")}switch(this.currentStep===6?this.hidePaymentMethods():this.showPaymentMethods(),this.isMobile&&this.hidePaymentMethods(),this.currentStep){case 1:this.mobileMoneyForm=new Fc({container:this.contents,merchantKey:this.token,url:this.url,onAction:t=>i=>this.createMobileMoney.bind(this)(t,i),ref:this.activeRef,switchScreen:t=>{this.currentStep=t},rdtCode:this.rdtCode,currency:this.currency,localCurrency:this.localCurrency,amount:this.amount,totalAmount:this.totalAmount,restartTransactionProcess:this.restartTransactionProcess.bind(this),merchantDetails:this.merchantDetails,countryCode:this.countryCode||""}),this.mobileMoneyForm.renderContent();break;case 2:this.mainLoader=new ke(this.contents),this.mainLoader.mountLoader("25dvh"),this.mainLoader.updateMessage(Me["please-wait"]);break;case 3:this.mobileMoneyConfirmation=new Uc({container:this.contents,onAction:t=>{this.currentStep=t},ref:this.reference,onSuccess:this.onSuccess.bind(this),token:this.token,rdtCode:this.rdtCode,url:this.url,callBackUrl:this.callBackUrl,setPaymentResponses:(t,i)=>{this.paymentResponse=t,this.paymentResponseHeaders=i}}),this.mobileMoneyConfirmation.renderComponent();break;case 4:this.successScreen=new Fn({container:this.contents,amount:this.totalAmount,currency:this.currency,localCurrency:this.localCurrency,rate:e==null?void 0:e.rate.rate}),this.successScreen.renderComponent();break;case 5:this.warningScreen=new en({container:this.contents,onReportIssue:()=>this.currentStep=9,onAction:this.isMaxRetriesReached?this.goBackToMerchant.bind(this):this.restartTransactionProcess.bind(this)}),this.contents.innerHTML=this.warningScreen.render(),this.warningScreen.attachListener();break;case 6:this.mobileMoneyValidationForm=new Gc({container:this.contents,onClose:this.onClose,onAction:t=>i=>this.submitOtp.bind(this)(t,i),otpMessage:this.otpMessage||Me["enter-phone-otp"]}),this.mobileMoneyValidationForm.renderComponent();break;case 7:this.pageLoader=new ke(this.contents),this.pageLoader.mountLoader(),this.pageLoader.updateMessage("Verifying Payment");break;case 8:this.mobileMoneyConfirmationEnd=new zc({container:this.contents,onAction:t=>{this.currentStep=t},ref:this.reference,onSuccess:this.onSuccess.bind(this),token:this.token,rdtCode:this.rdtCode,url:this.url,callBackUrl:this.callBackUrl,paymentResponse:this.paymentResponse,paymentResponseHeaders:this.paymentResponseHeaders,paymentMethod:"Mobile Money"}),this.mobileMoneyConfirmationEnd.renderComponent();break;case 9:this.transactionIssuesScreen=new st({container:this.contents,onAction:()=>{var t;this.currentStep=5,this.warningScreen.setPaymentError(((t=this.paymentResponse)==null?void 0:t.providerMessage)||"Payment failed")},url:this.url,rdtCode:this.rdtCode,token:this.token,paymentChannel:"mobile_money",callBackUrl:this.callBackUrl,paymentResponse:this.paymentResponse,paymentResponseHeaders:this.paymentResponseHeaders}),this.transactionIssuesScreen.renderTransactionIssuesComponent();break}this.attachInputListeners()}}const Wc=`<div id="eft-authenticate-container" data-section="eft">
|
|
2221
2221
|
<div class="pt-3">
|
|
2222
2222
|
<div class="container-center">
|
|
2223
2223
|
<svg width="98" height="32" viewBox="0 0 98 32" fill="none" xmlns="http://www.w3.org/2000/svg"
|
package/dist/types/types.d.ts
CHANGED