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); }
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); }
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); }