Пример #1
0
 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;
 }
Пример #2
0
 private void OnTransactionSuccess(Step step)
 {
     CallBackHttpClient.PostAsync(this.CallBackURL, CreateHttpContent(step, TransactionResultEnum.Inprogress));
 }
Пример #3
0
 private void OnTransactionStart(Step step)
 {
     CallBackHttpClient.PostAsync(this.CallBackURL, CreateHttpContent(step, TransactionResultEnum.Started));
 }
Пример #4
0
 public Worker(StepContext stepContext)
 {
     Step firstStep = new EnterPageStep(1, stepContext);
     this.Step = firstStep;
 }
Пример #5
0
 private static void OnTransactionSuccess(Step step)
 {
     Console.WriteLine("Transaction is successful");
 }
Пример #6
0
 private static void OnTransactionStart(Step step)
 {
     Console.WriteLine("Start Transaction");
 }
Пример #7
0
 private static void OnTransactionFail(Step step)
 {
     Console.WriteLine("Transaction is Failed at step : {0}", step.Name);
 }
Пример #8
0
 private static void OnTransactionInprogress(Step step)
 {
     Console.WriteLine("Transaction is inprogress at step : {0}", step.Name);
 }