This commit is contained in:
sdarbinyan
2026-06-02 01:46:12 +04:00
parent 63b0e18396
commit c6bc05560e
3 changed files with 128 additions and 113 deletions

View File

@@ -800,6 +800,14 @@ export const mockDataInterceptor: HttpInterceptorFn = (req, next) => {
}, 300);
}
// ── GET /qr/settings
if (url.endsWith('/qr/settings') && req.method === 'GET') {
return respond({
minAmount: 30,
maxAmount: 200000,
});
}
// ── POST /qr (create payment QR directly)
if (url.endsWith('/qr') && req.method === 'POST') {
return respond({
@@ -858,6 +866,26 @@ export const mockDataInterceptor: HttpInterceptorFn = (req, next) => {
}, 500);
}
// ── GET /qr/dynamic/:partnerID/:qrID (dynamic QR status)
if (url.match(/\/qr\/dynamic\/[^/]+\/[^/]+$/) && req.method === 'GET') {
return respond({
status: 'APPROVED',
paymentStatus: 'COMPLETED',
code: 'SUCCESS',
amount: 0,
currency: 'RUB',
qrId: 'mock',
transactionId: 999,
transactionDate: new Date().toISOString(),
additionalInfo: '',
paymentPurpose: '',
createDate: new Date().toISOString(),
order: 'mock-order',
qrExpirationDate: new Date().toISOString(),
phoneNumber: '+70000000000'
}, 500);
}
// ── GET /qr/payment/:qrId (legacy/direct payment status)
if (url.match(/\/qr\/payment\/[^/]+$/) && req.method === 'GET') {
return respond({