{"version":3,"sources":["./src/app/formioembed/formbuilder-embed/formbuilder-embed.component.ts","./src/app/formioembed/formbuilder-embed/formbuilder-embed.component.html","./src/app/formioembed/formioembed-routing.module.ts","./src/app/formioembed/formioembed.module.ts","./src/app/shared/models/settings/tax.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOmD;AAK2B;AACR;AACrB;AAWiB;AACyC;;;;;;;;;;;;;;;;;;;;;;;;;;;QCzBzG,0EAAuE;QACrE,yEAAsB;QACpB,wDAA4B;QAAA,mEAEvB;QACP,6DAAK;QACP,6DAAM;;;;QAJF,2DAA4B;QAA5B,yGAA4B;;;;;QAMhC,0EAAwD;QACtD,0EAAuC;QACrC,sEAAI;QAAA,sEAAU;QAAA,6DAAK;QACnB,qEAAG;QACD,+KAEF;QAAA,6DAAI;QACN,6DAAM;QACR,6DAAM;;;;;;QAQM,8EASC;QANC,kVAAuB;QAMxB,6DAAS;;;;QALR,2FAA0B;;;;;QAQ1B,8EAKC;QACC,oEACF;QAAA,6DAAS;;;;;QAxBrB,0EAAkD;QAChD,2EAAuB;QACrB,2EAAuE;QACrE,2EAAuC;QACrC,4EAAsD;QACpD,mIASU;QAEV,2EAAyC;QACvC,mIAOS;QACT,sEAAmC;QACrC,6DAAM;QACR,6DAAO;QACT,6DAAM;QACR,6DAAM;QACR,6DAAM;QACR,6DAAM;;;;QA7Be,2DAAqD;QAArD,iHAAqD;QAI7D,2DAAc;QAAd,kFAAc;QAYZ,2DAAsB;QAAtB,0FAAsB;;;ADDlC;UAAM,yBACX,SAAQ,mHAA6B;QAKrC,YACS,MAAc,EACd,cAA8B,EAC9B,oBAA0C,EAC1C,cAA8B,EAC9B,eAAgC,EAChC,aAA2B,EAC3B,aAAmC,EACnC,wBAAkD,EAClD,mBAAwC,EACxC,mBAAwC,EACxC,YAA0B,EAC1B,kBAA6C,EAC7C,qBAAuC,EACvC,YAA0B,EAC1B,qBAA4C,EAC5C,iBAAo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AEX,wBAAwB,oFAFzB,yDAAY,CAAC,EAAD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACX+C;AACzB;AACgE;AACc;AAClC;AACsB;AACnE;AACc;AACiE;AACT;AAG1F;;AAmBlB;UAAM,iBAAiB;QAC5B,YAAY,QAAkB;YAC5B,4HAAmB,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC;;sFAHU,iBAAiB;kHAAjB,iBAAiB;uHAXjB,CAAC,qDAAQ,EAAE,yDAAY,CAAC,YAC1B;gBACP,yDAAY;gBACZ,oGAAwB;gBACxB,wDAAY;gBACZ,uDAAW;gBACX,sEAAkB;gBAClB,6HAAiB;gBACjB,4DAAc;aACf;;;;wHAEU,iBAAiB,mBAf1B,wHAAyB;YACzB,sIAA6B;YAC7B,sIAA6B,aAI7B,yDAAY;YACZ,oGAAwB;YACxB,wDAAY;YACZ,uDAAW;YACX,sEAAkB;YAClB,6HAAiB;YACjB,4DAAc;AAAA;;;;;;;;;;;;;;;;;;;;;;;AC7BX,MAAM,MAAM;CAIlB;AAEM,MAAM,SAAS;CAcrB;AAEM,MAAM,kBAAkB;CAI9B;AAEM,MAAM,cAAc;CAe1B;AAEM,MAAM,QAAQ;CAkBpB;AAEM,MAAM,YAAY;CAOxB;AAEM,MAAM,QAAQ;CAMpB","file":"src_app_formioembed_formioembed_module_ts.446b6e59bc469a69c42d.js","sourcesContent":["import { Component, OnInit, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\nimport { FormIoBuilderService } from 'src/app/formiobuilder/services/formiobuilder.service';\r\nimport {\r\n CreditPayment,\r\n SettingsInvoice,\r\n} from '../../shared/models/invoice/invoice.model';\r\nimport { HeartlandObserverService } from '../../formiobuilder/services/heartland-observer.service';\r\nimport { FormObserverService } from '../../formiobuilder/services/form-observer.service';\r\nimport { CartsOrdersCalculator } from '../../shared/libraries/carts-orders-calculator';\r\nimport { ConfirmationService } from '../../formiobuilder/services/confirmations.service';\r\nimport { RecurringPayment } from '../../formiobuilder/models/recurring.model';\r\nimport { getAllComponents } from '../../formiobuilder/utilities/form';\r\nimport { formatCurrency } from '@angular/common';\r\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\r\nimport { InvoiceService } from '../../shared/services/invoice.service';\r\nimport { CreditPaymentService } from '../../shared/services/creditpayment.service';\r\nimport { AlertService } from '../../core/alert.service';\r\nimport { CustomerManagementService } from '../../shared/services/customer.service';\r\nimport { OrderService } from '../../formiobuilder/services/order.service';\r\nimport { ACHPaymentService } from '../../shared/services/achpayment.service';\r\nimport { TaxService } from '../../shared/services/tax.service';\r\nimport { MerchantService } from '../../shared/services/merchant.service';\r\nimport { SubscriptionService } from '../../shared/services/subscription-service.service';\r\nimport { TaxOrder } from '../../shared/models/settings/tax.model';\r\nimport { FormbuilderEmbedBaseComponent } from '../formbuilder-embed-base/formbuilder-embed-base.component';\r\nimport { CountriesService } from '../../shared/services/countries.service';\r\nimport { GooglePaymentService } from 'src/app/shared/services/googlepayment.service';\r\nimport { _ } from 'ag-grid-community';\r\nimport { PaymentService } from 'src/app/shared/services/payments.service';\r\n\r\n@Component({\r\n selector: 'app-formbuilder-embed',\r\n templateUrl: './formbuilder-embed.component.html',\r\n styleUrls: ['./formbuilder-embed.component.scss'],\r\n})\r\nexport class FormbuilderEmbedComponent\r\n extends FormbuilderEmbedBaseComponent\r\n implements OnInit, OnChanges\r\n{\r\n recurringPaymentComponentKey: string;\r\n\r\n constructor(\r\n public router: Router,\r\n public activatedRoute: ActivatedRoute,\r\n public formioBuilderService: FormIoBuilderService,\r\n public invoiceService: InvoiceService,\r\n public merchantService: MerchantService,\r\n public dataSanitizer: DomSanitizer,\r\n public creditService: CreditPaymentService,\r\n public heartlandObserverService: HeartlandObserverService,\r\n public formObserverService: FormObserverService,\r\n public subscriptionService: SubscriptionService,\r\n public alertService: AlertService,\r\n public customerApiService: CustomerManagementService,\r\n public loadCountriesServices: CountriesService,\r\n public orderService: OrderService,\r\n public cartsOrdersCalculator: CartsOrdersCalculator,\r\n public achPaymentService: ACHPaymentService,\r\n public confirmationsService: ConfirmationService,\r\n public taxService: TaxService,\r\n public modalService: NgbModal,\r\n public googlePayService: GooglePaymentService,\r\n public paymentService: PaymentService\r\n ) {\r\n super(\r\n router,\r\n activatedRoute,\r\n formioBuilderService,\r\n invoiceService,\r\n merchantService,\r\n dataSanitizer,\r\n creditService,\r\n heartlandObserverService,\r\n formObserverService,\r\n alertService,\r\n customerApiService,\r\n loadCountriesServices,\r\n orderService,\r\n cartsOrdersCalculator,\r\n achPaymentService,\r\n confirmationsService,\r\n taxService,\r\n modalService,\r\n googlePayService,\r\n paymentService\r\n );\r\n\r\n this.invoiceSettingModel = new SettingsInvoice();\r\n }\r\n ngOnChanges(changes: SimpleChanges): void {\r\n // throw new Error('Method not implemented.');\r\n }\r\n\r\n ngOnInit() {\r\n this.formObserverService.castRecaptchaResponse.subscribe((response) => {\r\n this.recaptchaResponse = response;\r\n });\r\n\r\n /** for Product field dropdown */\r\n\r\n this.formObserverService.castselectedproductlists.subscribe(\r\n (selectedproductlist) => {\r\n this.selectedproductlist = selectedproductlist;\r\n }\r\n );\r\n\r\n this.formObserverService.casttotalselectedproduct.subscribe(\r\n (totalselectedproduct) => {\r\n this.totalselectedproduct = totalselectedproduct;\r\n }\r\n );\r\n\r\n this.formObserverService.castproductFieldLabel.subscribe(\r\n (productFieldlabel) => {\r\n this.productFieldlabel = productFieldlabel;\r\n }\r\n );\r\n\r\n /** for Terms and Condition field */\r\n this.formObserverService.cast_termsconditioncontent.subscribe(\r\n (tc_content) => {\r\n this.tc_content = tc_content;\r\n }\r\n );\r\n }\r\n\r\n detectLocationComponent() {\r\n const locationComponent = this.allComponents.find((component) => {\r\n return component.componentType === 'location';\r\n });\r\n\r\n this.locationComponentKey = locationComponent?.key;\r\n }\r\n\r\n mapComputableComponents() {\r\n let price: any = [];\r\n let productField: any = [];\r\n let singleProductField: any = [];\r\n let shipping: any = [];\r\n let quantity: any = [];\r\n let discountAmount: any = [];\r\n let discountPercent: any = [];\r\n let taxAmount: string = '';\r\n let taxPercent: string = '';\r\n let subTotal: any = [];\r\n let total: any = [];\r\n let taxAmountDefaultValue: number = 0;\r\n let taxPercentDefaultValue: number = 0;\r\n let taxjarPercentDefaultValue: number = 0;\r\n let taxjarPercent: string = '';\r\n let commercialLineItems: any = [];\r\n\r\n this.allComponents.map((component) => {\r\n if (\r\n component.componentType === 'price' ||\r\n component.key.indexOf('price') !== -1\r\n ) {\r\n price.push(component.key);\r\n }\r\n if (\r\n component.type === 'productfield' ||\r\n component.key.indexOf('productfield') !== -1\r\n ) {\r\n productField.push(component.key);\r\n }\r\n if (\r\n component.type === 'singleproduct' ||\r\n component.key.indexOf('singleproduct') !== -1\r\n ) {\r\n singleProductField.push(component.key);\r\n }\r\n if (\r\n component.componentType === 'shipping' ||\r\n component.key.indexOf('shipping') !== -1\r\n ) {\r\n shipping.push(component.key);\r\n }\r\n if (\r\n component.componentType === 'quantity' ||\r\n component.key.indexOf('quantity') !== -1\r\n ) {\r\n quantity.push(component.key);\r\n }\r\n if (\r\n component.componentType === 'discountamount' ||\r\n component.key.indexOf('discountamount') !== -1\r\n ) {\r\n discountAmount.push(component.key);\r\n }\r\n if (\r\n component.componentType === 'discountpercent' ||\r\n component.key.indexOf('discountpercent') !== -1\r\n ) {\r\n discountPercent.push(component.key);\r\n }\r\n if (\r\n component.componentType === 'taxamount' ||\r\n component.key.indexOf('taxamount') !== -1\r\n ) {\r\n taxAmountDefaultValue = component.defaultValue;\r\n taxAmount = component.key;\r\n }\r\n if (\r\n component.componentType === 'taxpercent' ||\r\n component.key.indexOf('taxpercent') !== -1\r\n ) {\r\n taxPercentDefaultValue = component.defaultValue;\r\n taxPercent = component.key;\r\n }\r\n if (\r\n component.componentType === 'subtotal' ||\r\n component.key.indexOf('subtotal') !== -1\r\n ) {\r\n subTotal.push(component.key);\r\n }\r\n if (component.componentType === 'total' || component.key === 'total') {\r\n total.push(component.key);\r\n }\r\n if (component.type === 'commercialLineItem') {\r\n commercialLineItems.push(component.key);\r\n }\r\n if (\r\n component.componentType === 'taxjarfield' ||\r\n component.key.indexOf('taxjarfield') !== -1\r\n ) {\r\n taxjarPercentDefaultValue = component.defaultValue;\r\n taxjarPercent = component.key;\r\n }\r\n });\r\n\r\n this.computingComponents = {\r\n price: price,\r\n productField: productField,\r\n singleProductField: singleProductField,\r\n shipping: shipping,\r\n quantity: quantity,\r\n discountAmount: discountAmount,\r\n discountPercent: discountPercent,\r\n taxAmount: taxAmount,\r\n taxPercent: taxPercent,\r\n taxAmountDefaultValue: taxAmountDefaultValue,\r\n taxPercentDefaultValue: taxPercentDefaultValue,\r\n taxjarPercentDefaultValue: taxjarPercentDefaultValue,\r\n taxjarPercent: taxjarPercent,\r\n subTotal: subTotal,\r\n total: total,\r\n commercialLineItems: commercialLineItems,\r\n };\r\n }\r\n\r\n loadData(FormId: string) {\r\n // this.busy = true;\r\n this.formioBuilderService.getForm(FormId).subscribe(\r\n (res: any) => {\r\n if (res) {\r\n this.formIOModel = res;\r\n\r\n // validate if the one accessing here is a Subscription form\r\n if (this.formIOModel.Module === 'subscription') {\r\n this.router.navigateByUrl(\r\n `subscription/form/${this.formIOModel.id}/embed`\r\n );\r\n }\r\n\r\n this.formData = this.formIOModel.FormConfig;\r\n this.isValid = this.formIOModel.IsLive;\r\n this.allComponents = getAllComponents(this.formData.components);\r\n this.formObserverService.setFormData(this.formData.components);\r\n this.setFieldLabels();\r\n this.mapComputableComponents();\r\n this.detectLocationComponent();\r\n\r\n // Check if Heartland Payment is Active in the Form\r\n const heartlandComponent = this.allComponents.filter((component) => {\r\n return component.type === 'heartlandpayment';\r\n });\r\n\r\n // Tokenizer only\r\n const heartlandPaymentTokenizer = this.allComponents.filter(\r\n (component) => {\r\n return component.type === 'heartlandpaymenttokenizer';\r\n }\r\n );\r\n // Check if Card Form is available / activated\r\n this.isPaymentSystemComponentActive = heartlandComponent.length > 0;\r\n this.isCardFormActive =\r\n (this.isPaymentSystemComponentActive &&\r\n heartlandComponent[0]?.customOptions.paymentTypes.credit_card) ||\r\n heartlandPaymentTokenizer.length > 0;\r\n\r\n this.isRegisterCardComponentActive =\r\n heartlandPaymentTokenizer.length > 0;\r\n\r\n const recaptchaComponent = this.allComponents.filter((component) => {\r\n return component.type === 'recaptcha-v3';\r\n });\r\n\r\n this.isRecaptchaActive = recaptchaComponent.length > 0;\r\n\r\n // TaxJar Validation\r\n const taxJarComponent = this.allComponents.filter((component) => {\r\n return component.key === 'taxjarfield';\r\n });\r\n\r\n this.isTaxJarComponentActive = taxJarComponent.length > 0;\r\n\r\n if (this.isTaxJarComponentActive) {\r\n this.taxExemptionType =\r\n taxJarComponent[0].customOptions.taxjar_exemptiontype;\r\n\r\n this.taxService.getTaxSettings().subscribe((response: any) => {\r\n if (response) {\r\n this.isManualTaxjar = response.ManualTaxSetting;\r\n\r\n if (this.isManualTaxjar) {\r\n this.taxService\r\n .getAllManualTax()\r\n .subscribe((taxes: any[]) => {\r\n const selectedTaxes = taxes.filter((item) => {\r\n return (\r\n taxJarComponent[0].customOptions.manual_tax.indexOf(\r\n item.Id\r\n ) > -1\r\n );\r\n });\r\n const totalTax = selectedTaxes.reduce(\r\n (a: any, b: any) => ({\r\n Percentage: a.Percentage + b.Percentage,\r\n })\r\n );\r\n this.totalManualTax = totalTax.Percentage.toFixed(2);\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n /** Check if Product Field is Active in the Form */\r\n const productComponent = this.allComponents.filter((component) => {\r\n return component.key === 'productfield';\r\n });\r\n\r\n this.isProductfieldActive = productComponent.length > 0;\r\n\r\n if (this.isProductfieldActive == true) {\r\n this.productlist = productComponent[0].data.values;\r\n this.productFieldlabel = productComponent[0].data.label;\r\n this.formObserverService.updateProductLists(this.productlist);\r\n this.formObserverService.updateProductFieldLabel(\r\n this.productFieldlabel\r\n );\r\n }\r\n // End product field dropdown */\r\n\r\n /** Check if Terms & Condition Field is Active in the Form */\r\n const TC_Component = this.allComponents.filter((component) => {\r\n return component.key === 'termscondition';\r\n });\r\n\r\n this.isTermsConditionfieldActive = TC_Component.length > 0;\r\n\r\n /** Check if Recurring Payment Component is Active in the Form */\r\n const recurringPaymentComponent = this.allComponents.find(\r\n (component) => {\r\n return component.componentType === 'recurringPayment';\r\n }\r\n );\r\n\r\n this.isRecurringForm = recurringPaymentComponent !== undefined;\r\n this.recurringPaymentComponentKey = recurringPaymentComponent?.key;\r\n this.formObserverService.setIsRecurringForm(this.isRecurringForm);\r\n\r\n /** Check if L2/L3 Component is Active in the Form */\r\n const commercialLineItemComponent = this.allComponents.find(\r\n (component) => {\r\n return component.type === 'commercialLineItem';\r\n }\r\n );\r\n\r\n this.formObserverService.setHasCommercialItem(\r\n commercialLineItemComponent !== undefined\r\n );\r\n\r\n this.confirmationsService\r\n .getConfirmationsByFormId(FormId)\r\n .subscribe((res2: any) => {\r\n this.confirmations = res2;\r\n });\r\n }\r\n },\r\n (error: any) => {\r\n this.busy = false;\r\n this.isValid = false;\r\n console.error('Invalid URL or form does not exist.');\r\n }\r\n );\r\n }\r\n\r\n onSubmit(submission: any) {\r\n this.busy = true;\r\n this.busy_message = 'Saving';\r\n\r\n this.submissionData = submission.data;\r\n this.submissionData.heartlandpayment = this.paymentFormInfo;\r\n\r\n // Check if recaptcha was validated\r\n if (this.isRecaptchaActive) {\r\n this.observeRecaptchaValidation();\r\n return;\r\n }\r\n\r\n this.preprocessSubmission();\r\n }\r\n\r\n saveCustomerCard() {\r\n this.cardModel.CardLast4Digits = this.cardToken.lastFour;\r\n this.cardModel.CardBrand = this.cardToken.cardType;\r\n this.cardModel.IsDeleted = false;\r\n this.cardModel.CreatedBy = this.userId;\r\n this.cardModel.CreatedDate = new Date();\r\n this.cardModel.UpdatedBy = null;\r\n this.cardModel.UpdatedDate = null;\r\n this.cardModel.ExpMonth = this.cardInfo.expMonth;\r\n this.cardModel.ExpYear = this.cardInfo.expYear;\r\n this.cardModel.Id = 0;\r\n this.cardModel.CustomerId = this.customerId;\r\n this.customerApiService.addCustomerCardNumber(this.cardModel).subscribe(\r\n (res) => {\r\n this.customerCardId = res;\r\n if (this.isRecurringForm) {\r\n this.saveRecurringPayment();\r\n } else if (this.isRegisterCardComponentActive) {\r\n this.alertSuccess({\r\n title: 'Success!',\r\n text: 'Card verified and saved!',\r\n });\r\n } else {\r\n this.sendReceipt().then(\r\n () => {\r\n this.alertSuccess({\r\n title: 'Success!',\r\n text: 'Form and Payment has been successfully submitted!',\r\n });\r\n },\r\n (err) =>\r\n this.alertService\r\n .alertWarning({\r\n title: `Payment Successful
Sending Receipt Failed`,\r\n text: `The payment was done successfully.
Unfortunately, there was an error encountered\r\n while sending the receipt.\r\n

Please contact ${this.businessInfo.BusinessName} and request for the receipt to be sent to your email.`,\r\n })\r\n .then(() => {\r\n this.scrollToTop();\r\n (window as any).location.reload();\r\n })\r\n );\r\n }\r\n },\r\n (err) => {\r\n this.alertService\r\n .alertWarning({\r\n title: 'Payment Successful
Saving Card failed',\r\n text: `Your payment was successfully processed
\r\n However, we have encountered problem while saving your card into your account.
\r\n Please contact ${this.businessInfo.BusinessName} for more information`,\r\n })\r\n .then(() => {\r\n this.scrollToTop();\r\n (window as any).location.reload();\r\n });\r\n }\r\n );\r\n }\r\n\r\n processCardPayment() {\r\n this.cardInfo.token = this.cardToken.token;\r\n this.cardInfo.number = this.cardToken.lastFour;\r\n this.cardInfo.cardBIN = this.cardToken.cardBIN;\r\n this.cardInfo.expMonth = this.cardToken.expMonth;\r\n this.cardInfo.expYear = this.cardToken.expYear;\r\n\r\n const creditData = new CreditPayment();\r\n const saveCard: boolean = this.paymentFormData?.customerData.saveCard;\r\n creditData.currency = 'USD';\r\n creditData.cardInfo = this.cardInfo;\r\n creditData.amount = this.cardToken.amount;\r\n creditData.invoiceNumber = this.invoiceNumber;\r\n creditData.terminalId = 'MAIN';\r\n creditData.customerId = this.customerId;\r\n creditData.orderId = this.orderId;\r\n creditData.billingAddress = this.customerAddress;\r\n creditData.requestMultiUseToken = saveCard;\r\n creditData.htoken = this.captchaToken;\r\n creditData.hApiKeyId = this.captchaApiKeyId;\r\n\r\n this.creditService\r\n .creditChargeForm(\r\n creditData,\r\n this.userId.toString(),\r\n this.locationComponentSelectedData.Id || this.cardToken.locationData.Id,\r\n 'Main'\r\n )\r\n .subscribe(\r\n (chargeRes: any) => {\r\n this.transactionId = chargeRes.transactionId;\r\n if (chargeRes) {\r\n if (this.customerSignature) {\r\n //save customer signature.\r\n this.invoiceService\r\n .uploadCustomersig({\r\n invoiceNumber: this.invoiceNumber,\r\n signatureUrl: this.customerSignature,\r\n createdBy: 1,\r\n })\r\n .subscribe((res) => {\r\n if (saveCard) {\r\n this.cardModel.Token = chargeRes.token;\r\n this.saveCustomerCard();\r\n } else {\r\n this.sendReceipt().then(\r\n () => {\r\n this.alertSuccess({\r\n title: 'Success!',\r\n text: 'Form and Payment has been successfully submitted!',\r\n });\r\n },\r\n (err) =>\r\n this.alertService\r\n .alertWarning({\r\n title: `Payment Successful
Sending Receipt Failed`,\r\n text: `The payment was done successfully.
Unfortunately, there was an error encountered\r\n while sending the receipt.\r\n

Please contact ${this.businessInfo.BusinessName} and request for the receipt to be sent to your email.`,\r\n })\r\n .then(() => {\r\n this.scrollToTop();\r\n (window as any).location.reload();\r\n })\r\n );\r\n }\r\n });\r\n } else {\r\n if (saveCard) {\r\n this.cardModel.Token = chargeRes.token;\r\n this.saveCustomerCard();\r\n } else {\r\n this.sendReceipt().then(\r\n () => {\r\n this.alertSuccess({\r\n title: 'Success!',\r\n text: 'Form and Payment has been successfully submitted!',\r\n });\r\n },\r\n (err) =>\r\n this.alertService\r\n .alertWarning({\r\n title: `Payment Successful
Sending Receipt Failed`,\r\n text: `The payment was done successfully.
Unfortunately, there was an error encountered\r\n while sending the receipt.\r\n

Please contact ${this.businessInfo.BusinessName} and request for the receipt to be sent to your email.`,\r\n })\r\n .then(() => {\r\n this.scrollToTop();\r\n (window as any).location.reload();\r\n })\r\n );\r\n }\r\n }\r\n }\r\n },\r\n (err) => {\r\n const captchaRenderer: any =\r\n document.getElementById('captchaRenderBtn');\r\n\r\n if (captchaRenderer) captchaRenderer.click();\r\n\r\n this.alertError({\r\n title: 'Payment failed',\r\n text: 'We are unable to process your payment. Please contact your administrator.',\r\n });\r\n }\r\n );\r\n }\r\n\r\n updateAmountTotal(eventData: any, event: any) {\r\n if (this.isCardFormActive && typeof event.isValid === 'boolean') {\r\n // this detects if the Form is valid / invalid\r\n this.formObserverService.updateFormValidation(event.isValid);\r\n }\r\n\r\n this.resizeFrame();\r\n if (eventData) {\r\n // Logic for File component\r\n if (eventData.file && eventData.file.length > 0) {\r\n const removeLink = document.getElementsByClassName(\r\n 'formio-component-file'\r\n ) as unknown as HTMLElement;\r\n if (typeof removeLink[0].children[1].children[1] !== undefined) {\r\n removeLink[0].children[1].children[1].children[0].children[0].style.cursor =\r\n 'pointer';\r\n removeLink[0].children[1].children[1].children[0].children[0].addEventListener(\r\n 'click',\r\n () => {\r\n eventData.file[0] = {};\r\n this.ready(event, 'restoreForm');\r\n }\r\n );\r\n }\r\n }\r\n\r\n // if not,undefined,null,empty value then...\r\n const orderAdjustments: any = [];\r\n let hasComputableAmountFields = false;\r\n let amountPayable: number = 0;\r\n let subTotal: number = 0;\r\n let grandTotal: number = 0;\r\n\r\n // Added for Subscription Total\r\n if (eventData && eventData.PlanPrice) {\r\n amountPayable += eventData.PlanPrice;\r\n hasComputableAmountFields = true;\r\n }\r\n\r\n Object.keys(eventData).map((key) => {\r\n const priceElement = this.computingComponents.price.indexOf(key);\r\n\r\n if (priceElement !== -1) {\r\n let amountToAdd = eventData[key];\r\n const quantity = this.computingComponents.quantity[priceElement];\r\n if (quantity) {\r\n amountToAdd *= eventData[quantity];\r\n }\r\n amountPayable += amountToAdd;\r\n hasComputableAmountFields = true;\r\n }\r\n\r\n const shippingElement = this.computingComponents.shipping.indexOf(key);\r\n if (shippingElement !== -1) {\r\n amountPayable += eventData[key];\r\n hasComputableAmountFields = true;\r\n }\r\n\r\n const productFieldElement =\r\n this.computingComponents.productField.indexOf(key);\r\n if (productFieldElement !== -1) {\r\n amountPayable += eventData[key].amount || 0;\r\n hasComputableAmountFields = true;\r\n }\r\n\r\n const singleProductFieldElement =\r\n this.computingComponents.singleProductField.indexOf(key);\r\n if (singleProductFieldElement !== -1) {\r\n amountPayable += eventData[key].productSubtotal || 0;\r\n hasComputableAmountFields = true;\r\n }\r\n\r\n const commercialItemsFieldElement =\r\n this.computingComponents.commercialLineItems.indexOf(key);\r\n\r\n if (commercialItemsFieldElement !== -1) {\r\n amountPayable += eventData[key].Amount * eventData[key].Quantity || 0;\r\n hasComputableAmountFields = true;\r\n }\r\n });\r\n\r\n subTotal = amountPayable;\r\n this.itemsTotal = subTotal;\r\n\r\n // Discount Computation\r\n Object.keys(eventData).map((key) => {\r\n const discountAmountElement =\r\n this.computingComponents.discountAmount.indexOf(key);\r\n if (discountAmountElement !== -1) {\r\n amountPayable -= eventData[key];\r\n hasComputableAmountFields = true;\r\n\r\n orderAdjustments.push({\r\n id: 0,\r\n adjustmentType: 'DISCOUNT',\r\n adjustmentName: 'DISCOUNT',\r\n amount: eventData[key],\r\n percentValue: 0,\r\n });\r\n }\r\n\r\n const discountPercentElement =\r\n this.computingComponents.discountPercent.indexOf(key);\r\n if (discountPercentElement !== -1) {\r\n amountPayable -= subTotal * +(eventData[key] / 100);\r\n hasComputableAmountFields = true;\r\n\r\n orderAdjustments.push({\r\n id: 0,\r\n adjustmentType: 'DISCOUNT',\r\n adjustmentName: 'DISCOUNT %',\r\n amount: 0,\r\n percentValue: eventData[key],\r\n });\r\n }\r\n });\r\n\r\n // Fill SubTotal\r\n Object.keys(eventData).map((key) => {\r\n const subTotalElementName =\r\n this.computingComponents.subTotal.indexOf(key);\r\n if (subTotalElementName !== -1) {\r\n const subTotalElement: HTMLInputElement = (\r\n document.querySelector(\"[name='data[\" + key + \"]']\")\r\n );\r\n subTotalElement.value = formatCurrency(amountPayable, 'en-US', '$');\r\n }\r\n });\r\n\r\n this.subTotal = amountPayable || 0;\r\n grandTotal = amountPayable || 0;\r\n\r\n // Tax Computations\r\n const taxAmountElementName = this.computingComponents.taxAmount;\r\n const taxPercentElementName = this.computingComponents.taxPercent;\r\n const changedComponent = event.changed;\r\n\r\n if (taxAmountElementName && taxPercentElementName) {\r\n let amountToTax = eventData[taxAmountElementName] || 0;\r\n let rateToTax = eventData[taxPercentElementName] || 0;\r\n\r\n if (eventData[taxAmountElementName] === undefined) {\r\n amountToTax = this.computingComponents.taxAmountDefaultValue;\r\n }\r\n\r\n if (eventData[taxPercentElementName] === undefined) {\r\n rateToTax = this.computingComponents.taxPercentDefaultValue;\r\n }\r\n\r\n const isAmountChanged =\r\n (changedComponent &&\r\n changedComponent.component &&\r\n changedComponent.component.key === taxAmountElementName) ||\r\n false;\r\n const isTaxChanged =\r\n (changedComponent &&\r\n changedComponent.component &&\r\n changedComponent.component.key === taxPercentElementName) ||\r\n false;\r\n\r\n const taxAmountElement: HTMLInputElement = (\r\n document.querySelector(\"[name='data[\" + taxAmountElementName + \"]']\")\r\n );\r\n if (\r\n taxAmountElement &&\r\n (isTaxChanged || (!isTaxChanged && !isAmountChanged))\r\n ) {\r\n taxAmountElement.value = formatCurrency(\r\n this.itemsTotal * (rateToTax / 100),\r\n 'en-US',\r\n '$'\r\n );\r\n }\r\n\r\n const taxPercentElement: HTMLInputElement = (\r\n document.querySelector(\"[name='data[\" + taxPercentElementName + \"]']\")\r\n );\r\n if (taxPercentElement && isAmountChanged) {\r\n taxPercentElement.value =\r\n ((amountToTax / this.itemsTotal) * 100 || 0) + '';\r\n }\r\n\r\n amountPayable += this.itemsTotal * (rateToTax / 100);\r\n hasComputableAmountFields = true;\r\n orderAdjustments.push({\r\n id: 0,\r\n adjustmentType: 'TAX',\r\n adjustmentName: 'TAX',\r\n amount: this.itemsTotal * (rateToTax / 100),\r\n percentValue: 0,\r\n });\r\n } else if (taxAmountElementName) {\r\n const amountToTax = eventData[taxAmountElementName] || 0;\r\n amountPayable += amountToTax;\r\n hasComputableAmountFields = true;\r\n orderAdjustments.push({\r\n id: 0,\r\n adjustmentType: 'TAX',\r\n adjustmentName: 'TAX',\r\n amount: amountToTax,\r\n percentValue: 0,\r\n });\r\n } else if (taxPercentElementName) {\r\n const rateToTax = eventData[taxPercentElementName] || 0;\r\n\r\n amountPayable += this.itemsTotal * +(rateToTax / 100);\r\n hasComputableAmountFields = true;\r\n orderAdjustments.push({\r\n id: 0,\r\n adjustmentType: 'TAX',\r\n adjustmentName: 'TAX %',\r\n amount: 0,\r\n percentValue: rateToTax,\r\n });\r\n }\r\n\r\n if (this.isTaxJarComponentActive) {\r\n const taxjarPercentElementName = this.computingComponents.taxjarPercent;\r\n const taxjarPercentElement: HTMLInputElement = (\r\n document.querySelector(\r\n \"[name='data[\" + taxjarPercentElementName + \"]']\"\r\n )\r\n );\r\n\r\n // Added for taxjar implementation\r\n let tax_state = eventData.states || eventData.states1;\r\n let tax_zipcode = eventData.postcode1 || eventData.postcode;\r\n let myPostCode = tax_zipcode ? tax_zipcode.replace('_', '') : '';\r\n\r\n let taxjarPayloadDetails = [\r\n {\r\n country: eventData.countries,\r\n states: tax_state,\r\n zipcode: tax_zipcode,\r\n address: eventData.address,\r\n city: eventData.city ? eventData.city : '',\r\n shipping: eventData.shipping ? eventData.shipping : 0,\r\n taxable_amount: amountPayable,\r\n },\r\n ];\r\n let rateToTax = 0;\r\n if (this.isManualTaxjar) {\r\n rateToTax = this.totalManualTax || 0;\r\n amountPayable += this.itemsTotal * +(rateToTax / 100);\r\n hasComputableAmountFields = true;\r\n orderAdjustments.push({\r\n id: 0,\r\n adjustmentType: 'TAX',\r\n adjustmentName: 'TAX %',\r\n amount: 0,\r\n percentValue: rateToTax,\r\n });\r\n\r\n if (taxjarPercentElement) {\r\n taxjarPercentElement.value = rateToTax + '';\r\n }\r\n } else {\r\n const addressToCompare =\r\n eventData.countries + tax_state + tax_zipcode;\r\n rateToTax = this.taxJarAPIRate;\r\n if (taxjarPercentElement) {\r\n taxjarPercentElement.value = rateToTax + '';\r\n }\r\n\r\n if (this.taxAddressStorage !== addressToCompare) {\r\n if (\r\n (eventData.countries == 'USA' &&\r\n tax_state != '' &&\r\n tax_zipcode != '' &&\r\n myPostCode.length == 5) ||\r\n (eventData.countries != 'USA' &&\r\n tax_state != '' &&\r\n tax_zipcode != '' &&\r\n myPostCode.length >= 3)\r\n ) {\r\n this.computeTax(taxjarPayloadDetails).then((res: any) => {\r\n rateToTax = res || 0;\r\n this.taxJarAPIRate = rateToTax;\r\n this.taxAddressStorage = addressToCompare;\r\n amountPayable += this.itemsTotal * +(rateToTax / 100);\r\n hasComputableAmountFields = true;\r\n orderAdjustments.push({\r\n id: 0,\r\n adjustmentType: 'TAX',\r\n adjustmentName: 'TAX %',\r\n amount: 0,\r\n percentValue: rateToTax,\r\n });\r\n\r\n if (taxjarPercentElement) {\r\n taxjarPercentElement.value = rateToTax + '';\r\n }\r\n\r\n Object.keys(eventData).map((key) => {\r\n const totalElementName =\r\n this.computingComponents.total.indexOf(key);\r\n if (totalElementName !== -1) {\r\n const totalElement: HTMLInputElement = (\r\n document.querySelector(\"[name='data[\" + key + \"]']\")\r\n );\r\n totalElement.value = formatCurrency(\r\n amountPayable,\r\n 'en-US',\r\n '$'\r\n );\r\n }\r\n });\r\n\r\n this.total = amountPayable;\r\n\r\n if (hasComputableAmountFields) {\r\n this.heartlandObserverService.updateAmountData(amountPayable);\r\n }\r\n this.orderAdjustments = orderAdjustments;\r\n });\r\n }\r\n }\r\n }\r\n } else {\r\n Object.keys(eventData).map((key) => {\r\n const totalElementName = this.computingComponents.total.indexOf(key);\r\n if (totalElementName !== -1) {\r\n const totalElement: HTMLInputElement = (\r\n document.querySelector(\"[name='data[\" + key + \"]']\")\r\n );\r\n totalElement.value = formatCurrency(amountPayable, 'en-US', '$');\r\n }\r\n });\r\n\r\n this.total = amountPayable;\r\n\r\n if (hasComputableAmountFields) {\r\n this.heartlandObserverService.updateAmountData(amountPayable);\r\n }\r\n this.orderAdjustments = orderAdjustments;\r\n }\r\n }\r\n }\r\n\r\n saveRecurringPayment() {\r\n const recurringPayment = new RecurringPayment();\r\n recurringPayment.FormId = this.FormId;\r\n recurringPayment.FormDataId = this.formEntry.Id;\r\n recurringPayment.OrderId = this.orderId;\r\n recurringPayment.CustomerCardNumberId = this.customerCardId;\r\n recurringPayment.StartDate = new Date();\r\n recurringPayment.EndDate = null;\r\n recurringPayment.FrequencyConfigurationId =\r\n this.submissionData[this.recurringPaymentComponentKey]?.id;\r\n recurringPayment.IsRecurringPayment = true;\r\n\r\n if (\r\n this.isRecurringForm &&\r\n this.submissionData[this.recurringPaymentComponentKey]\r\n ) {\r\n const recurringPaymentComponent = this.allComponents.find(\r\n (component) => component.componentType === 'recurringPayment'\r\n );\r\n recurringPayment.IsAutoCharge =\r\n recurringPaymentComponent?.customOptions?.isAutoCharge || false;\r\n }\r\n\r\n this.formioBuilderService\r\n .saveRecurringInvoicePayment(recurringPayment)\r\n .subscribe(\r\n (res) => {\r\n if (this.customerSignature) {\r\n //save customer signature.\r\n this.invoiceService\r\n .uploadCustomersig({\r\n invoiceNumber: this.invoiceNumber,\r\n signatureUrl: this.customerSignature,\r\n createdBy: 1,\r\n })\r\n .subscribe((res) => {\r\n this.alertSuccess({\r\n title: 'Success!',\r\n text: 'Form and Payment has been successfully submitted!',\r\n });\r\n });\r\n } else {\r\n this.alertSuccess({\r\n title: 'Success!',\r\n text: 'Form and Payment has been successfully submitted!',\r\n });\r\n }\r\n this.busy = false;\r\n },\r\n (error) => {\r\n this.alertError({\r\n title: 'Error!',\r\n text: 'Something went wrong. Please contact administrator.',\r\n });\r\n\r\n this.busy = false;\r\n }\r\n );\r\n }\r\n\r\n // added for taxjar implementations\r\n computeTax(taxjarPayloadDetails: any[]): Promise {\r\n return new Promise((resolve, reject) => {\r\n let taxOrderPayload = new TaxOrder();\r\n\r\n taxOrderPayload.FromCountry = this.findCountryCode(\r\n this.businessInfo.CountryCode\r\n );\r\n taxOrderPayload.FromZip = this.businessInfo.PostalCode\r\n ? this.businessInfo.PostalCode\r\n : '';\r\n taxOrderPayload.FromState = this.businessInfo.StateId\r\n ? this.businessInfo.StateId\r\n : '';\r\n taxOrderPayload.FromCity = this.businessInfo.City\r\n ? this.businessInfo.City\r\n : '';\r\n taxOrderPayload.FromStreet = this.businessInfo.Address\r\n ? this.businessInfo.Address\r\n : '';\r\n\r\n let toCountry = this.findCountryCode(taxjarPayloadDetails[0].country);\r\n taxOrderPayload.ToCountry = toCountry\r\n ? toCountry\r\n : taxOrderPayload.FromCountry;\r\n taxOrderPayload.ToZip = taxjarPayloadDetails[0].zipcode\r\n ? taxjarPayloadDetails[0].zipcode\r\n : taxOrderPayload.FromZip;\r\n taxOrderPayload.ToState = taxjarPayloadDetails[0].states\r\n ? taxjarPayloadDetails[0].states\r\n : taxOrderPayload.FromState;\r\n taxOrderPayload.ToCity = taxjarPayloadDetails[0].city\r\n ? taxjarPayloadDetails[0].city\r\n : taxOrderPayload.FromCity;\r\n taxOrderPayload.ToStreet = taxjarPayloadDetails[0].address\r\n ? taxjarPayloadDetails[0].address\r\n : taxOrderPayload.FromStreet;\r\n\r\n taxOrderPayload.Amount = taxjarPayloadDetails[0].taxable_amount\r\n ? taxjarPayloadDetails[0].taxable_amount\r\n : 0;\r\n taxOrderPayload.Shipping = taxjarPayloadDetails[0].shipping;\r\n taxOrderPayload.CustomerId = '';\r\n taxOrderPayload.ExemptionType = this.taxExemptionType || 'non_exempt';\r\n taxOrderPayload.nexusAddress = null;\r\n taxOrderPayload.lineItem = []; // to consider for store embed\r\n taxOrderPayload.lineItem.push({\r\n Id: '',\r\n Quantity: 1,\r\n ProductTaxCode: '',\r\n UnitPrice: this.subTotal,\r\n Discount: 0,\r\n });\r\n\r\n this.taxService.getTaxJarRate(taxOrderPayload).subscribe(\r\n (response: any) => {\r\n if (response) {\r\n resolve(response.rate);\r\n } else {\r\n resolve(0);\r\n }\r\n },\r\n (error: any) => {\r\n resolve(0);\r\n }\r\n );\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n

\r\n {{ busy_message }}...  \r\n

\r\n
\r\n\r\n
\r\n
\r\n

Forbidden.

\r\n

\r\n Unauthorized access. You don't have the privilege to access this form.\r\n Please contact the merchant administrator.\r\n

\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n\r\n
\r\n \r\n Submit\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { FormbuilderEmbedComponent } from 'src/app/formioembed/formbuilder-embed/formbuilder-embed.component';\r\nconst routes: Routes = [\r\n {\r\n path: 'form/:id/embed',\r\n component: FormbuilderEmbedComponent,\r\n },\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule],\r\n})\r\nexport class FormioembedRoutingModule {}\r\n","import { Injector, NgModule } from '@angular/core';\r\nimport { CommonModule, CurrencyPipe, DatePipe } from '@angular/common';\r\nimport { FormioModule } from 'angular-formio';\r\nimport { FormbuilderEmbedComponent } from 'src/app/formioembed/formbuilder-embed/formbuilder-embed.component';\r\nimport { FormbuilderEmbedBaseComponent } from 'src/app/formioembed/formbuilder-embed-base/formbuilder-embed-base.component';\r\nimport { FormioembedRoutingModule } from 'src/app/formioembed/formioembed-routing.module';\r\nimport { registerCustomForms } from '../formiobuilder/components/custom-builder-components/custom-forms.formio';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { SignaturePadModule } from 'angular2-signaturepad';\r\nimport { PaymentConfirmActionComponent } from 'src/app/formioembed/payment-confirm-action/payment-confirm-action.component';\r\nimport { CustomFormsModule } from 'src/app/formiobuilder/components/custom-builder-components/custom-forms.module';\r\nimport {\r\n CjButtonModule,\r\n} from '@cashjar-dev/ui';\r\n\r\n@NgModule({\r\n declarations: [\r\n FormbuilderEmbedComponent,\r\n FormbuilderEmbedBaseComponent,\r\n PaymentConfirmActionComponent,\r\n ],\r\n providers: [DatePipe, CurrencyPipe],\r\n imports: [\r\n CommonModule,\r\n FormioembedRoutingModule,\r\n FormioModule,\r\n FormsModule,\r\n SignaturePadModule,\r\n CustomFormsModule,\r\n CjButtonModule\r\n ],\r\n})\r\nexport class FormioembedModule {\r\n constructor(injector: Injector) {\r\n registerCustomForms(injector);\r\n }\r\n}\r\n","export class NewTax\r\n{\r\n public taxObject : TaxObject;\r\n public taxLocationObjects : TaxLocationObjects[];\r\n}\r\n\r\nexport class TaxObject\r\n{\r\n public Id : number;\r\n public Name: string;\r\n public Percentage: number;\r\n public IsIncludedInPrice: boolean;\r\n public Enabled: boolean;\r\n public ApplyToCustomAmount: boolean;\r\n public CreatedBy: number;\r\n public CreatedDate : Date; \r\n public UpdatedBy: number;\r\n public UpdatedDate: Date;\r\n public IsDeleted: boolean;\r\n public IsAvailableToFutureLoc: boolean;\r\n}\r\n\r\nexport class TaxLocationObjects\r\n{\r\n public TaxId: number;\r\n public LocationId: number;\r\n}\r\n\r\nexport class TaxSummaryRate\r\n{\r\n public Id: number;\r\n public CountryCode: string;\r\n public Country: string;\r\n public RegionCode: string;\r\n public Region: string;\r\n public MinimumLabel: string;\r\n public MinimumRate: number;\r\n public AverageLabel: string;\r\n public AverageRate: number;\r\n public CreatedBy: number;\r\n public CreatedDate: Date;\r\n public UpdatedBy: number;\r\n public UpdatedDate: Date;\r\n}\r\n\r\nexport class TaxOrder\r\n{\r\n public FromCountry: string; //2-letter ISO country code;optional\r\n public FromZip: string; //5-Digit ZIP or ZIP+4;optional\r\n public FromState: string; //2-letter ISO state code;optional\r\n public FromCity: string; //optional\r\n public FromStreet: string; //optional\r\n public ToCountry: string; //2-letter ISO country code;required\r\n public ToZip: string; //required if ToCountry is US\r\n public ToState: string; //2-letter ISO state code;required if ToCountry is US or CA\r\n public ToCity: string; //optional\r\n public ToStreet: string; //optional\r\n public Amount: number; //either Amount or LineItems are required\r\n public Shipping: number; //required\r\n public CustomerId: string; //optional\r\n public ExemptionType: string;\r\n public nexusAddress: NexusAddress[];\r\n public lineItem: LineItem[];\r\n}\r\n\r\nexport class NexusAddress {\r\n public Id: string; //optional\r\n public Country: string; //2-letter ISO country code;required\r\n public Zip: string; //optional\r\n public State: string; //2-letter ISO state code;required\r\n public City: string; //optional\r\n public Street: string; //optional\r\n}\r\n\r\nexport class LineItem {\r\n public Id: string; //Unique identifier of the given line item.Duplicate item IDs within line_items[] will be ignored. optional\r\n public Quantity: number; //optional\r\n public ProductTaxCode: string;//optional.If omitted, the item will remain fully taxable.\r\n public UnitPrice: number; //optional\r\n public Discount: number; //optional \r\n}"],"sourceRoot":"webpack:///"}