コード例 #1
0
        public ConfiguredServiceTransaction Refund(CreditCardRefundRequest request)
        {
            var parameters = ServiceHelper.CreateServiceParameters(request, this.ServiceName.ToString());
            var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);

            configuredServiceTransaction.BaseTransaction.AddService(this.ServiceName.ToString(), parameters, "refund");

            return(configuredServiceTransaction);
        }
コード例 #2
0
ファイル: SageGateway.cs プロジェクト: thewruck/bvcms
        public TransactionResponse RefundCreditCard(string reference, decimal amt, string lastDigits = "")
        {
            var refundRequest = new CreditCardRefundRequest(_id, _key, reference, amt);
            var response      = refundRequest.Execute();

            return(new TransactionResponse
            {
                Approved = response.ApprovalIndicator == ApprovalIndicator.Approved,
                AuthCode = response.Code,
                Message = response.Message,
                TransactionId = response.Reference
            });
        }
コード例 #3
0
        public TransactionResponse RefundCreditCard(string reference, decimal amt, string lastDigits = "")
        {
            var creditCardRefundRequest = new CreditCardRefundRequest(_userName, _password, reference, amt);
            var response = creditCardRefundRequest.Execute();

            return(new TransactionResponse
            {
                Approved = response.ResponseStatus == ResponseStatus.Approved,
                AuthCode = response.AuthCode,
                Message = response.ResponseText,
                TransactionId = response.TransactionId
            });
        }