public OrderQRPaymentStatusResponseDto GetOrderQRPaymentStatus(int orderId)
        {
            var additionalInfo = _aPIOrderData.GetAdditionalInfo(orderId)
                                 ?? throw new Exception($"Не удалось получить информацию о заказе {orderId}");

            var response = new OrderQRPaymentStatusResponseDto
            {
                AvailablePaymentTypes = additionalInfo.AvailablePaymentTypes,
                CanReceiveQR          = additionalInfo.CanReceiveQRCode,
                QRPaymentStatus       = _qrPaymentConverter.ConvertToAPIPaymentStatus(_fastPaymentModel.GetOrderFastPaymentStatus(orderId))
            };

            return(response);
        }
Beispiel #2
0
        public OrderPaymentStatusResponseDto GetOrderSmsPaymentStatus(int orderId)
        {
            var additionalInfo = _aPIOrderData.GetAdditionalInfo(orderId)
                                 ?? throw new Exception($"Не удалось получить информацию о заказе {orderId}");

            var response = new OrderPaymentStatusResponseDto()
            {
                AvailablePaymentTypes = additionalInfo.AvailablePaymentTypes,
                CanSendSms            = additionalInfo.CanSendSms,
                SmsPaymentStatus      = _smsPaymentConverter.convertToAPIPaymentStatus(
                    _aPISmsPaymentData.GetOrderPaymentStatus(orderId)
                    )
            };

            return(response);
        }
Beispiel #3
0
        public OrderSmsPaymentStatusResponseDto GetOrderSmsPaymentStatus(int orderId)
        {
            var tokenStr = Request.Headers[HeaderNames.Authorization];

            _logger.LogInformation($"(orderId: {orderId}) User token: {tokenStr}");

            var additionalInfo = _aPIOrderData.GetAdditionalInfo(orderId)
                                 ?? throw new Exception($"Не удалось получить информацию о заказе {orderId}");

            var response = new OrderSmsPaymentStatusResponseDto()
            {
                AvailablePaymentTypes = additionalInfo.AvailablePaymentTypes,
                CanSendSms            = additionalInfo.CanSendSms,
                SmsPaymentStatus      = _smsPaymentConverter.convertToAPIPaymentStatus(
                    _aPISmsPaymentData.GetOrderSmsPaymentStatus(orderId)
                    )
            };

            return(response);
        }