Beispiel #1
0
        public OnlineDepositFormDataResponse OnlineDepositFormData([FromUri] OnlineDepositFormDataRequest request)
        {
            var response = _paymentGatewaySettingsQueries.GetPaymentGatewaySettingsByPlayerId(PlayerId);

            if (response == null)
            {
                throw new RegoException(ErrorMessagesEnum.ServiceUnavailable.ToString());
            }

            var responseMapped = Mapper.Map <IEnumerable <PaymentGatewaySettings> >(response);

            return(new OnlineDepositFormDataResponse
            {
                PaymentGatewaySettings = responseMapped
            });
        }
        public void Can_get_payment_gatway_settings_by_playerId()
        {
            // Arrange
            var playerId = GeneratePaymentGatewaySettinigsData();

            // Act
            var response = _queries.GetPaymentGatewaySettingsByPlayerId(playerId);

            //Assert
            response.Should().NotBeNull();
            var settings = response.FirstOrDefault();

            settings.Should().NotBeNull();
            settings.EntryPoint.Should().NotBeNullOrEmpty();
            settings.PaymentGatewayName.Should().NotBeNullOrEmpty();
            settings.Channel.Should().BeGreaterOrEqualTo(0);
        }