This commit is contained in:
2026-05-06 17:11:42 +04:00
parent 9fc7fbbae2
commit be4e44d102

View File

@@ -6,7 +6,7 @@ import { TranslatePipe } from '../../translate/translate.pipe';
import { TranslationService } from '../../translate/translation.service'; import { TranslationService } from '../../translate/translation.service';
interface LegacyPayResponse { interface LegacyPayResponse {
payload?: string; nspkurl?: string;
} }
/** /**
@@ -85,11 +85,11 @@ export class LegacyPayPage {
this.http.post<LegacyPayResponse>(this.LEGACY_API, body).subscribe({ this.http.post<LegacyPayResponse>(this.LEGACY_API, body).subscribe({
next: (res) => { next: (res) => {
this.loading.set(false); this.loading.set(false);
if (res?.payload) { if (res?.nspkurl) {
if (this.isMobile) { if (this.isMobile) {
window.location.href = res.payload; window.location.href = res.nspkurl;
} else { } else {
this.qrPayUrl.set(res.payload); this.qrPayUrl.set(res.nspkurl);
} }
} else { } else {
this.error.set(this.t('errors.payment_failed')); this.error.set(this.t('errors.payment_failed'));