示例#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': DOTPAY_ID,
                                                             'status':status,
                                                             'control':self.control,
                                                             'amount': self.param['kwota'],
                                                             'orginal_amount': self.param['kwota'],
                                                             'email': email,
                                                             'description':self.param['opis'],
                                                             'md5':md5,
                                                             't_id':self.param['t_id'],
                                                             't_status':t_status,
                                                             't_date':datetime.now()})

        request.META['REMOTE_ADDR'] = DOTPAY_SERVERS[0]
        return request
示例#2
0
 def gen_md5(self):
     return generate_md5(self.control, self.t_id, self.amount, self.t_status, self.email)