1import{J as E,y as c,w as o,eU as w}from"./vendor-Ch-OQvtK.js";import{w as A,i as R,E as S}from"./App-C_b51hZm.js";import{T as u}from"./_checkout-P7Q6PMbN.js";import{g as P,A as T}from"./index-Caw8Brw0.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"v0.1263"};var r=new t.Error().stack;r&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[r]="a1dd8933-dbf5-4988-8089-0c05cf64f44b",t._sentryDebugIdIdentifier="sentry-dbid-a1dd8933-dbf5-4988-8089-0c05cf64f44b")}catch{}})();const I=t=>{const{t:r}=t,e=R.decode(t.hash,"hex"),m=c.useRef(null),[f,s]=c.useState(null),y=crypto.randomUUID(),i={apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:[{type:"CARD",parameters:{allowedAuthMethods:["PAN_ONLY","CRYPTOGRAM_3DS"],allowedCardNetworks:["AMEX","DISCOVER","INTERAC","JCB","MASTERCARD","VISA"],billingAddressRequired:!0,billingAddressParameters:{format:"FULL",phoneNumberRequired:!0},assuranceDetailsRequired:!0},tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:e.gateway,gatewayMerchantId:e.pk}}}],merchantInfo:{merchantId:e.merchantId,merchantName:e.merchantName},transactionInfo:{totalPriceStatus:"FINAL",totalPrice:JSON.stringify(e.mainamount),currencyCode:e.currencyiso3a},shippingAddressRequired:!0,emailRequired:!0,shippingAddressParameters:{phoneNumberRequired:!0},callbackIntents:["PAYMENT_AUTHORIZATION","SHIPPING_ADDRESS"]},h=async n=>{const p=a=>{var d;switch(a.type){case"CHARGE_TOKEN_OK_GOOGLE":if(T({setErrorData:s,condition:a.result.data.paymentStatus==="Error",message:r(`checkout.errorMessage.${a.result.data.message}`),type:"errorCard"}))return;a.result.data.charged===!0?window.top.location.href=e.success_url:a.result.data.paymentStatus==="Pending"?window.location.href=a.result.data.redirectUrl.href:a.result.data.paymentStatus!=="Repeated"&&(window.top.location.href=((d=a.result.data)==null?void 0:d.gotoUrl)||e.failure_url);break;case"CHARGE_TOKEN_KO_GOOGLE":s(a),window.top.location.href=e.failure_url;break}};e.idemPotencyKey=y;const g={paymentData:n,params:e};m.current=u.listen(p),u.ChargeTokenGooglePay(g)};return o.jsxs(o.Fragment,{children:[o.jsx(w,{environment:"TEST",paymentRequest:i,buttonSizeMode:"fill",buttonLocale:P(),buttonType:"pay",className:"w-100",onPaymentAuthorized:n=>(h(n),{transactionState:"SUCCESS"}),onPaymentDataChanged:n=>({newTransactionInfo:{...i.transactionInfo,totalPrice:JSON.stringify(e.mainamount)}}),existingPaymentMethodRequired:!1}),o.jsx(S,{errorData:f,customHeight:"appleErrorCard"})]})},D=E()(A(I));export{D as default}; 2//#
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.