# Path: payway/accounts/models.py
# class ResponsePayment(InheritanceCastModel, AbstractPayment):
#     """
#     Parent response model
#     """
#     OK_STATUS = Choices((True, 'SUCCESS', _('success')), (False, 'FAIL', _('fail')))
# 
#     is_OK = models.BooleanField(choices=OK_STATUS, default=OK_STATUS.FAIL)
# 
#     class Meta:
#         db_table = 'payway_response_payments'
# 
#     def __unicode__(self):
#         return u'id:{0} is_ok:{2}'.format(self.id, self.money_amount, self.is_OK)


from django.db import models
from django.utils.translation import ugettext_lazy as _
from model_utils import Choices
from moneyed.classes import CURRENCIES
from payway.accounts.models import ResponsePayment
# -*- coding: UTF-8 -*-


__author__ = 'Razzhivin Alexander'
__email__ = 'admin@httpbots.com'

CURRENCY_CHOICES = [(CURRENCIES['RUB'].code, CURRENCIES['RUB'].name)]

class Purse(models.Model):
    purse = models.CharField(_('purse'), max_length=13, unique=True)
    secret_key = models.CharField(_('secret key'), max_length=50)
    is_active = models.BooleanField(_('is active'), default=False)
    currency = models.CharField(_('currency'), max_length=3, choices=CURRENCY_CHOICES)

    class Meta:
        db_table = 'payway_webmoney_purses'

    def __unicode__(self):
        return '%s' % self.purse



# Path: payway/accounts/models.py
# class ResponsePayment(InheritanceCastModel, AbstractPayment):
#     """
#     Parent response model
#     """
#     OK_STATUS = Choices((True, 'SUCCESS', _('success')), (False, 'FAIL', _('fail')))
# 
#     is_OK = models.BooleanField(choices=OK_STATUS, default=OK_STATUS.FAIL)
# 
#     class Meta:
#         db_table = 'payway_response_payments'
# 
#     def __unicode__(self):
#         return u'id:{0} is_ok:{2}'.format(self.id, self.money_amount, self.is_OK)


# Path: payway/webmoney/models.py
from django.db import models
from django.utils.translation import ugettext_lazy as _
from model_utils import Choices
from moneyed.classes import CURRENCIES
from payway.accounts.models import ResponsePayment

# -*- coding: UTF-8 -*-


__author__ = 'Razzhivin Alexander'
__email__ = 'admin@httpbots.com'

CURRENCY_CHOICES = [(CURRENCIES['RUB'].code, CURRENCIES['RUB'].name)]

class Purse(models.Model):
    purse = models.CharField(_('purse'), max_length=13, unique=True)
    secret_key = models.CharField(_('secret key'), max_length=50)
    is_active = models.BooleanField(_('is active'), default=False)
    currency = models.CharField(_('currency'), max_length=3, choices=CURRENCY_CHOICES)

    class Meta:
        db_table = 'payway_webmoney_purses'

    def __unicode__(self):
        return '%s' % self.purse



class ResultResponsePayment(ResponsePayment):