/// <summary> /// Convert SettlementPaymentModel.Payment to SettlementPaymentDto /// </summary>, /// <param name="payment">SettlementPaymentModel.Payment</param> /// <returns>SettlementPaymentDto</returns> public static SettlementPaymentDto ConvertToSettlementPaymentDto(SettlementPaymentModel.Payment payment) { return payment != null ? new SettlementPaymentDto { PaymentGatewayTransactionId = payment.PaymentGatewayTransactionId, PaymentServiceProviderFee= payment.PaymentServiceProviderFee, MerchantFee = payment.MerchantFee, ResponseTransactionId =payment.ResponseTransactionId, IvrApplied = payment.IvrApplied, PayPalApplied = payment.PayPalApplied, Authcode = payment.Authcode, VoucherDiscountCode = payment.VoucherDiscountCode, ActionCode = payment.ActionCode, PaymentGatewayName = payment.PaymentGatewayName, MerchantPSPID = payment.MerchantPSPID, IsMerchant = payment.IsMerchant }: null; }
/// <summary> /// Get payment data from Payment Service /// </summary> /// <param name="paymentRequest">PaymentRequest</param> /// <returns>Collection of SettlementPaymentDto</returns> public virtual List<SettlementPaymentDto> GetSettlementPayment(SettlementPaymentModel.PaymentRequest paymentRequest) { List<SettlementPaymentDto> settlementPaymentDtos = null; ServiceProxyManager.Execute<ServiceClient<IPaymentService>, IPaymentService>(proxy => settlementPaymentDtos = proxy.Proxy.GetPayment(paymentRequest)); return settlementPaymentDtos; }