示例#1
0
 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;
 }
示例#2
0
 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;
 }
示例#3
0
        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;
        }
示例#4
0
 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;
 }
示例#5
0
 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;
 }
示例#6
0
 private void MainForm_OnWrite(object sender, App55.WriteEventArgs e)
 {
     this.outputTextBox.Text += e.Message;
     this.outputTextBox.SelectionStart = this.outputTextBox.Text.Length;
     this.outputTextBox.ScrollToCaret();
 }