Example #1
0
 public DonationDTO()
 {
     Source = new DonationSourceDTO();
 }
Example #2
0
 public DonationDTO()
 {
     Source = new DonationSourceDTO();
 }
Example #3
0
        private void PopulateStripeInfoOnRecurringGiftSource(DonationSourceDTO donationSource)
        {
            var source = _paymentService.GetSource(donationSource.PaymentProcessorId, donationSource.ProcessorAccountId);
            if (source == null)
            {
                return;
            }

            donationSource.PostalCode = source.address_zip;
            donationSource.RoutingNumber = source.routing_number;
            if (!string.IsNullOrWhiteSpace(source.exp_month) && !string.IsNullOrWhiteSpace(source.exp_year))
            {
                donationSource.ExpirationDate = DateTime.ParseExact(string.Format("{0}/01/{1}", source.exp_month, source.exp_year), "M/dd/yyyy", DateTimeFormatInfo.CurrentInfo);
            }
        }