PageSourceSearch

https://hilo.com/cdn/shopifycloud/checkout-web/assets/c1/page-Payment.DdesB0Db.js

js hilo.com collected 2026-09-24 12:26:28 UTC 11,696 bytes, 1 lines download raw bytes

1import{u as e,k as C,f as bt,h as vt,p as Ct,S as f,i as m,T as _t,A as Et,q as Rt}from"./esnext-vendor.D7ldIee_.js";import{u as Ft,T as Mt,S as kt,b as At,G as wt,c as Tt,d as Bt,D as Dt,e as It}from"./useAddressMutationsWithNegotiation.Bu1iJp6d.js";import{L as zt,P as Lt,R as xt,u as Ht,S as Ot}from"./RememberMeSection.BOf68zmB.js";import{D as c,L as Nt,W as d,cO as Ut,N as Wt,cP as Vt,c8 as qt,x as Gt,bU as $t,bT as Yt,cQ as Kt,s as S,a1 as Qt,X as Jt,o as jt,R as Xt,U as l,cR as Zt,$ as M,k as x,n as ea,bI as H,cS as ta,p as aa,j as na,b as ra,P as sa,m as ia,Y as oa,I as la,l as ca,cT as le,H as da,O as ua,Q as ma,cH as pa}from"./hydrate.ByRIsqvd.js";import{u as he,a as ye,V as ha,b as ya,c as Pa,d as ga,e as fa}from"./components-PaymentMethodProgressionHost.BgOpCmhs.js";import{a as Sa,u as ba,b as va}from"./hooks-useGeneralPaymentErrorMessage.CXe06B2R.js";import{u as Ca,S as ce,c as _a}from"./components-RedirectionNotice.module.CqgkZHXB.js";import{B as Ea}from"./BillingAddressSelector.CyVrY0kP.js";import{C as Ra}from"./Captcha.BbYqxwBL.js";import{M as Fa}from"./MarketsProDisclaimer.wV7aMZTc.js";import{u as Ma,P as ka,R as Aa,a as wa,V as Ta,S as Ba}from"./PaymentButtons.ey0T5OXw.js";import{P as de}from"./hooks-useWalletsTimeout.DIL_pXhM.js";import{T as Da}from"./stopwatch.wWgdKLTI.js";import{N,$ as ue,b_ as Ia,an as za,a0 as La,ac as O,d7 as xa,ae as Ha,O as me,d8 as Oa,bX as Na,cp as Ua,ap as Wa,ad as Va,d9 as qa,am as Ga,b2 as pe}from"./addresses-is-address-empty.-MuOhIyI.js";import{i as $a}from"./constants.DowbVE6J.js";import{I as Ya}from"./ImpressionEventCapture.CIEEzh6Z.js";import{K as Ka}from"./KnownBuyerPaymentMethodSelector.pZHguwcE.js";import"./app.A60-IfPs.js";import"./PaymentIcon.Ddd-WnG2.js";import"./PaymentLine.DhO8cHCS.js";import"./hooks-useUnauthenticatedErrorModal.CzvtLqeY.js";import"./localization-index.DBksi22x.js";import"./Theme-ThemeOverride.4AonMthy.js";import"./IncentiveBadge.D66zssvS.js";import"./Choice.Dywz6_Fr.js";import"./Checkbox.Cby2hWUV.js";import"./hooks-useUpdateCheckoutAddress.4zyjtqEx.js";import"./utilities-shopCashMoney.B9eyOzz9.js";import"./payment-usePaymentExemptionReason.Q4GfCwuW.js";import"./shop-pay-ProgressIntercepts.wTCQvlrM.js";import"./shop-pay-normalizeBuyerDetails.BcEhgoK7.js";import"./context-CheckoutSheetProtocolClient.CNLSBD5p.js";import"./hooks-useShopPayProgressIntercepts.CnlV9rdf.js";import"./checkout-updaters-helpers.DKDxNKY0.js";import"./Popover.BNecjV8x.js";import"./hooks-useCanChangeCompanyLocation.Bk004VMP.js";import"./hooks-useReplaceShopPayInHistory.Cz4PqGkk.js";import"./Section.DIJn7eYY.js";import"./ChangeCompanyLocationLink.Ba8IeUdU.js";import"./BillingAddressForm.DHpCPcqC.js";import"./hooks-useSuppressShopPayModalOnLoad.CI5bzdLE.js";import"./PhoneField.BapDvZfY.js";import"./ShopPayCaptcha.DpdjijF2.js";import"./PaymentErrorBanner.BNtKSHks.js";import"./hooks-useHasOrdersFromMultipleShops.PKFq4ktR.js";import"./graphql-PaymentSessionMutation.CK_JkOwG.js";import"./Monorail-monorailMetric-wallets.C3kHkAxp.js";import"./apple-pay-errors.CcNuwNMC.js";import"./hooks-usePaypalRowEffects.DBASzAIo.js";function Qa(){const{i18n:a,shop:{developmentShop:r},url:n}=N();return r?e(d,{errorType:c.PaymentError,tone:"warning",children:a.translate("payment_errors.development_store_with_order_limit",{development_store_order_testing_docs_link:e(Nt,{href:n.developmentStoreOrderTestingDocs(),children:a.translate("payment_errors.development_store_order_testing_docs_link")})})}):null}const y=a=>e(M,{children:a});function Ja({hostedFieldsLoaded:a,children:r}){const{i18n:n,shop:s,source:u,checkout:o,observability:_}=N(),{giftCardsEnabled:k,discountCodesEnabled:p,acceptTipPayments:h}=s,{configuration:b}=o,i=o.latestReceipt.value,Pe=Ut(),ge=p&&Pe.value,{nextPage:P,previousPage:A}=Wt(),[fe,Se]=C(!1),[be,U]=C(!1),[ve,Ce]=C(!1),_e=u.type==="simulated",W=ue().buyerIdentity.value?.purchasingCompany,E=!!W,Ee=u.type==="draftOrder",V=E&&Ee,Re=Ia(),{cartLineChangeLoadingSignal:Fe}=za(),Me=Fe.value,[q,w]=C(!1),[G,ke]=C(),{negotiate:$,progress:Ae,progressing:we}=La(),Y=O().isBlocked.value,Te=xa(),T=Ha(),K=ue(),Q=K.paymentMethods,Be=E&&!o.isShippingRequired.value,De=M
1a(),R=!Te.value||T.value,{billingAddressOption:Ie,directPaymentErrors:ze,generalPaymentError:J,generalPaymentErrorCode:j,paymentLines:{value:v}}=me(),Le=$a({shop:s,checkout:o,paymentMethods:Q?.value}),xe=v.some(t=>t.method.type==="wallet"||t.method.type==="walletsPlatformPaymentMethod"),He=!R&&o.isShippingRequired.value&&!xe&&Ie.value==="shipping"?!1:Oa({lines:v,paymentMethods:Q?.value,purchasingCompany:!!W,isBillingAddressForced:!Le})||!R,X=me().localizationExtensions.value,{value:Oe}=Na(),Ne=Oe.length!==0,Z=R&&Ne||!R,B=v.some(t=>t.method.type==="direct"),{displayedPaymentMethods:Ue}=he({experienceType:"list"}),We=ye(Ue).mode==="knownBuyerShared",Ve=Vt().value,qe=qt(),Ge=Gt({isPayWithPayPalButton:!0}).value.status==="error";Ft();const $e=K.managedByMarketsPro,ee=Y||_e&&P.id!=="review"||qe.value&&Ge||Me,{lastJourneyProgression:Ye}=O(),Ke=async()=>{if(!ee){w(!0);try{await Ae("payment-form-submit",t=>{const F=t.status==="failed",L="receipt"in t&&t.receipt?.status==="failed"&&t.receipt?.failure?.type==="order",St=t.status==="success"&&"receipt"in t&&t.receipt.status==="failed";w(!1),Ce(t.status==="fetch_failed"),U(F||L),Se(St)})}catch(t){t instanceof Error&&ke(t)}finally{w(!1)}}},D=$t(),Qe=bt(()=>Sa(ze)),I=i?.status==="failed",g=I&&i?.failure.type==="payment"?i.failure:void 0,te=g?.code==="AUTHENTICATION_ERROR",Je=I&&i?.failure?.type==="inventory"?i.failure:void 0,je=ve,Xe=!!(be||I&&i?.failure?.type==="order"),Ze=g!=null&&!te,et=Yt(g),tt=J.value&&!Ua(j.value),at=ba(J.value,j.value),nt=n.translate("payment.title"),rt=n.translate("general.pay_now_button_label"),st=o.configuration.layout.isOnePage.value,it=Kt(),ot=i?.status==="failed"&&i.failure.type==="payment"&&i.failure.code==="GENERIC_ERROR"&&v[0]?.method.type==="walletsPlatformPaymentMethod"&&v[0]?.method.name===Wa.AmazonPay;Ca({stage:B&&!a?ce.Usable:ce.Complete,id:"Payment"}),Va("payment");const ae=!!g,ne=i?.id,re=!!(g&&qa.has(g.code));if(vt(()=>{if(!(D||!ae||E)){if(re){_.log("payment_form_skip_negotiate_captcha","[PaymentForm] Skipped negotiate for CAPTCHA_REQUIRED receipt — handled by useHandleReceipt",{receiptId:ne});return}(async()=>await $({silenceViolations:["all"],fieldsToResolve:["paymentLines"]}))()}},[ae,D,E,$,_,re,ne]),G)throw G;const lt=S("Checkout::Dynamic::Render","PAYMENT1"),se=S("Checkout::Dynamic::Render","PAYMENT2"),ie=S("Checkout::Dynamic::Render","PAYMENT3"),oe=S("Checkout::Dynamic::Render","PAYMENT4"),ct=S("purchase.checkout.payment-method-list.render-before"),dt=S("purchase.checkout.payment-method-list.render-after"),ut=b.visibility.showReductions,mt=Ga(),pt=Qt({base:!0,medium:!1}),ht=!mt.value||pt;let z=null;b.visibility.showAside?ht&&(z=e(da,{above:"small",children:e(le,{headerLevel:1,monorailSection:"payment"})})):z=e(le,{headerLevel:1,monorailSection:"payment"});const yt=ut&&!V&&(k||p)?z:null,Pt=V||Re.value?!1:h&&!pe(u),gt=$e.value&&Z&&P.id!=="review",ft=q||we.value;return Ct(()=>{Ye.value.type==="failed"&&U(!0)}),e(f,{children:[e(Da,{children:nt}),e(Jt,{onSubmit:Ke,disabled:q||Y,implicitSubmit:rt,children:e(jt,{children:[e(Xt,{children:[e(l,{customizations:lt,render:y}),e(ja,{genericPaymentError:Ze,shouldSuppressReceiptError:D,inventoryReservationFailure:Je,isAmazonPaymentDeclineScenario:ot,networkFailure:je,orderFailure:Xe,paymentErrorMessage:et,processingFailed:fe}),e(Qa,{}),yt,Pt?e(f,{children:[e(Zt,{sectionId:"tips",children:e(Mt,{renderInSection:!0,headingLevel:1})}),e(l,{customizations:se,render:y})]}):null,X.length>0&&e(f,{children:e(M,{accessibilityLabel:n.translate("localized_fields.additional_information.title"),children:e(x,{gap:"base",children:[e(ea,{id:`${H}-localized-fields`,level:1,children:n.translate("localized_fields.additional_information.title")}),X.map((t,F)=>{const L=`${t.value.key}${F}`;return e(zt,{localizationExtension:t,index:F},L)})]})})}),e(f,{}),e(M,{accessibilityRole:"group",accessibilityLabelledBy:H,children:e(x,{gap:"base",children:[e(Lt,{headingId:H,autoFocus:!st}),e(m,{when:b.visibility.showStoreCreditRedemption,children:e(kt,{})}),tt?e(d,{errorType:c.PaymentError,tone:"critical",children:at}):null,e(m,{when:Qe,children:e(d,{errorType:c.PaymentError,tone:"critical",children:n.translate("payment.generic_incorrect_card_info")})}),te?e(d,{errorType:c.PaymentError,tone:"critical",children:n.translate("payment_errors.three_d_secure_failed")}):null,e(l,{customizations:ct}),e(m,{when:b.visibility.showStoreCreditRedemption,children:e(At,{})}),r,e(l,{customizations:dt}),e(m,{when:De,children:e(Ra,{})})]})}),e(wt,{}),h?e(l,{customizations:ie,render:y}):e(l,{customizations:se,render:y}),He&&(o.isShippingRequired.value||pe(u)||Be)&&!it.value&&!(We&&B)?e(Ea,{}):null,h?e(l,{customizations:oe,render:y}):e(l,{customizations:ie,render:y}),e(xt,{compact:!0}),!h&&e(l,{customizations:oe,render:y}),Ve&&!B?e(M,{children:e(ha,{})}):null,e(m,{when:T,children:e(de,{placement:"default",wrapInSection:!0}
1)}),e(m,{when:b.visibility.showPurchaseOrderNumberField,children:e(ya,{})})]}),gt&&e(Fa,{}),e(ka,{}),ge&&e(ta,{targetSelector:'input[name="reductions"]',icon:"discount",label:n.translate("order_summary.discount_discovery.add_code")}),e(m,{when:T,children:e(de,{placement:"above-pay-button"})}),e(aa,{children:[e(na,{children:[e(Aa,{children:e(wa,{disabled:!Z||ee,loading:ft,defaultLabel:P.label,pixelId:"go_to_next_step"})}),P.notice?e(f,{children:[e(ra,{blockSize:"small-200"}),e(sa,{textAlign:"center",color:"subdued",type:"small",children:P.notice})]}):null]}),A.route?e(ia,{children:e(oa,{href:A.route,variant:"plain",inlineSize:"fill",textDecoration:"none",pixelId:"go_to_previous_step",children:e(x,{direction:"inline",gap:"small-200",alignItems:"center",children:[e(la,{type:"chevron-left",size:"small"}),e(ca,{children:A.label})]})})}):null]}),P.id==="review"?null:e(f,{children:[e(Ta,{}),e(Ba,{})]})]})})]})}const ja=({orderFailure:a,inventoryReservationFailure:r,isAmazonPaymentDeclineScenario:n,genericPaymentError:s,processingFailed:u,shouldSuppressReceiptError:o,paymentErrorMessage:_,networkFailure:k})=>{const{i18n:p}=N(),{lastJourneyProgression:h}=O();return n?null:(s||u)&&!o?e(d,{errorType:c.PaymentError,tone:"critical",children:_}):k?e(d,{errorType:c.PaymentError,tone:"critical",children:p.translate("order_errors.network_failure")}):r?e(d,{errorType:c.PaymentError,tone:"critical",children:p.translate("order_errors.inventory_reservation_failure")}):a?h.value.type==="failed"&&h.value.reason==="decision_rule_block"?e(d,{errorType:c.PaymentError,tone:"critical",children:p.translate("payment_errors.generic_error")}):e(d,{errorType:c.PaymentError,tone:"critical",children:p.translate("order_errors.creation_failure")}):null};function Xa(){const a=Tt({enableAutoSelect:!1}),{expandedSlot:r}=Bt(a);return e(Ka,{msiSlot:r,hideChoiceListChrome:!1,detailsPresentation:"boxed"})}function Za(){const{displayedPaymentMethods:a}=he({experienceType:"list"}),r=ye(a),n=_t(()=>a.map(s=>"name"in s?s.name:s.type),[a]);return r.mode==="knownBuyerShared"?e(Ya,{impressionType:"payment",impressionFeatures:Pa(n,r),children:e(Xa,{})}):e(ga,{})}function Zn(){const a=Et(!1),r=Ht(),n=va(),{postPurchaseEnabled:s}=_a(),u=Rt(()=>{a.current=!0},[]);return e(pa,{target:"cart.paymentLines[0]",children:[e(ua,{section:"payment",children:e(ma,{section:"payment",children:e(Ja,{hostedFieldsLoaded:a.current,children:e(Dt,{blurValidationEnabled:!0,onSetFieldErrors:n,onLoadSuccess:u,children:[e(en,{}),e(Za,{}),e(m,{when:r,children:e(Ot,{})})]})})})}),s&&e(It,{})]})}function en(){return fa(),null}export{en as PaymentMethodCustomizations,Zn as default};

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.