public RefundResponse Refund(RefundRequest refundRequest) { PaymentServiceBase payment = PaymentServiceFactory.GetPaymentServiceFrom(refundRequest.Payment); RefundResponse response = payment.Refund(refundRequest.RefundAmount, refundRequest.PaymentTransactionId); return(response); }
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); }
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); }