Total de postagens:
26
Karma:
160
Ingressou:
26/11/2014
Localização:
Pakistan
Below code work fine in .Net, now I upgrade my website to dot Net Core 3.1 "HttpContext.Current.Response not supporting in Net Core 3.1" Whats the alternate solution in Dot Net Core 3.1 ? Please gives the solution with sample code. Thanks string checksum2 = Generate_MerchantRequest_Check_SumNetConnect(secretKey, merchantId, orderNo, amount, date, time); StringBuilder sb = new StringBuilder(); sb.AppendLine("<html>"); sb.AppendLine(String.Format("<body onload='document.forms[\"{0}\"].submit()'>", "Form1")); sb.AppendLine(String.Format("<form id='{0}' method='POST' action='{1}'>", "www.smmotors.org Form", urlNetConnect)); sb.AppendLine("<input type='hidden' name='MERCHANT_ID' value='" + merchantId + "' />"); sb.AppendLine("<input type='hidden' name='Order_No' value='" + orderNo + "' />"); sb.AppendLine("<input type='hidden' name='Order_Amount' value='" + amount + "' />"); sb.AppendLine("<input type='hidden' name='Date' value='" + date + "' />"); sb.AppendLine("<input type='hidden' name='Time' value='" + time + "' />"); sb.AppendLine("<input type='hidden' name='CheckSum' value='" + checksum2 + "' />"); sb.AppendLine("<input type='hidden' name='Transaction_Desc' value='" + transactionDesc + "' />"); sb.AppendLine("</form></body></html>"); try { HttpContext.Current.Response.Clear(); HttpContext.Current.Response.Write(sb.ToString()); HttpContext.Current.Response.End(); _webHelper.IsPostBeingDone = true; } catch (Exception ep) { throw new Exception(ep.Message); }
Total de postagens:
26
Karma:
160
Ingressou:
26/11/2014
Localização:
Pakistan
I already try HttpContext.Response.WriteAsync its not work. So are you are trying to POST a form to third party payment gateway - which one ? Yes , KEENU(NetConnect) There is this class Source43\Presentation\Nop.Web.Framework\RemotePost.cs i see RemotePost.cs but not work
MVP
Programador certificado
Total de postagens:
3947
Karma:
35242
Ingressou:
08/02/2010
Localização:
Australia
Do they have a SDK ? Is there a website which shows what / how to send ?
Total de postagens:
26
Karma:
160
Ingressou:
26/11/2014
Localização:
Pakistan
Sending Request On NetConnect secure URL using the POST method parameters will be passed. Before sending the parameters merchant need to call the function Generate_CheckSum to generate the transaction verification code that will be used by NetConnect system to ensure that the data send by Merchant is not tampered. Receiving Response of Request Redirected URL will be provided by Merchant at the time of registration. On this URL transaction processing response will be send. Response send will be in the POST method and will correspond to the fields that were used for sending Request with additional elements. On receiving the response from NetConnect first using the function Verify_CheckSum, validation of message will be performed against the received parameters. Please refer to “Appendix C: Sample code for receiving response from NetConnect” for details. Sample Code // Checksum Should be generated from code. Checksum= new ClassName().Generate_MerchantRequest_Check_Sum(Secret_Key,Merchant_Id, Order_No, TotalOrderAmount, Date, Time); <html> <head> <body> <form name="Redirect_to_NetConnect" method="post" action= "Insert URL provided by KEENU" > <input type="hidden" name="Merchant_ID" value="Merchant_ID" /> <input type="hidden" name="Order_No" value="Order_No" /> <input type="hidden" name="Order_Amount" value="Order_Amount" /> <input type="hidden" name="Date" value=”Date”/> <input type="hidden" name="Time" value=”Time” /> <input type="hidden" name="CheckSum" value=”Checksum” /> <input type="hidden" name="Transaction_Desc" value="Order_Desc" /> </form> </body> </head> </html> Page
Total de postagens:
129
Karma:
707
Ingressou:
12/01/2020
Localização:
Saudi Arabia
Can I add external JavaScript library "paymaen gateway library" in the form and use data from it ? Thank you