public void ProcessRefundTest() { string requestUrl = string.Empty; // TODO: Initialize to an appropriate value string loginId = string.Empty; // TODO: Initialize to an appropriate value string transactionKey = string.Empty; // TODO: Initialize to an appropriate value ICustomer customer = null; // TODO: Initialize to an appropriate value CreditCardInfo card = null; // TODO: Initialize to an appropriate value Decimal amount = new Decimal(); // TODO: Initialize to an appropriate value bool testTransaction = false; // TODO: Initialize to an appropriate value ANetRequest target = new ANetRequest(requestUrl, loginId, transactionKey, customer, card, amount, testTransaction); // TODO: Initialize to an appropriate value ANetResponse expected = null; // TODO: Initialize to an appropriate value ANetResponse actual; actual = target.ProcessRefund(); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public override void Refund(GatewayInfo gateway, GatewayTypeInfo gatewayType, Guid orderId, ICustomer customer, CreditCardInfo card, string refID, TransactionInfo transaction, bool testTransaction) { ANetRequest request = null; ANetResponse response = null; string requestUrl = testTransaction == true ? gatewayType.TestUrl : gatewayType.LiveUrl; string loginId = testTransaction == true ? gatewayType.TestLoginId : gateway.LoginId; string transactionKey = testTransaction == true ? gatewayType.TestTransactionKey : gateway.TransactionKey; request = new ANetRequest(requestUrl, loginId, transactionKey, customer, card, refID, transaction, testTransaction, transaction.Amount); response = request.ProcessRefund(); if (response.Code == ANetResponseCode.Approved) { transaction.Status = TransactionStatus.Refunded; } }