Пример #1
0
    def debug(self, id='13', sum='666', test='0', v1='*****@*****.**'):
        from the_tale.finances.xsolla.logic import check_user_md5, pay_md5, cancel_md5

        check_url = url('bank:xsolla:command',
                        command=COMMAND_TYPE.CHECK.value,
                        v1=v1,
                        md5=check_user_md5(COMMAND_TYPE.CHECK, v1))

        pay_url = url('bank:xsolla:command',
                      command=COMMAND_TYPE.PAY.value,
                      v1=v1,
                      id=id,
                      sum=sum,
                      test=test,
                      md5=pay_md5(COMMAND_TYPE.PAY, v1, id))

        cancel_url = url('bank:xsolla:command',
                         command=COMMAND_TYPE.CANCEL.value,
                         id=id,
                         md5=cancel_md5(COMMAND_TYPE.CANCEL, id))

        return self.json_ok(data={
            'check_url': check_url,
            'pay_url': pay_url,
            'cancel_url': cancel_url
        })
Пример #2
0
    def debug(self, id='13', sum='666', test='0', v1='*****@*****.**'):
        from the_tale.finances.xsolla.logic import check_user_md5, pay_md5, cancel_md5

        check_url = url('bank:xsolla:command',
                        command=COMMAND_TYPE.CHECK.value,
                        v1=v1,
                        md5=check_user_md5(COMMAND_TYPE.CHECK, v1) )

        pay_url = url('bank:xsolla:command',
                      command=COMMAND_TYPE.PAY.value,
                      v1=v1,
                      id=id,
                      sum=sum,
                      test=test,
                      md5=pay_md5(COMMAND_TYPE.PAY, v1, id) )

        cancel_url = url('bank:xsolla:command',
                        command=COMMAND_TYPE.CANCEL.value,
                        id=id,
                        md5=cancel_md5(COMMAND_TYPE.CANCEL, id) )

        return self.json_ok(data={'check_url': check_url,
                                  'pay_url': pay_url,
                                  'cancel_url': cancel_url})
Пример #3
0
 def setUp(self):
     super(CancelLogicTests, self).setUp()
     self.xsolla_id = '666'
     self.cancel_md5 = cancel_md5(command=COMMAND_TYPE.CANCEL,
                                  id=self.xsolla_id)
Пример #4
0
 def setUp(self):
     super(CancelRequestsTests, self).setUp()
     self.xsolla_id = '666'
     self.cancel_md5 = cancel_md5(command=COMMAND_TYPE.CANCEL, id=self.xsolla_id)