feat(payment): add qrDescription/customerID fields, TTL-based QR polling
Some checks failed
Architecture Governance / architecture (push) Has been cancelled

- CartPaymentRequest gains qrDescription (brandName > hostname > fallback
  text) and customerID (telegram id)
- QrCreateResponse gains qrTTL; polling window now derived from it
  (min 60s) instead of a fixed 3-minute/36-check cap
- PAYMENT_MAX_CHECKS replaced by PAYMENT_MIN_POLL_SECONDS
This commit is contained in:
sdarbinyan
2026-07-23 00:26:35 +04:00
parent 89ae50e9a4
commit f261800159
4 changed files with 35 additions and 8 deletions

View File

@@ -30,6 +30,7 @@ export interface QrCreateResponse {
status?: string;
qrStatus?: string;
qrExpirationDate?: string;
qrTTL?: number;
payload?: string;
Payload?: string;
qrUrl?: string;
@@ -47,6 +48,8 @@ export interface CartPaymentRequest {
redirectUrl: string;
telegramUsername: string;
paymentMethod: 'qr' | 'card';
qrDescription?: string;
customerID?: string;
items: Array<{ itemID: number; price: number; name: string; quantity?: number; delivery?: DeliveryOption[] }>;
}