示例#1
0
        public void PaymentCSRetailTest()
        {
            DecidirConnector       decidir = new DecidirConnector(Ambiente.AMBIENTE_SANDBOX, "566f2c897b5e4bfaa0ec2452f5d67f13", "b192e4cb99564b84bf5db5550112adea");
            PaymentResponse        resultPaymentResponse = new PaymentResponse();
            GetAllPaymentsResponse pagos = new GetAllPaymentsResponse();

            try
            {
                Payment payment = GetPayment();
                payment.fraud_detection = GetRetailFraudDetection();

                resultPaymentResponse = decidir.Payment(payment);

                Assert.AreEqual(resultPaymentResponse.bin, payment.bin);
                Assert.AreEqual(resultPaymentResponse.amount, payment.amount * 100);
                Assert.AreEqual(resultPaymentResponse.site_transaction_id, payment.site_transaction_id);

                pagos = decidir.GetAllPayments(null, null, null, "00030118");

                Assert.AreEqual(true, pagos.results.Count >= 0);
            }
            catch (ResponseException ex)
            {
                Assert.AreEqual(true, false);
            }
        }
示例#2
0
        public void PaymentTest()
        {
            DecidirConnector       decidir = new DecidirConnector(request_host, request_path, "566f2c897b5e4bfaa0ec2452f5d67f13", "b192e4cb99564b84bf5db5550112adea");
            PaymentResponse        resultPaymentResponse = new PaymentResponse();
            GetAllPaymentsResponse pagos = new GetAllPaymentsResponse();

            try
            {
                Payment payment = GetPayment();

                resultPaymentResponse = decidir.Payment(payment);

                Assert.AreEqual(resultPaymentResponse.bin, payment.bin);
                Assert.AreEqual(resultPaymentResponse.amount, payment.amount * 100);
                Assert.AreEqual(resultPaymentResponse.site_transaction_id, payment.site_transaction_id);

                pagos = decidir.GetAllPayments(null, null, null, "00030118");

                Assert.AreEqual(true, pagos.results.Count >= 0);
            }
            catch (ResponseException)
            {
                Assert.AreEqual(true, false);
            }
        }
示例#3
0
        public void PaymentTest()
        {
            DecidirConnector decidir = new DecidirConnector(Ambiente.AMBIENTE_SANDBOX, "566f2c897b5e4bfaa0ec2452f5d67f13", "b192e4cb99564b84bf5db5550112adea");
            CardData         data    = GetCardData();
            //   CardTokenResponse resultCardData = new CardTokenResponse();
            PaymentResponse        resultPaymentResponse = new PaymentResponse();
            GetAllPaymentsResponse pagos = new GetAllPaymentsResponse();

            try
            {
                //  resultCardData = decidir.GetToken(data);

                Payment payment = GetPayment(1);

                resultPaymentResponse = decidir.Payment(payment);

                Assert.AreEqual(resultPaymentResponse.bin, payment.bin);
                Assert.AreEqual(resultPaymentResponse.amount, payment.amount * 100);
                Assert.AreEqual(resultPaymentResponse.site_transaction_id, payment.site_transaction_id);

                pagos = decidir.GetAllPayments(null, null, null, "00030118");

                Assert.AreEqual(true, pagos.results.Count >= 0);
            }
            catch (ResponseException)
            {
                Assert.AreEqual(true, false);
            }
        }
示例#4
0
        public void GetAllPaymentsTest()
        {
            DecidirConnector       decidir = new DecidirConnector(Ambiente.AMBIENTE_SANDBOX, "566f2c897b5e4bfaa0ec2452f5d67f13", "b192e4cb99564b84bf5db5550112adea");
            GetAllPaymentsResponse pagos   = new GetAllPaymentsResponse();

            try
            {
                pagos = decidir.GetAllPayments(null, null, null, "00030118");
            }
            catch (Exception)
            {
                Assert.AreEqual(true, false);
            }

            Assert.AreEqual(true, pagos.results.Count >= 0);
        }