private HttpContent CreateHttpContent(Step step, TransactionResultEnum transactionResult) { var postData = new List<KeyValuePair<string, string>>(); postData.Add(new KeyValuePair<string, string>("tnxId", this.tnxId)); postData.Add(new KeyValuePair<string, string>("step", step.CurrentStepId.ToString())); postData.Add(new KeyValuePair<string, string>("status", transactionResult.ToString())); HttpContent content = new FormUrlEncodedContent(postData); return content; }
private void OnTransactionSuccess(Step step) { CallBackHttpClient.PostAsync(this.CallBackURL, CreateHttpContent(step, TransactionResultEnum.Inprogress)); }
private void OnTransactionStart(Step step) { CallBackHttpClient.PostAsync(this.CallBackURL, CreateHttpContent(step, TransactionResultEnum.Started)); }
public Worker(StepContext stepContext) { Step firstStep = new EnterPageStep(1, stepContext); this.Step = firstStep; }
private static void OnTransactionSuccess(Step step) { Console.WriteLine("Transaction is successful"); }
private static void OnTransactionStart(Step step) { Console.WriteLine("Start Transaction"); }
private static void OnTransactionFail(Step step) { Console.WriteLine("Transaction is Failed at step : {0}", step.Name); }
private static void OnTransactionInprogress(Step step) { Console.WriteLine("Transaction is inprogress at step : {0}", step.Name); }