예제 #1
0
        //get payment
        private void button3_Click(object sender, EventArgs e)
        {
            string address = this.textBox2.Text;

            Jingtum.API.Wallet wallet = new Jingtum.API.Wallet(address);
            string             hash   = this.textBox3.Text;

            Jingtum.API.Payment payment = wallet.GetPayment(hash);
            this.ShowPropertyValue <Jingtum.API.Payment>(payment);
        }
예제 #2
0
        //set payment
        private void button6_Click(object sender, EventArgs e)
        {
            //Jingtum.API.Wallet wallet = new Jingtum.API.Wallet(this.textBox12.Text, this.textBox13.Text);

            //Jingtum.API.Payment payment = new Jingtum.API.Payment();
            //Jingtum.API.Amount amount = new Jingtum.API.Amount();
            //amount.Value = int.Parse(this.textBox14.Text);
            //amount.Currency = this.textBox11.Text;
            //amount.Issuer = string.Empty;
            //payment.Amount = amount;

            //List<string> memos = new List<string>();
            //memos.Add("Test: " + DateTime.Now.ToString("o"));

            //string distinationAddress = this.textBox15.Text;

            //Jingtum.API.SetPaymentResponse res = wallet.SetPayment(payment, distinationAddress, string.Empty, memos);
            //this.ShowPropertyValue<Jingtum.API.SetPaymentResponse>(res);


            string address = this.textBox12.Text;
            string secret  = this.textBox13.Text;

            Jingtum.API.Wallet  wallet  = new Jingtum.API.Wallet(address, secret);
            Jingtum.API.Payment payment = new Jingtum.API.Payment();
            Jingtum.API.Amount  amount  = new Jingtum.API.Amount();
            amount.Value    = int.Parse(this.textBox14.Text);
            amount.Currency = this.textBox11.Text;
            amount.Issuer   = string.Empty;
            payment.Amount  = amount;
            List <string> memos = new List <string>();

            memos.Add("Test: " + DateTime.Now.ToString("o"));
            string distinationAddress = this.textBox15.Text;

            Jingtum.API.SetPaymentResponse res = wallet.SetPayment(payment, distinationAddress, string.Empty, memos);
            this.ShowPropertyValue <Jingtum.API.SetPaymentResponse>(res);
        }