1"use strict";(self["webpackChunkalimdaadweb"]=self["webpackChunkalimdaadweb"]||[]).push([[3293],{13293:(t,a,e)=>{e.r(a),e.d(a,{default:()=>k});var n=e(20641),i=e(53751);const o={class:"row"},r={class:"col-12 mb-3"},s={class:"row justify-content-center"},d={class:"col-md-10"};function c(t,a,e,c,u,h){const l=(0,n.g2)("PaymentsZA"),y=(0,n.g2)("CardPlain"),k=(0,n.g2)("SetupRecurringDonations");return(0,n.uX)(),(0,n.CE)("div",o,[(0,n.Lk)("div",r,[(0,n.bF)(y,{disabled:h.isDisabled},{default:(0,n.k6)((()=>[(0,n.Lk)("div",s,[(0,n.Lk)("div",d,[a[5]||(a[5]=(0,n.Lk)("div",{class:"green-text-dark bold text-center font23"}," Donation Checkout ",-1)),(0,n.bF)(l,{onSetupRecurring:a[0]||(a[0]=t=>u.isRecurring=!0),onCheckoutCard:h.checkoutCard,onCheckoutBank:h.checkoutBank,isLoading:u.isLoading,"onUpdate:isLoading":a[1]||(a[1]=t=>u.isLoading=t),cardSponsored:u.cardSponsored,"onUpdate:cardSponsored":a[2]||(a[2]=t=>u.cardSponsored=t),cartUpdated:h.cartUpdatedValue,"onUpdate:cartUpdated":a[3]||(a[3]=t=>h.cartUpdatedValue=t),isDisabled:h.isDisabled,donationTotal:h.donationTotal,paymentType:e.paymentType,donationCurrency:h.donationCurrency,isReadyForPayment:u.isReadyForPayment,isReadyForBankPayment:u.isReadyForBankPayment,bankCheckoutDetails:u.bankCheckoutDetails,cart:e.cart},null,8,["onCheckoutCard","onCheckoutBank","isLoading","cardSponsored","cartUpdated","isDisabled","donationTotal","paymentType","donationCurrency","isReadyForPayment","isReadyForBankPayment","bankCheckoutDetails","cart"])])])])),_:1},8,["disabled"])]),(0,n.bF)(i.eB,{name:"fade"},{default:(0,n.k6)((()=>[u.isRecurring?((0,n.uX)(),(0,n.Wv)(k,{key:0,onClose:a[4]||(a[4]=t=>u.isRecurring=!1)})):(0,n.Q3)("",!0)])),_:1})])}e(18111),e(7588);var u=e(66278);const h={components:{PaymentsZA:(0,n.$V)((()=>e.e(2200).then(e.bind(e,82200)))),CardPlain:(0,n.$V)((()=>e.e(6073).then(e.bind(e,96073)))),SetupRecurringDonations:(0,n.$V)((()=>e.e(3932).then(e.bind(e,13932))))},name:"PaymentZA",props:["paymentType","cart","isEdit","donationIds","cartUpdated"],emits:["update:cartUpdated"],data(){return{defaultCurrency:"£",isLoading:!1,isRecurring:!1,cardSponsored:!0,isReadyForPayment:!1,bankCheckoutDetails:null,isReadyForBankPayment:!1}},computed:{isDisabled(){return(!this.cart||this.cart&&this.cart.length<1||this.isEdit||this.isLoading)&&!this.isReadyForPayment&&!this.isReadyForBankPayment},donationCurrency(){return this.cart&&this.cart.length>0?this.cart[0].currency:this.defaultCurrency},donationTotal(){if(this.cart.length>0){let t=0;return this.cart.forEach((a=>{t+=Number(a.amount)})),Math.round(100*t)/100}return 0},cartUpdatedValue:{get(){return this.cartUpdated},set(t){this.$emit("update:cartUpdated",t)}}},methods:{...(0,u.i0)(["getTransactionReference"]),async checkoutCard(){this.isLoading=!0,await this.getCurrentTransactionReference(1)},async checkoutBank(){this.isLoading=!0,await this.getCurrentTransactionReference(6)},async getCurrentTransactionReference(t){const a=t||1,e={cart:this.cart,userID:this.donationIds.userID,organisationID:this.donationIds.organisationID,groupID:this.donationIds.groupID,madeByFounder:this.donationIds.madeByFounder,paymentOption:a,ownMoney:!0,sponsored:this.cardSponsored};try{if(6!==a){const t=await this.getTransactionReference(e);1===a&&this.trackCheckout(t.data.totalBankChargeAmount),this.isReadyForPayment=!0}else this.bankCheckoutDetails=e,this.isReadyForBankPayment=!0}catch(n){this.isLoading=!1,alert("Something went wrong processing your donation. Please try again.")}},trackCheckout(t){this.$gtm.trackEvent({event:"begin_checkout",category:"ecommerce",action:"click",label:"card",value:t,transaction_id:this.$store.state.donation.lastTransactionRef}),"function"===typeof window.fbq&&window.fbq("track","InitiateCheckout",{value:t,currency:"ZAR"})}}};var l=e(66262);const y=(0,l.A)(h,[["render",c]]),k=y}}]);
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.