Example #1
0
        public BaseResponse KullaniciOdemeAl(OdemeAlRequest odemeAlRequest)
        {
            BaseResponse baseResponse = new BaseResponse();

            if (odemeAlRequest.Tl <= 9)
            {
                baseResponse.durum = false;
                baseResponse.mesaj = "Lütfen Ödeme Almak İçin En Az 10 ₺ Tutarını Girin";
                return(baseResponse);
            }
            else
            {
                Kullanicilar kullanicilar = _kullanicilarRepository.Find(x => x.KullaniciAdi == odemeAlRequest.KullaniciAdi);
                kullanicilar.Bakiye += odemeAlRequest.GelenPara;
                _kullanicilarRepository.Update(kullanicilar);

                baseResponse.durum = true;
                baseResponse.mesaj = "Ödemeniz Coin Cinsinden Alındı.Alınan Coin Tutarı : " + odemeAlRequest.GelenPara;
                return(baseResponse);
            }
        }
Example #2
0
        public IActionResult PostKullaniciOdemeAl(OdemeAlRequest odemeAlRequest)
        {
            var baseResponse = _kullanicilarAppService.KullaniciOdemeAl(odemeAlRequest);

            return(Ok(baseResponse));
        }