Пример #1
0
        public RefundResponse Refund(RefundRequest refundRequest)
        {
            PaymentServiceBase payment  = PaymentServiceFactory.GetPaymentServiceFrom(refundRequest.Payment);
            RefundResponse     response = payment.Refund(refundRequest.RefundAmount, refundRequest.PaymentTransactionId);

            return(response);
        }
Пример #2
0
        public override RefundResponse Refund(decimal amount, string transactionId)
        {
            RefundResponse         refundResponse = new RefundResponse();
            MockWorldPayWebService service        = new MockWorldPayWebService();
            string response = service.MakeRefund(amount, transactionId, AccountId, AccountPassword, ProductId);

            refundResponse.Message = response;
            refundResponse.Success = response.Contains("Auth");

            return(refundResponse);
        }
Пример #3
0
        public override RefundResponse Refund(decimal amount, string transactionId)
        {
            RefundResponse       refundResponse = new RefundResponse();
            MockPayPalWebService service        = new MockPayPalWebService();
            string token    = service.ObtainToken(AccountName, Password);
            string response = service.MakeRefund(amount, transactionId, token);

            refundResponse.Message = response;
            refundResponse.Success = response.Contains("A_Success");

            return(refundResponse);
        }