Esempio n. 1
0
    def __init__(self, id):
        logger.debug('transaction %s', id)
        self.transaction = Transaction.objects.get(id=id)
        self.company = UserProfile.objects.get(
            user=self.transaction.user).company

        self.processes = {
            AutoRefill.REFILL_GP:
            ['check_payment', 'get_pin', 'send_notifications'],
            AutoRefill.REFILL_FR: [
                'check_payment', 'get_pin', 'recharge_phone',
                'send_notifications'
            ],
        }
        # checking confirmation from customer
        if not self.transaction.locked and self.transaction.state != Transaction.COMPLETED:
            self.transaction = CheckCustomerApprove(self.transaction.id).main()