//this doesnt work and I dont need it so tough
    protected void lb3DSecureReciept_Click(object sender, EventArgs e)
    {
        string merchantId   = ConfigurationManager.AppSettings["MerchantID"];
        string account      = ConfigurationManager.AppSettings["Account"];
        string sharedSecret = ConfigurationManager.AppSettings["SharedSecret"];

        Merchant     merchant = new Merchant(merchantId, account, sharedSecret);
        Order        order    = new Order("transaction01", "EUR", 9999);
        Address      address  = new Address("", "", "", "", "", "", "", "");
        PhoneNumbers numbers  = new PhoneNumbers("", "", "", "");
        Payer        payer    = new Payer("Business", "test", "", "Phil", "McCracken", "", address, numbers, "", new ArrayList());

        string timestamp = Common.GenerateTimestamp();

        string cardRef    = "card1";
        string cvn        = "123";
        string autoSettle = "1";

        RealVaultTransactionResponse resp = RealVault.RealVault3DSVerifyEnrolled(merchant, order, payer, cardRef, autoSettle, timestamp, new ArrayList());

        //TODO: Run RealAuth verify signed
        //TODO: Run Reciept-In with 3d secure details

        lblErrorCode.Text = resp.ResultCode.ToString();
        lblResult.Text    = resp.Message;
    }
    protected void lbEditPayer_Click(object sender, EventArgs e)
    {
        string merchantId   = ConfigurationManager.AppSettings["MerchantID"];
        string account      = ConfigurationManager.AppSettings["Account"];
        string sharedSecret = ConfigurationManager.AppSettings["SharedSecret"];

        string timestamp = Common.GenerateTimestamp();

        Merchant     merchant = new Merchant(merchantId, account, sharedSecret);
        Order        order    = new Order("123123wdfsdf", "GBP", 00);
        Address      address  = new Address("", "", "", "", "", "", "", "");
        PhoneNumbers numbers  = new PhoneNumbers("", "", "", "");
        Payer        payer    = new Payer("Business", "test", "", "Phil", "McCracken", "", address, numbers, "", new ArrayList());
        CreditCard   card     = new CreditCard("MC", "5425232820001308", "0118", "Phil McCracken", "123", 1);

        RealVaultTransactionResponse resp = RealVault.PayerEdit(timestamp, merchant, order, payer, new ArrayList());

        lblErrorCode.Text = resp.ResultCode.ToString();
        lblResult.Text    = resp.Message;
    }
    protected void lbCancelCard_Click(object sender, EventArgs e)
    {
        string merchantId   = ConfigurationManager.AppSettings["MerchantID"];
        string account      = ConfigurationManager.AppSettings["Account"];
        string sharedSecret = ConfigurationManager.AppSettings["SharedSecret"];

        Merchant     merchant = new Merchant(merchantId, account, sharedSecret);
        Address      address  = new Address("", "", "", "", "", "", "", "");
        PhoneNumbers numbers  = new PhoneNumbers("", "", "", "");
        Payer        payer    = new Payer("Business", "test", "", "First", "Second", "", address, numbers, "", new ArrayList());

        string cardRef = "card1";

        string timestamp = Common.GenerateTimestamp();

        RealVaultTransactionResponse resp = RealVault.CardCancelCard(timestamp, cardRef, merchant, payer);

        lblErrorCode.Text = resp.ResultCode.ToString();
        lblResult.Text    = resp.Message;
    }
    protected void lblbRecieptIn_Click(object sender, EventArgs e)
    {
        string merchantId   = ConfigurationManager.AppSettings["MerchantID"];
        string account      = ConfigurationManager.AppSettings["Account"];
        string sharedSecret = ConfigurationManager.AppSettings["SharedSecret"];

        Merchant     merchant = new Merchant(merchantId, account, sharedSecret);
        Order        order    = new Order("GBP", 9999);
        Address      address  = new Address("", "", "", "", "", "", "", "");
        PhoneNumbers numbers  = new PhoneNumbers("", "", "", "");
        Payer        payer    = new Payer("Business", "test", "", "Phil", "McCracken", "", address, numbers, "", new ArrayList());

        string timestamp = Common.GenerateTimestamp();

        //only needed if
        //string cvn = "123";
        string cardRef    = "card1";
        string autoSettle = "1";

        //not needed if not a recurring payment, use reciept in overload without recurring
        bool recurring = true;

        //fixed or variable
        //fixed - order amount is the same every transaction
        //variable - order amount is different in every transaction
        string recurringType = "variable";

        //first - first payment in a sequence
        //subsequent - any subsequent payments after the initial
        //final - no more payments in sequence will follow
        string recurringSequence = "first";

        RealVaultTransactionResponse resp = RealVault.RecieptIn(merchant, order, payer, cardRef, autoSettle, timestamp, new ArrayList(), recurring, recurringType, recurringSequence);

        lblErrorCode.Text = resp.ResultCode.ToString();
        lblResult.Text    = resp.Message;
    }
    protected void lbNewPayer_Click(object sender, EventArgs e)
    {
        string merchantId   = ConfigurationManager.AppSettings["MerchantID"];
        string account      = ConfigurationManager.AppSettings["Account"];
        string sharedSecret = ConfigurationManager.AppSettings["SharedSecret"];

        //You need to generate the following to complete any process, the following order might be helpful as well.
        //Timestamp ==> Merchant ==> Order ==> Address ==> PhoneNumbers ==> Payer ==> CreditCard ==> SHA1Hash

        //Current timestamp
        string timestamp = Common.GenerateTimestamp();

        //New Merchant
        //merchant id
        //account
        //shared secret
        Merchant merchant = new Merchant(merchantId, account, sharedSecret);

        //New Order
        //order id (optional)
        //currency code
        //order amount
        Order order = new Order("123123wdfsdf", "GBP", 1099);

        //New Address (optional)
        //Line 1 (optional)
        //Line 2 (optional)
        //Line 3 (optional)
        //City (optional)
        //County (optional)
        //Postcode (optional)
        //Country Code (optional)
        //Country Name (optional)
        Address address = new Address("", "", "", "", "", "", "", "");

        //New Phone Numbers (optional)
        //home (optional)
        //work (optional)
        //fax (optional)
        //mobile (optional)
        PhoneNumbers numbers = new PhoneNumbers("", "", "", "");

        //New Payer
        //Payer type (default to 'Business')
        //Payer ref
        //Title (optional)
        //First Name
        //Surname
        //Company (optional)
        //Address (optional)
        //Numbers (optional)
        //email (optional)
        //comments (optional)
        Payer payer = new Payer("Business", "test", "", "First", "Second", "", address, numbers, "", new ArrayList());

        //New Credit Card
        //Card type
        //Card number
        //Expiry date
        //Cardholder name
        //cvn
        //Is cvn present
        //Issue number (optional)
        CreditCard card = new CreditCard("MC", "5425232820001308", "0118", "Phil McCracken", "123", 1);

        //Create new payer
        //timestamp
        //SHA1Hash
        //merchant
        //order
        //payer
        //comments
        RealVaultTransactionResponse resp = RealVault.PayerNew(timestamp, merchant, order, payer, new ArrayList());

        lblErrorCode.Text = resp.ResultCode.ToString();
        lblResult.Text    = resp.Message;
    }