# 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
    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):

    class Meta:
        db_table = 'payway_webmoney_resultresponsepayment'

    payment_system = _('Webmoney')

    PAYMENT_MODE = Choices((0, _('real')), (1, _('test')))

    LMI_MODE = models.PositiveSmallIntegerField(choices=PAYMENT_MODE)
    payee_purse =  models.ForeignKey(Purse, related_name='success_payments')

    LMI_SYS_INVS_NO = models.PositiveIntegerField()
    LMI_SYS_TRANS_NO = models.PositiveIntegerField()
    LMI_SYS_TRANS_DATE = models.DateTimeField()
    LMI_PAYMENT_NO = models.PositiveIntegerField()

    LMI_PAYER_PURSE = models.CharField(max_length=13)
    LMI_PAYER_WM = models.CharField(max_length=12)

# 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

    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):

    class Meta:
        db_table = 'payway_webmoney_resultresponsepayment'

    payment_system = _('Webmoney')

    PAYMENT_MODE = Choices((0, _('real')), (1, _('test')))

    LMI_MODE = models.PositiveSmallIntegerField(choices=PAYMENT_MODE)
    payee_purse =  models.ForeignKey(Purse, related_name='success_payments')

    LMI_SYS_INVS_NO = models.PositiveIntegerField()
    LMI_SYS_TRANS_NO = models.PositiveIntegerField()
    LMI_SYS_TRANS_DATE = models.DateTimeField()
    LMI_PAYMENT_NO = models.PositiveIntegerField()

    LMI_PAYER_PURSE = models.CharField(max_length=13)
    LMI_PAYER_WM = models.CharField(max_length=12)

    LMI_HASH = models.CharField(max_length=255)