예제 #1
0
 public ActionResult TransactionQueryByMPAY(string MPAY)
 {
     _getSaleResultMpayService = new SaleServiceSoapClient();
     Core.ApiPlusAndProApiService.MAuthToken token = new Core.ApiPlusAndProApiService.MAuthToken();
     #region Token
     token.UserCode = base.settings.UserCode;
     token.Pin      = base.settings.Pin;
     #endregion
     var response = _getSaleResultMpayService.GetSaleResultMPAY(token, MPAY);
     return(View(response));
 }
예제 #2
0
 public ActionResult TransactionQueryByOrderId(string orderId)
 {
     _getSaleResultOrderService = new SaleServiceSoapClient();
     Core.ApiPlusAndProApiService.MAuthToken token = new Core.ApiPlusAndProApiService.MAuthToken();
     #region Token
     token.UserCode = base.settings.UserCode;
     token.Pin      = base.settings.Pin;
     #endregion
     var guid     = new Guid(orderId.ToString());
     var response = _getSaleResultOrderService.GetSaleResult(token, guid);
     return(View(response));
 }
예제 #3
0
        public ActionResult ProApi(int paymentTypeId, int productCategoryId)
        {
            var url = Request.Url.AbsoluteUri;

            _proApiApiPlusService = new SaleServiceSoapClient();
            #region Token
            Core.ApiPlusAndProApiService.MAuthToken token = new Core.ApiPlusAndProApiService.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:7597/Home/Success";
            input.ErrorPageUrl       = "http://localhost:7597/Home/Fail";
            input.Country            = "";
            input.Currency           = "";
            input.Extra             = "";
            input.TurkcellServiceId = "";
            #endregion
            var saleWithTicketResult = _proApiApiPlusService.SaleWithTicket(token, input);
            return(Redirect(saleWithTicketResult.RedirectUrl));
        }
예제 #4
0
        public ActionResult ApiPlus(string gsmNumber, int paymentTypeId, int productCategoryId)
        {
            var url = Request.Url.AbsoluteUri;

            _proApiApiPlusService = new SaleServiceSoapClient();
            #region Token
            var token = new Core.ApiPlusAndProApiService.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.SaleWithConfirm(token, input);
            return(View(result));
        }