Exemple #1
0
        /// <summary>
        /// Performs a refund of an existing transaction.
        /// </summary>
        /// <param name="amount">The amount to be refunded as an integer.</param>
        /// <param name="originalTransactionNumber">The original transaction to apply the refund against.</param>
        /// <param name="reference">The reference for the refund.</param>
        /// <returns>Response</returns>
        public static Response <Refund> Create(int amount, string originalTransactionNumber, string reference)
        {
            var req = new Requests.Refund {
                TransactionID = originalTransactionNumber,
                Amount        = amount,
                Reference     = reference,
                TestMode      = Gateway.TestMode
            };

            return(Gateway.Post <Refund>("refunds.json", req));
        }
Exemple #2
0
        /// <summary>
        /// Performs a refund of an existing transaction.
        /// </summary>
        /// <param name="amount">The amount to be refunded as an integer.</param>
        /// <param name="originalTransactionNumber">The original transaction to apply the refund against.</param>
        /// <param name="reference">The reference for the refund.</param>
        /// <returns>Response</returns>
		public static Response<Refund> Create(int amount, string originalTransactionNumber, string reference)
        {
			var req = new Requests.Refund {
				TransactionID = originalTransactionNumber,
				Amount = amount,
				Reference = reference,
				TestMode = Gateway.TestMode
			};

			return Gateway.Post<Refund>("refunds.json", req);
        }