Exemplo n.º 1
0
        /// <summary>
        /// Get Payment informations
        /// </summary>
        /// <param name="bookingReference">bookingReference</param>
        /// <returns>Collection Payments</returns>
        public List<Payment> GetPayments(string bookingReference)
        {
            List<Payment> payments = new List<Payment>();

            using (var bookingService = new BookingService.BookingServiceSoapClient(EndpointName))
            {
                var paymentInfos = bookingService.RetrievePaymentInfos(bookingReference);

                if (paymentInfos.PaymentInfoCollection != null)
                {
                    foreach (var payment in paymentInfos.PaymentInfoCollection)
                    {
                        payments.Add(new Payment
                                         {
                                             ActionCode = payment.ActionCode,
                                             Authcode = payment.Authcode,
                                             IvrApplied = payment.IvrApplied,
                                             MerchantFee = payment.MerchantFee,
                                             PayPalApplied = payment.PayPalApplied,
                                             PaymentGatewayTransactionId = payment.PaymentGatewayTransactionId,
                                             PaymentServiceProviderFee = payment.PaymentServiceProviderFee,
                                             ResponseTransactionId = payment.ResponseTransactionId,
                                             VoucherDiscountCode = payment.VoucherDiscountCode
                                         });
                    }
                }
                return payments;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Refund Payment regarding the ABS server transaction Id
 /// </summary>
 /// <param name="serverTransactionId">ABS server transaction Id (Booking reference for Eagle)</param>
 /// <param name="amount">Amount to refund</param>
 /// <returns>True if refund</returns>
 public bool RefundPaymentSimple(string serverTransactionId, decimal amount)
 {
     using (var bookingService = new BookingService.BookingServiceSoapClient(EndpointName))
     {
         return bookingService.RefundPaymentSimple(serverTransactionId, amount);
     }
 }