public virtual void button1Clicked(object sender, EventArgs args) { form1.Disabled = true; form1.Visible = false; var order = new OrderDetails(); order.Merchant = "TOKENTES"; order.OrderRef = "EXT_" + new Random().Next(100000, 999999).ToString(); order.TokenEnable = true; order.TokenType = PayU.Core.Base.TokenType.PAY_ON_TIME; order.ProductDetails.Add(new ProductDetails { Code = "TCK1", Name = "Ticket1", Quantity = 1, UnitPrice = 1M, Information = "Barcelona flight" }); order.ProductDetails.Add(new ProductDetails { Code = "TCK2", Name = "Ticket2", Quantity = 1, UnitPrice = 1M, Information = "London Flight" }); order.ShippingCosts = 0M; order.PricesCurrency = "TRY"; order.DestinationCity = "Ankara"; order.DestinationState = "Ankara"; order.DestinationCountry = "TR"; order.TestOrder = true; order.InstallmentOptions = "2,3,7,10,12"; order.BillingDetails = new BillingDetails { FirstName = textBoxName.Text, LastName = textBoxLastName.Text, Email = textBoxEmail.Text, City = "Kağıthane", //Ilce/Semt State = "Istanbul", //Sehir CountryCode = "TR" }; order.AutoMode = true; order.ReturnUrl = string.Format("~/LiveUpdate/OrderComplete.aspx?orderid={0}", order.OrderRef).ToAbsoluteUrl(); var service = new LiveUpdateService("4@ET=1()T=%y3S8b(r_]"); ltrLiveUpdateForm.Text = service.RenderPaymentForm(order, "Ödeme Yap"); ltrLiveUpdateForm.Text += @"<script>document.getElementById('payForm').submit();</script>"; }
public async Task <IActionResult> LatestEventMessage() { var queueProcessor = new LiveUpdateService() { Enabled = true }; queueProcessor.SetupConnection(); var message = queueProcessor.Consume(); return(Ok(message)); }
public void Page_Load() { // Verify the signature in the "ctrl" query string parameter var service = new LiveUpdateService("4@ET=1()T=%y3S8b(r_]"); var verification = service.VerifyControlSignature(Request); // Grab the order id. var orderId = Request.QueryString["orderid"]; var sb = new StringBuilder(); sb.AppendFormat("<p>Thank you for your order. It has been recorded with Reference Number {0}</p>", orderId); sb.AppendLine(); sb.AppendFormat("<p>Control signature verification result: {0}</p>", verification); ltrOutput.Text = sb.ToString(); }
public static void Run() { var order = new OrderDetails(); order.Merchant = "PAYUDEMO"; order.OrderRef = "6112457"; order.TokenEnable = true; order.TokenType = PayU.Core.Base.TokenType.PAY_ON_TIME; order.ProductDetails.Add(new ProductDetails { Code = "Product code", Name = "Product nameĞŞÇÖıİ", Quantity = 2, VAT = 67M, UnitPrice = 20M, Information = "Product info", PriceType = PriceType.GROSS }); order.ShippingCosts = 47M; order.PricesCurrency = "TRY"; order.PaymentMethod = ""; order.Discount = 10M; order.DestinationCity = "Ankara"; order.DestinationState = "Ankara"; order.DestinationCountry = "TR"; order.TestOrder = true; order.InstallmentOptions = "2,3,7,10,12"; order.BillingDetails = new BillingDetails { FirstName = "Mehmet", LastName = "Coşkun", Email = "*****@*****.**", City = "Kağıthane", //Ilce/Semt State = "Istanbul", //Sehir CountryCode = "TR" }; var service = new LiveUpdateService("P5@F8*3!m0+?^9s3&u8("); Console.WriteLine("{0}", service.RenderPaymentForm(order, "Go to Payment Page")); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddMvc() .AddApplicationPart(typeof(Startup).Assembly) .SetCompatibilityVersion(CompatibilityVersion.Version_2_2); services.AddCors(options => { options.AddPolicy("DevCorsPolicy", builder => builder .WithOrigins("http://localhost:4200") .AllowAnyMethod() .AllowCredentials() .AllowAnyHeader() .Build() ); }); var appAuthConfig = StartUpHelper.GetEnvVariablesForAppAuthApi(Configuration); services.AddSingleton(appAuthConfig); var encryptionSettings = StartUpHelper.GetEncryptionSettings(Configuration); services.AddSingleton(encryptionSettings); var tokenSettings = StartUpHelper.GetTokenSettings(Configuration); services.AddSingleton(tokenSettings); ConfigureAuth(services, tokenSettings); services.AddSingleton <IAppAuthClient, AppAuthClient>(); services.AddScoped <IAppAuthApiService, AppAuthApiService>(); services.AddScoped <ApiServiceHelper>(); var queueProcessor = new LiveUpdateService() { Enabled = true }; queueProcessor.SetupConnection(); }