feat(back-end front-end): integration with twint
All checks were successful
Build, Test and Deploy / test-backend (push) Successful in 34s
Build, Test and Deploy / build-and-push (push) Successful in 43s
Build, Test and Deploy / deploy (push) Successful in 10s

This commit is contained in:
2026-02-24 10:07:04 +01:00
parent 699a968875
commit 57f6301e03
11 changed files with 80 additions and 29 deletions

View File

@@ -4,7 +4,7 @@ import { ActivatedRoute, Router } from '@angular/router';
import { AppButtonComponent } from '../../shared/components/app-button/app-button.component';
import { AppCardComponent } from '../../shared/components/app-card/app-card.component';
import { QuoteEstimatorService } from '../calculator/services/quote-estimator.service';
import { TranslateModule } from '@ngx-translate/core';
import { TranslateModule, TranslateService } from '@ngx-translate/core';
import { environment } from '../../../environments/environment';
@Component({
@@ -18,6 +18,7 @@ export class OrderComponent implements OnInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
private quoteService = inject(QuoteEstimatorService);
private translate = inject(TranslateService);
orderId: string | null = null;
selectedPaymentMethod: 'twint' | 'bill' | null = 'twint';
@@ -101,6 +102,15 @@ export class OrderComponent implements OnInit {
return this.twintQrUrl() ?? '';
}
getTwintButtonImageUrl(): string {
const lang = this.translate.currentLang;
if (lang === 'de') {
return 'https://go.twint.ch/static/img/button_dark_de.svg';
}
// Default to EN for everything else (it, fr, en) as instructed or if not DE
return 'https://go.twint.ch/static/img/button_dark_en.svg';
}
onTwintQrError(): void {
this.twintQrUrl.set(null);
}