Ejemplo n.º 1
0
        public void AddSchedule()
        {
            var id   = GenerateScheduleId();
            var date = GetLastDayOfMonth();

            var schedule = new HpsPayPlanSchedule
            {
                ScheduleIdentifier = id,
                CustomerKey        = _paymentMethod.CustomerKey,
                PaymentMethodKey   = _paymentMethod.PaymentMethodKey,
                SubtotalAmount     = new HpsPayPlanAmount("100"),
                StartDate          = date,
                Frequency          = HpsPayPlanScheduleFrequency.Weekly,
                Duration           = HpsPayPlanScheduleDuration.LimitedNumber,
                NumberOfPayments   = 3,
                ReprocessingCount  = 2,
                EmailReceipt       = "Never",
                EmailAdvanceNotice = "No",
                ScheduleStatus     = HpsPayPlanScheduleStatus.Active
            };

            var result = _payPlanService.AddSchedule(schedule);

            Assert.IsNotNull(result);
            Assert.IsNotNull(result.ScheduleKey);
        }
Ejemplo n.º 2
0
        public void recurring_008_AddScheduleCreditVisa()
        {
            if (_customerPersonKey == null || _paymentMethodKeyVisa == null)
            {
                Assert.Inconclusive();
            }

            var schedule = new HpsPayPlanSchedule {
                ScheduleIdentifier = GetIdentifier("CreditV"),
                CustomerKey        = _customerPersonKey,
                ScheduleStatus     = HpsPayPlanScheduleStatus.Active,
                PaymentMethodKey   = _paymentMethodKeyVisa,
                SubtotalAmount     = new HpsPayPlanAmount("3001"),
                StartDate          = "02012027",
                Frequency          = HpsPayPlanScheduleFrequency.Weekly,
                Duration           = HpsPayPlanScheduleDuration.Ongoing,
                ReprocessingCount  = 1
            };

            var response = _payPlanService.AddSchedule(schedule);

            Assert.IsNotNull(response);
            Assert.IsNotNull(response.ScheduleKey);

            _scheduleKeyVisa = response.ScheduleKey;
        }