Example #1
0
 public ActionResult TransactionQueryByMPAY(string MPAY)
 {
     _getSaleResultMpayService = new SaleServiceSoapClient(SaleServiceSoapClient.EndpointConfiguration.SaleServiceSoap);
     SaleService.MAuthToken token = new SaleService.MAuthToken();
     #region Token
     token.UserCode = base.settings.UserCode;
     token.Pin      = base.settings.Pin;
     #endregion
     var response = _getSaleResultMpayService.GetSaleResultMPAYAsync(token, MPAY).GetAwaiter().GetResult();
     return(View(response));
 }
Example #2
0
 public ActionResult TransactionQueryByOrderId(string orderId)
 {
     _getSaleResultOrderService = new SaleServiceSoapClient(SaleServiceSoapClient.EndpointConfiguration.SaleServiceSoap);
     SaleService.MAuthToken token = new SaleService.MAuthToken();
     #region Token
     token.UserCode = base.settings.UserCode;
     token.Pin      = base.settings.Pin;
     #endregion
     var guid     = new Guid(orderId.ToString());
     var response = _getSaleResultOrderService.GetSaleResultAsync(token, guid).GetAwaiter().GetResult();
     return(View(response));
 }
Example #3
0
        public ActionResult ProApi(int paymentTypeId, int productCategoryId)
        {
            var url = Request.Path;

            _proApiApiPlusService = new SaleServiceSoapClient(SaleServiceSoapClient.EndpointConfiguration.SaleServiceSoap);
            #region Token
            SaleService.MAuthToken token = new SaleService.MAuthToken();
            token.UserCode = base.settings.UserCode;
            token.Pin      = base.settings.Pin;
            #endregion
            #region MSaleProduct

            MSaleProduct product = new MSaleProduct();
            product.ProductId          = 0;
            product.ProductCategory    = productCategoryId;
            product.ProductDescription = "Telefon";
            product.Price = 0.01;
            product.Unit  = 1;


            #endregion
            #region MSaleTicketInput
            MSaleTicketInput input = new MSaleTicketInput();
            input.MPAY                = "01";
            input.Content             = "TLFN01-Telefon";
            input.SendOrderResult     = true;
            input.PaymentTypeId       = paymentTypeId;
            input.ReceivedSMSObjectId = new Guid("00000000-0000-0000-0000-000000000000");
            input.ProductList         = new[] { product };
            input.SendNotificationSMS = true;
            input.OnSuccessfulSMS     = "basarili odeme yaptiniz";
            input.OnErrorSMS          = "basarisiz odeme yaptiniz";
            input.Url = url;
            input.RequestGsmOperator = 0;
            input.RequestGsmType     = 0;
            input.SuccessfulPageUrl  = "http://localhost:32123/Home/Success";
            input.ErrorPageUrl       = "http://localhost:32123/Home/Fail";
            input.Country            = "";
            input.Currency           = "";
            input.Extra             = "";
            input.TurkcellServiceId = "";
            #endregion
            var saleWithTicketResult = _proApiApiPlusService.SaleWithTicketAsync(token, input).GetAwaiter().GetResult();
            return(Redirect(saleWithTicketResult.RedirectUrl));
        }
Example #4
0
        public ActionResult ApiPlus(string gsmNumber, int paymentTypeId, int productCategoryId)
        {
            var url = Request.Path;

            _proApiApiPlusService = new SaleServiceSoapClient(SaleServiceSoapClient.EndpointConfiguration.SaleServiceSoap);
            #region Token
            var token = new SaleService.MAuthToken();
            token.UserCode = base.settings.UserCode;
            token.Pin      = base.settings.Pin;
            #endregion
            #region Product
            MSaleProduct product = new MSaleProduct();
            product.ProductId          = 0;
            product.ProductCategory    = productCategoryId;
            product.ProductDescription = "Telefon";
            product.Price = 0.01;
            product.Unit  = 1;
            #endregion
            #region MSaleInput
            MSaleInput input = new MSaleInput();
            input.MPAY                = "01";
            input.Gsm                 = gsmNumber;
            input.Content             = "TLFN-Telefon";
            input.SendOrderResult     = true;
            input.PaymentTypeId       = paymentTypeId;
            input.Url                 = url;
            input.ReceivedSMSObjectId = new Guid("00000000-0000-0000-0000-000000000000");
            input.ProductList         = new[] { product };
            input.SendNotificationSMS = true;
            input.OnSuccessfulSMS     = "basarili odeme yaptiniz";
            input.OnErrorSMS          = "basarisiz odeme yaptiniz";
            input.RequestGsmOperator  = 0;
            input.RequestGsmType      = 0;
            input.CustomerIpAddress   = "127.0.0.1";
            input.Extra               = "";
            input.TurkcellServiceId   = "";
            #endregion
            var result = _proApiApiPlusService.SaleWithConfirmAsync(token, input).GetAwaiter().GetResult();
            return(View(result));
        }