private App55.TransactionCommitResponse CommitTransaction(App55.Transaction transaction) { Write("Committing transaction..."); App55.TransactionCommitResponse response = gateway.CommitTransaction(new App55.Transaction(transaction.ID)).Send(); WriteLn(" DONE"); return response; }
private App55.CardCreateResponse CreateCard(App55.User user) { Write("Creating card..."); App55.CardCreateResponse response = gateway.CreateCard(new App55.User((long)user.ID), new App55.Card( "App55 User", "4111111111111111", DateTime.UtcNow.AddDays(90).ToString("MM/yyyy"), "111", null, new App55.Address( "8 Exchange Quay", "Manchester", "M5 3EJ", "GB" ) )).Send(); WriteLn(" DONE (token " + response.Card.Token + ")"); return response; }
private App55.TransactionCreateResponse CreateTransaction(App55.User user, App55.Card card) { Write("Creating transaction..."); App55.TransactionCreateResponse response = gateway.CreateTransaction(new App55.User((long)user.ID), new App55.Card(card.Token), new App55.Transaction("0.10", "GBP", null) ).Send(); WriteLn(" DONE (transaction-id " + response.Transaction.ID + ")"); return response; }
private App55.CardListResponse ListCards(App55.User user) { Write("Listing cards..."); App55.CardListResponse response = gateway.ListCards(new App55.User((long)user.ID)).Send(); WriteLn(" DONE (" + response.Cards.Count + " cards)"); return response; }
private App55.CardDeleteResponse DeleteCard(App55.User user, App55.Card card) { Write("Deleting card " + card.Token + "..."); App55.CardDeleteResponse response = gateway.DeleteCard(new App55.User((long)user.ID), new App55.Card(card.Token)).Send(); WriteLn(" DONE"); return response; }
private void MainForm_OnWrite(object sender, App55.WriteEventArgs e) { this.outputTextBox.Text += e.Message; this.outputTextBox.SelectionStart = this.outputTextBox.Text.Length; this.outputTextBox.ScrollToCaret(); }