Beispiel #1
0
        public static void Main(string[] args)
        {
            //To point Sample Application to TLS 1.2 ONLY server, uncomment line below
            //Bambora.NA.SDK.BamboraUrls.BaseUrl = "https://tls12-api.na.bambora.com";

            Console.WriteLine("BEGIN running sample transactions");
            _bambora = new Gateway()
            {
                MerchantId      = 300200578,
                PaymentsApiKey  = "4BaD82D9197b4cc4b70a221911eE9f70",
                ReportingApiKey = "4e6Ff318bee64EA391609de89aD4CF5d",
                ProfilesApiKey  = "D97D3BE1EE964A6193D17A571D9FBC80",
                ApiVersion      = "1"
            };
            // Payments API
            SampleTransactions.ProcessPayment();
            SampleTransactions.ProcessDeclinedPayment();
            SampleTransactions.ProcessReturns();
            SampleTransactions.ProcessPreauthorization();
            SampleTransactions.ProcessVoids();
            SampleTransactions.ProcessTokenPayment();
            SampleTransactions.ProcessPhysicalPayments();              // you need these options (cash and cheque) enabled on your merchant account first
            SampleTransactions.GetTransaction();
            SampleTransactions.QueryTransactions();
            SampleTransactions.CreateAndDeleteProfile();
            SampleTransactions.CreateProfileWithToken();
            SampleTransactions.ProfileTakePayment();
            SampleTransactions.GetProfile();
            SampleTransactions.UpdateProfile();
            SampleTransactions.AddAndRemoveCardFromProfile();
            SampleTransactions.GetAllCardsFromProfile();
            SampleTransactions.GetCardFromProfile();
            SampleTransactions.UpdateCardInProfile();
            Console.WriteLine("FINISHED running sample transactions");
        }
        public static void Main(string[] args)
        {
            //To point Sample Application to TLS 1.2 ONLY server, uncomment line below
            //Bambora.NA.SDK.BamboraUrls.BaseUrl = "https://tls12-api.na.bambora.com";

            Console.WriteLine("BEGIN running sample transactions");
            _bambora = new Gateway()
            {
                MerchantId      = Constants.MerchantId,
                SubMerchantId   = Constants.SubMerchantId,
                PaymentsApiKey  = Constants.PaymentsApiKey,
                ReportingApiKey = Constants.ReportingApiKey,
                ProfilesApiKey  = Constants.ProfilesApiKey,
                ApiVersion      = Constants.ApiVersion
            };

            // Payments API
            SampleTransactions.ProcessPayment();
            SampleTransactions.ProcessDeclinedPayment();
            SampleTransactions.ProcessReturns();
            SampleTransactions.ProcessPreauthorization();
            SampleTransactions.ProcessVoids();
            SampleTransactions.ProcessTokenPayment();
            //SampleTransactions.ProcessPhysicalPayments (); // you need these options (cash and cheque) enabled on your merchant account first
            SampleTransactions.GetTransaction();
            SampleTransactions.QueryTransactions();
            SampleTransactions.CreateAndDeleteProfile();
            SampleTransactions.CreateProfileWithToken();
            SampleTransactions.ProfileTakePayment();
            SampleTransactions.GetProfile();
            SampleTransactions.UpdateProfile();
            SampleTransactions.AddAndRemoveCardFromProfile();
            SampleTransactions.GetAllCardsFromProfile();
            SampleTransactions.GetCardFromProfile();
            SampleTransactions.UpdateCardInProfile();
            Console.WriteLine("FINISHED running sample transactions");
        }