Beispiel #1
0
    def _post(self, status, t_status, fake=False, user_changed_email=False):
        self.create_request()
        control = self.control
        if fake:
            control += 'fake'


        if user_changed_email:
            email = '*****@*****.**'
        else:
            email = self.param['email']

        md5 = generate_md5(control, self.param['t_id'], self.param['kwota'], t_status, email)
        request = self.req.post(reverse('dotpay_receiver'), {'id': DOTID,
                                     'status':status,
                                     'control':self.control,
                                     't_id':self.param['t_id'],
                                     'amount': self.param['kwota'],
                                     'orginal_amount': self.param['kwota'],
                                     'email': email,
                                     't_status':t_status,
                                     'description':self.param['opis'],
                                     'md5':md5,
                                     't_date':datetime.now()})

        request.META['REMOTE_ADDR'] = DOTPAY_SERVERS[0]
        return request
Beispiel #2
0
    def _post(self, status, t_status, fake=False, user_changed_email=False):
        self.create_request()
        control = self.control
        if fake:
            control += 'fake'

        if user_changed_email:
            email = '*****@*****.**'
        else:
            email = self.param['email']

        md5 = generate_md5(control, self.param['t_id'], self.param['kwota'],
                           t_status, email)
        request = self.req.post(
            reverse('dotpay_receiver'), {
                'id': DOTID,
                'status': status,
                'control': self.control,
                't_id': self.param['t_id'],
                'amount': self.param['kwota'],
                'orginal_amount': self.param['kwota'],
                'email': email,
                't_status': t_status,
                'description': self.param['opis'],
                'md5': md5,
                't_date': datetime.now()
            })

        request.META['REMOTE_ADDR'] = DOTPAY_SERVERS[0]
        return request
Beispiel #3
0
 def _gen_md5(self):
     return generate_md5(self.control, self.t_id, self.amount,
                         self.t_status, self.email)
Beispiel #4
0
 def _gen_md5(self):
     return generate_md5(self.control, self.t_id, self.amount, self.t_status, self.email)