Sample Post C#
public string GlobalOrderID = string.Empty; public string ProductID = string.Empty; protected void Page_Load(object sender, EventArgs e) { NameValueCollection nvColl = new NameValueCollection(Request.Form); string errorMessage = string.Empty; bool isPosted = false; try { if (nvColl.Count == 0) { errorMessage = "POST IS NULL."; } else { GlobalOrderID = nvColl["GlobalOrderID"]; ProductID = nvColl["ProductID"]; isPosted = true; } } catch (Exception ex) { errorMessage = ex.Message; } Response.Clear(); if (isPosted) { // Store your information here....... and than reply Response.Write("SUCCESS"); } else { Response.Write("FAILED"); Response.Write(errorMessage); } } |
Sample Post PHP
$GlobalOrderID = ""; $ProductID = ""; $errorMessage = ""; $isPosted = false; try{ if(empty($_POST)) { $errorMessage = "POST IS NULL"; }else{ $GlobalOrderID = $_POST["GlobalOrderID"]; $ProductID = $_POST["ProductID"]; $isPosted = true; } } catch(Exception $e){ $errorMessage = $e->getMessage(); } if($isPosted){ // Store your information here....... and than reply echo("SUCCESS"); }else{ echo("FAILED"); echo($errorMessage); } |