public static void profileTransRefundType(profileTransRefundType request) { if (null != request) { lineItemType(request.lineItems); } }
/// <summary> /// Refunds a transaction for the specified amount /// </summary> /// <param name="profileID">The profile ID.</param> /// <param name="paymentProfileId">The payment profile id.</param> /// <param name="transactionId">The transaction id.</param> /// <param name="amount">The amount.</param> /// <returns></returns> public IGatewayResponse Refund(string profileID, string paymentProfileId, string transactionId, decimal amount) { var req = new createCustomerProfileTransactionRequest(); var trans = new profileTransRefundType(); trans.amount = amount; trans.customerProfileId = profileID; trans.customerPaymentProfileId = paymentProfileId; trans.transId = transactionId; req.transaction = new profileTransactionType(); req.transaction.Item = trans; var response = (createCustomerProfileTransactionResponse)_gateway.Send(req); return(new GatewayResponse(response.directResponse.Split(','))); }