def test_012_add_schedule_credit_visa(self):
        schedule = HpsPayPlanSchedule()
        schedule.schedule_identifier = self.get_identifier('CreditV')
        schedule.customer_key = self.__class__.customer_person_key
        schedule.schedule_status = HpsPayPlanScheduleStatus.ACTIVE
        schedule.payment_method_key = self.__class__.payment_method_key_visa
        schedule.subtotal_amount = HpsPayPlanAmount(1008)
        schedule.start_date = '02012027'
        schedule.frequency = HpsPayPlanScheduleFrequency.WEEKLY
        schedule.duration = HpsPayPlanScheduleDuration.ONGOING
        schedule.reprocessing_count = 2

        self.assertRaises(HpsException, self.service.add_schedule, schedule)
    def test_011_add_schedule_check_ccd(self):
        schedule = HpsPayPlanSchedule()
        schedule.schedule_identifier = self.get_identifier('CheckCCD')
        schedule.customer_key = self.__class__.customer_company_key
        schedule.schedule_status = HpsPayPlanScheduleStatus.ACTIVE
        schedule.payment_method_key = self.__class__.payment_method_key_check_ccd
        schedule.subtotal_amount = HpsPayPlanAmount(3004)
        schedule.start_date = '02012027'
        schedule.frequency = HpsPayPlanScheduleFrequency.BIWEEKLY
        schedule.duration = HpsPayPlanScheduleDuration.ONGOING
        schedule.reprocessing_count = 1

        response = self.service.add_schedule(schedule)
        self.assertIsNotNone(response)
        self.assertIsNotNone(response.schedule_key)
        self.__class__.schedule_key_check_ccd = response.schedule_key
    def test_008_add_schedule_credit_visa(self):
        schedule = HpsPayPlanSchedule()
        schedule.schedule_identifier = self.get_identifier('CreditV')
        schedule.customer_key = self.__class__.customer_person_key
        schedule.schedule_status = HpsPayPlanScheduleStatus.ACTIVE
        schedule.payment_method_key = self.__class__.payment_method_key_visa
        schedule.subtotal_amount = HpsPayPlanAmount(3001)
        schedule.start_date = '02012027'
        schedule.frequency = HpsPayPlanScheduleFrequency.WEEKLY
        schedule.duration = HpsPayPlanScheduleDuration.ONGOING
        schedule.reprocessing_count = 1

        response = self.service.add_schedule(schedule)
        self.assertIsNotNone(response)
        self.assertIsNotNone(response.schedule_key)
        self.__class__.schedule_key_visa = response.schedule_key
    def test_013_add_schedule_check_ppd(self):
        schedule = HpsPayPlanSchedule()
        schedule.schedule_identifier = self.get_identifier('CheckPPD')
        schedule.customer_key = self.__class__.customer_person_key
        schedule.schedule_status = HpsPayPlanScheduleStatus.ACTIVE
        schedule.payment_method_key = self.__class__.payment_method_key_check_ppd
        schedule.subtotal_amount = HpsPayPlanAmount(2501)
        schedule.start_date = '02012027'
        schedule.frequency = HpsPayPlanScheduleFrequency.WEEKLY
        schedule.duration = HpsPayPlanScheduleDuration.LIMITED_NUMBER
        schedule.reprocessing_count = 1
        schedule.number_of_payments = 2
        schedule.processing_date_info = '1'

        self.assertRaises(HpsException, self.service.add_schedule, schedule)
    def test_010_add_schedule_check_ppd(self):
        schedule = HpsPayPlanSchedule()
        schedule.schedule_identifier = self.get_identifier('CheckPPD')
        schedule.customer_key = self.__class__.customer_person_key
        schedule.schedule_status = HpsPayPlanScheduleStatus.ACTIVE
        schedule.payment_method_key = self.__class__.payment_method_key_check_ppd
        schedule.subtotal_amount = HpsPayPlanAmount(3003)
        schedule.start_date = '02012027'
        schedule.frequency = HpsPayPlanScheduleFrequency.MONTHLY
        schedule.duration = HpsPayPlanScheduleDuration.LIMITED_NUMBER
        schedule.reprocessing_count = 1
        schedule.number_of_payments = 2
        schedule.processing_date_info = '1'

        response = self.service.add_schedule(schedule)
        self.assertIsNotNone(response)
        self.assertIsNotNone(response.schedule_key)
        self.__class__.schedule_key_check_ppd = response.schedule_key
    def test_009_add_schedule_credit_mastercard(self):
        schedule = HpsPayPlanSchedule()
        schedule.schedule_identifier = self.get_identifier('CreditMC')
        schedule.customer_key = self.__class__.customer_person_key
        schedule.schedule_status = HpsPayPlanScheduleStatus.ACTIVE
        schedule.payment_method_key = self.__class__.payment_method_key_mastercard
        schedule.subtotal_amount = HpsPayPlanAmount(3002)
        schedule.start_date = '02012027'
        schedule.frequency = HpsPayPlanScheduleFrequency.WEEKLY
        schedule.duration = HpsPayPlanScheduleDuration.END_DATE
        schedule.end_date = '04012027'
        schedule.reprocessing_count = 2

        response = self.service.add_schedule(schedule)
        self.assertIsNotNone(response)
        self.assertIsNotNone(response.schedule_key)
        self.__class__.schedule_key_mastercard = response.schedule_key
    def test_add(self):
        schedule = HpsPayPlanSchedule()
        schedule.schedule_identifier = self.get_schedule_identifier()
        schedule.customer_key = self.payment_method.customer_key
        schedule.payment_method_key = self.payment_method.payment_method_key
        schedule.subtotal_amount = HpsPayPlanAmount(100)
        schedule.start_date = self.last_day_of_the_month()
        schedule.frequency = HpsPayPlanScheduleFrequency.WEEKLY
        schedule.duration = HpsPayPlanScheduleDuration.LIMITED_NUMBER
        schedule.number_of_payments = 3
        schedule.reprocessing_count = 2
        schedule.email_receipt = 'Never'
        schedule.email_advance_notice = 'No'
        schedule.schedule_status = HpsPayPlanScheduleStatus.ACTIVE

        response = self.service.add_schedule(schedule)
        self.assertIsNotNone(response)
        self.assertIsNotNone(response.schedule_key)
    def test_012_add_schedule_credit_visa(self):
        schedule = HpsPayPlanSchedule()
        schedule.schedule_identifier = self.get_identifier('CreditV')
        schedule.customer_key = self.__class__.customer_person_key
        schedule.schedule_status = HpsPayPlanScheduleStatus.ACTIVE
        schedule.payment_method_key = self.__class__.payment_method_key_visa
        schedule.subtotal_amount = HpsPayPlanAmount(1008)
        schedule.start_date = '02012027'
        schedule.frequency = HpsPayPlanScheduleFrequency.WEEKLY
        schedule.duration = HpsPayPlanScheduleDuration.ONGOING
        schedule.reprocessing_count = 2

        self.assertRaises(HpsException, self.service.add_schedule, schedule)
    def test_013_add_schedule_check_ppd(self):
        schedule = HpsPayPlanSchedule()
        schedule.schedule_identifier = self.get_identifier('CheckPPD')
        schedule.customer_key = self.__class__.customer_person_key
        schedule.schedule_status = HpsPayPlanScheduleStatus.ACTIVE
        schedule.payment_method_key = self.__class__.payment_method_key_check_ppd
        schedule.subtotal_amount = HpsPayPlanAmount(2501)
        schedule.start_date = '02012027'
        schedule.frequency = HpsPayPlanScheduleFrequency.WEEKLY
        schedule.duration = HpsPayPlanScheduleDuration.LIMITED_NUMBER
        schedule.reprocessing_count = 1
        schedule.number_of_payments = 2
        schedule.processing_date_info = '1'

        self.assertRaises(HpsException, self.service.add_schedule, schedule)
    def test_011_add_schedule_check_ccd(self):
        schedule = HpsPayPlanSchedule()
        schedule.schedule_identifier = self.get_identifier('CheckCCD')
        schedule.customer_key = self.__class__.customer_company_key
        schedule.schedule_status = HpsPayPlanScheduleStatus.ACTIVE
        schedule.payment_method_key = self.__class__.payment_method_key_check_ccd
        schedule.subtotal_amount = HpsPayPlanAmount(3004)
        schedule.start_date = '02012027'
        schedule.frequency = HpsPayPlanScheduleFrequency.BIWEEKLY
        schedule.duration = HpsPayPlanScheduleDuration.ONGOING
        schedule.reprocessing_count = 1

        response = self.service.add_schedule(schedule)
        self.assertIsNotNone(response)
        self.assertIsNotNone(response.schedule_key)
        self.__class__.schedule_key_check_ccd = response.schedule_key
    def test_010_add_schedule_check_ppd(self):
        schedule = HpsPayPlanSchedule()
        schedule.schedule_identifier = self.get_identifier('CheckPPD')
        schedule.customer_key = self.__class__.customer_person_key
        schedule.schedule_status = HpsPayPlanScheduleStatus.ACTIVE
        schedule.payment_method_key = self.__class__.payment_method_key_check_ppd
        schedule.subtotal_amount = HpsPayPlanAmount(3003)
        schedule.start_date = '02012027'
        schedule.frequency = HpsPayPlanScheduleFrequency.MONTHLY
        schedule.duration = HpsPayPlanScheduleDuration.LIMITED_NUMBER
        schedule.reprocessing_count = 1
        schedule.number_of_payments = 2
        schedule.processing_date_info = '1'

        response = self.service.add_schedule(schedule)
        self.assertIsNotNone(response)
        self.assertIsNotNone(response.schedule_key)
        self.__class__.schedule_key_check_ppd = response.schedule_key
    def test_009_add_schedule_credit_mastercard(self):
        schedule = HpsPayPlanSchedule()
        schedule.schedule_identifier = self.get_identifier('CreditMC')
        schedule.customer_key = self.__class__.customer_person_key
        schedule.schedule_status = HpsPayPlanScheduleStatus.ACTIVE
        schedule.payment_method_key = self.__class__.payment_method_key_mastercard
        schedule.subtotal_amount = HpsPayPlanAmount(3002)
        schedule.start_date = '02012027'
        schedule.frequency = HpsPayPlanScheduleFrequency.WEEKLY
        schedule.duration = HpsPayPlanScheduleDuration.END_DATE
        schedule.end_date = '04012027'
        schedule.reprocessing_count = 2

        response = self.service.add_schedule(schedule)
        self.assertIsNotNone(response)
        self.assertIsNotNone(response.schedule_key)
        self.__class__.schedule_key_mastercard = response.schedule_key
    def test_008_add_schedule_credit_visa(self):
        schedule = HpsPayPlanSchedule()
        schedule.schedule_identifier = self.get_identifier('CreditV')
        schedule.customer_key = self.__class__.customer_person_key
        schedule.schedule_status = HpsPayPlanScheduleStatus.ACTIVE
        schedule.payment_method_key = self.__class__.payment_method_key_visa
        schedule.subtotal_amount = HpsPayPlanAmount(3001)
        schedule.start_date = '02012027'
        schedule.frequency = HpsPayPlanScheduleFrequency.WEEKLY
        schedule.duration = HpsPayPlanScheduleDuration.ONGOING
        schedule.reprocessing_count = 1

        response = self.service.add_schedule(schedule)
        self.assertIsNotNone(response)
        self.assertIsNotNone(response.schedule_key)
        self.__class__.schedule_key_visa = response.schedule_key
Esempio n. 14
0
    def test_add(self):
        schedule = HpsPayPlanSchedule()
        schedule.schedule_identifier = self.get_schedule_identifier()
        schedule.customer_key = self.payment_method.customer_key
        schedule.payment_method_key = self.payment_method.payment_method_key
        schedule.subtotal_amount = HpsPayPlanAmount(100)
        schedule.start_date = self.last_day_of_the_month()
        schedule.frequency = HpsPayPlanScheduleFrequency.WEEKLY
        schedule.duration = HpsPayPlanScheduleDuration.LIMITED_NUMBER
        schedule.number_of_payments = 3
        schedule.reprocessing_count = 2
        schedule.email_receipt = 'Never'
        schedule.email_advance_notice = 'No'
        schedule.schedule_status = HpsPayPlanScheduleStatus.ACTIVE

        response = self.service.add_schedule(schedule)
        self.assertIsNotNone(response)
        self.assertIsNotNone(response.schedule_key)