public void CreditRefund() { var response = card.Refund(16m) .WithCurrency("USD") .WithAllowDuplicates(true) .Execute(); Assert.IsNotNull(response); Assert.AreEqual("00", response.ResponseCode); }
public void CreditRefund() { var response = card.Refund(AMOUNT) .WithCurrency(CURRENCY) .Execute(); AssertTransactionResponse(response, TransactionStatus.Captured); }
public void Test_006_credit_manual_refund() { Transaction response = card.Refund(10m) .WithCurrency("USD") .Execute(); Assert.IsNotNull(response); Assert.AreEqual("000", response.ResponseCode); }
public void CreditRefund() { var response = card.Refund(16m) .WithCurrency("USD") .WithAllowDuplicates(true) .Execute(); Assert.IsNotNull(response); Assert.AreEqual(SUCCESS, response?.ResponseCode); Assert.AreEqual(GetMapping(TransactionStatus.Captured), response?.ResponseMessage); }
public void Refund_Encrypted_Keyed() { var response = encryptedCard.Refund(4.01m) .WithCurrency("USD") .WithInvoiceNumber("1701") .WithClientTransactionId("165901") .Execute(); Assert.IsNotNull(response); Assert.AreEqual("00", response.ResponseCode); }
public void Test_006_credit_manual_refund() { Transaction response = card.Refund(10m) .WithCurrency("USD") .Execute(); Assert.IsNotNull(response); System.Diagnostics.Debug.WriteLine(response.HostResponseDate); System.Diagnostics.Debug.WriteLine(response.SystemTraceAuditNumber); Assert.AreEqual("000", response.ResponseCode); }
public void Refund_Keyed() { // TODO: There is some weirdness around adding the client transaction id to a refund by card. var response = card.Refund(4.01m) .WithCurrency("USD") .WithInvoiceNumber("1701") //.WithClientTransactionId("165901") .WithAddress(address) .Execute(); Assert.IsNotNull(response); Assert.AreEqual("00", response.ResponseCode); }
public IActionResult CreditApi(Datos detalles) { // configure client & request settings ServicesContainer.ConfigureService(new GatewayConfig { MerchantId = "addonnettest", AccountId = "api", SharedSecret = "secret", RefundPassword = "******", ServiceUrl = "https://remote.sandbox.addonpayments.com/remote" }); // create the card object var card = new CreditCardData { Number = detalles.Tarjeta.cardNumber, ExpMonth = detalles.Tarjeta.month, ExpYear = detalles.Tarjeta.year, CardHolderName = detalles.Tarjeta.cardholderName }; try { // process an auto-capture authorization Transaction response = card.Refund(detalles.Tarjeta.importe) .WithCurrency("EUR") .Execute(); var result = response.ResponseCode; // 00 == Success var message = response.ResponseMessage; // [ test system ] AUTHORISED // get the response details to save to the DB for future requests var orderId = response.OrderId; // ezJDQjhENTZBLTdCNzNDQw var authCode = response.AuthorizationCode; // 12345 var paymentsReference = response.TransactionId; // pasref 14622680939731425 Respuesta respuesta = new Respuesta { result = result, message = message, orderId = orderId, authCode = authCode, paymentsReference = paymentsReference }; return(Ok(respuesta)); } catch (ApiException exce) { RespuestaError respuesta = new RespuestaError { resultado = "Error en el envío de datos <br><br>" + exce }; return(BadRequest(respuesta)); } }
public void CreditDccRateRefundStandalone() { var dccDetails = card.GetDccRate() .WithAmount(Amount) .WithCurrency(CURRENCY) .Execute(); var expectedDccAmountValue = GetDccAmount(dccDetails); AssertDccInfoResponse(dccDetails, expectedDccAmountValue); waitForGpApiReplication(); var response = card.Refund(Amount) .WithCurrency(CURRENCY) .WithDccRateData(dccDetails.DccRateData) .Execute(); AssertTransactionResponse(response, TransactionStatus.Captured, expectedDccAmountValue); }
public void Refund_Vault() { // TODO: There is some weirdness around adding the client transaction id to a refund by card. var response = tokenizedCard.Refund(1.83m) .WithCurrency("USD") .WithCashBack(0m) .WithConvenienceAmount(0m) //.WithTaxAmount(0m) .WithInvoiceNumber("1559") //PoNumber //CustomerCode //.WithClientTransactionId("166909") .WithAllowPartialAuth(false) .WithAllowDuplicates(false) .Execute(); Assert.IsNotNull(response); Assert.AreEqual("00", response.ResponseCode); }