예제 #1
0
        public void DccRateLookup_Charge()
        {
            Transaction dccResponse = card.GetDccRate(DccRateType.Sale, DccProcessor.Fexco)
                                      .WithAmount(10.01m)
                                      .WithCurrency("EUR")
                                      .Execute("dcc");

            Assert.IsNotNull(dccResponse);
            Assert.AreEqual("00", dccResponse.ResponseCode);

            Transaction saleResponse = card.Charge(10.01m)
                                       .WithCurrency("EUR")
                                       .WithDccRateData(dccResponse.DccRateData)
                                       .WithOrderId(dccResponse.OrderId)
                                       .Execute("dcc");

            Assert.IsNotNull(saleResponse);
            Assert.AreEqual("00", saleResponse.ResponseCode);
        }
예제 #2
0
        public void CreditDccRateCardTokenizationThenPayingWithToken()
        {
            var tokenizedCard = new CreditCardData {
                Token = card.Tokenize(),
            };

            var dccDetails = tokenizedCard.GetDccRate()
                             .WithAmount(Amount)
                             .WithCurrency(CURRENCY)
                             .Execute();
            var expectedDccAmountValue = GetDccAmount(dccDetails);

            AssertDccInfoResponse(dccDetails, expectedDccAmountValue);

            waitForGpApiReplication();
            var response = tokenizedCard.Charge(Amount)
                           .WithCurrency(CURRENCY)
                           .WithDccRateData(dccDetails.DccRateData)
                           .Execute();

            AssertTransactionResponse(response, TransactionStatus.Captured, expectedDccAmountValue);
        }
예제 #3
0
        public void CreditGetDccInfo()
        {
            var dccDetails = card.GetDccRate()
                             .WithAmount(Amount)
                             .WithCurrency(CURRENCY)
                             .Execute();
            var expectedDccAmountValue = GetDccAmount(dccDetails);

            AssertDccInfoResponse(dccDetails, expectedDccAmountValue);

            waitForGpApiReplication();
            var transaction = card.Charge(Amount)
                              .WithCurrency(CURRENCY)
                              .WithDccRateData(dccDetails.DccRateData)
                              .Execute();

            AssertTransactionResponse(transaction, TransactionStatus.Captured, expectedDccAmountValue);
        }