示例#1
0
        //public async Task<Sale> CancelSale(string paymentId)
        //{
        //    return await CancelSale(paymentId);
        //}

        public async Task <Sale> CaptureSaleAsync(string paymentId, decimal?amount = null, decimal?serviceTaxAmount = null)
        {
            var updateSaleRequest = new UpdateSaleRequest("capture", _merchant, _environment);

            updateSaleRequest.Amount           = amount;
            updateSaleRequest.ServiceTaxAmount = serviceTaxAmount;

            return(await updateSaleRequest.ExecuteAsync(paymentId));
        }
示例#2
0
        public async Task <Sale> CancelSaleAsync(string paymentId, double?amount = null)
        {
            var updateSaleRequest = new UpdateSaleRequest("void", _merchant, _environment);

            return(await updateSaleRequest.ExecuteAsync(paymentId));
        }