nop-payments.com wrote:Hello,
In the ProcessPayment method you cannot get the orderId, because at that point the order is not yet inserted in the database.
However, you can use the property OrderGuid, which is set at that point.
The orderId is available in the PostPrococessPament method, but you only use that if you are implementing a redirect-type plugin, which I don't think you are.
Good luck
I've checked the PostProcessPayment method in the payment processor file of the plugin and it actually solved most of my problem. Thanks for the hint.
In the controller the Return Method has the following code snippet:
NameValueCollection Params = new NameValueCollection();
string[] segments = encResponse.Split('&');
foreach (string seg in segments)
{
string[] parts = seg.Split('=');
if (parts.Length > 0)
{
string Key = parts[0].Trim();
string Value = parts[1].Trim();
Params.Add(Key, Value);
}
}
for (int i = 0; i < Params.Count; i++)
{
Response.Write(Params.Keys[i] + " = " + Params[i] + "<br>");
}
/*
merchantId = form["Merchant_Id"];
orderId = form["Order_Id"];
Amount = form["Amount"];
AuthDesc = form["AuthDesc"];
checksum = form["Checksum"];
*/
merchantId = Params["Merchant_Id"];
orderId = Params["Order_Id"];
Amount = Params["Amount"];
AuthDesc = Params["order_status"];
Is this code collecting the response after successful/unsuccessful capture of the transaction..??? Because the order_status parameter is in the response header of the API.
Regards.