1"use strict";(self["webpackChunkcatering_order_web"]=self["webpackChunkcatering_order_web"]||[]).push([[519],{6603:function(e,t,r){r.r(t),r.d(t,{default:function(){return f}});var a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"payment-methods"},[t("div",{staticClass:"text-center"},[t("h2",[e._v("PAYMENT METHODS")]),t("p",[e._v("You can have up to 2 credit or debit cards in your account.")]),t("section-info",{attrs:{id:"payment",hideFooter:!0}},[t("template",{slot:"header"},[e._v("CREDIT & DEBIT CARDS")]),t("template",{slot:"main"},[t("payment-card-list",{attrs:{paymentCards:e.paymentCards},on:{removeCard:e.removeCard}}),e.paymentCards.length<2?t("div",{staticClass:"gold-link pt-4",attrs:{tabindex:"0"},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.addPaymentInfo.apply(null,arguments)},click:e.addPaymentInfo}},[e._v(" ADD PAYMENT METHOD ")]):e._e()],1)],2)],1),t("custom-modal",{staticClass:"add-card-modal",attrs:{title:"ADD PAYMENT METHOD","mobile-full-screen":!1,centered:"","hide-footer":"","no-close-on-backdrop":""},on:{hide:e.hideModal},model:{value:e.showCardInfo,callback:function(t){e.showCardInfo=t},expression:"showCardInfo"}},[t("payment-provider",{attrs:{"init-request-func":e.initProviderRequest,"complete-request-func":e.completeProviderRequest,"payment-provider-id":e.paymentProviderId,"error-message":e.modalErrorMessage}})],1)],1)},o=[],n=r(7800),d=r(7099),s=r(9499),i=r(4165),c=r(1329),h=r(3933),l=r(563),p=r(7566),m={components:{PaymentCardList:d.A,PaymentProvider:n.A,SectionInfo:s.A,CustomModal:i.A},computed:{paymentCards(){return this.$store.getters.wallet}},data(){return{showCardInfo:!1,modalErrorMessage:"",paymentProviderId:void 0}},methods:{addPaymentInfo(){this.$store.dispatch(c.yH).then((e=>{this.paymentProviderId=e.data&&e.data.length?e.data[0].paymentProviderId:null,this.showCardInfo=!0})).catch((()=>{this.$store.dispatch(h.wn,{headerText:"Payment Provider",text:"Something unexpected happened.",subText:"Please try again or contact customer support.",hideCancel:!0})}
1))},hideModal(){this.showCardInfo=!1,this.modalErrorMessage=""},initProviderRequest(){return this.$store.dispatch(c.WK,this.paymentProviderId).then((e=>e.data)).catch((e=>{throw new Error(this.parseError(e))}))},completeProviderRequest(e,t){const r={clientToken:e,paymentProviderId:this.paymentProviderId};return this.paymentProviderId===p.f&&(r.accessToken=t),this.$store.dispatch(c.$6,r).then((e=>this.$store.dispatch(c.Xy,e))).then((()=>{this.showCardInfo=!1})).catch((e=>{throw new Error(this.parseError(e))}))},parseError(e){return(0,l.j)(e,"<br/>")||"We encountered an error saving your card.<br/>Please check your card info and try again."},removeCard(e){e&&e.tokenId&&this.$store.dispatch(c.S1,e.tokenId)}}},u=m,y=r(1656),v=(0,y.A)(u,a,o,!1,null,"a4f4f542",null),f=v.exports}}]); 2//# sourceMappingURL=PaymentMethods.c51043d4.js.map
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.