From 40e52c05cd7472e41c5e4a958810b0ab66f3e964 Mon Sep 17 00:00:00 2001 From: Jonas Hendrickx Date: Mon, 27 Jan 2025 18:31:00 +0100 Subject: [PATCH] fix --- .../adjust-payment-dialog.component.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/apps/web/src/app/billing/shared/adjust-payment-dialog/adjust-payment-dialog.component.ts b/apps/web/src/app/billing/shared/adjust-payment-dialog/adjust-payment-dialog.component.ts index bbae5099afa..89c6fe11d8f 100644 --- a/apps/web/src/app/billing/shared/adjust-payment-dialog/adjust-payment-dialog.component.ts +++ b/apps/web/src/app/billing/shared/adjust-payment-dialog/adjust-payment-dialog.component.ts @@ -84,21 +84,20 @@ export class AdjustPaymentDialogComponent implements OnInit { } const request = new PaymentRequest(); + const taxInformation = this.taxInfoComponent.getTaxInformation(); const response = this.paymentComponent.createPaymentToken().then((result) => { request.paymentToken = result[0]; request.paymentMethodType = result[1]; - request.postalCode = this.taxInformation?.postalCode; - request.country = this.taxInformation?.country; - request.taxId = this.taxInformation?.taxId; + request.postalCode = taxInformation?.postalCode; + request.country = taxInformation?.country; + request.state = taxInformation?.state; + request.line1 = taxInformation?.line1; + request.line2 = taxInformation?.line2; + request.city = taxInformation?.city; if (this.organizationId == null) { return this.apiService.postAccountPayment(request); } else { - request.taxId = this.taxInformation?.taxId; - request.state = this.taxInformation?.state; - request.line1 = this.taxInformation?.line1; - request.line2 = this.taxInformation?.line2; - request.city = this.taxInformation?.city; - request.state = this.taxInformation?.state; + request.taxId = taxInformation?.taxId; return this.organizationApiService.updatePayment(this.organizationId, request); } });