Changeset 12134
- Timestamp:
- 4 Dec 2014, 02:29:29 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/payments/payment.py
r12114 r12134 19 19 These are the payment tickets. 20 20 """ 21 import decimal 21 22 import grok 23 import uuid 22 24 from datetime import datetime 23 25 from grok import index … … 28 30 from waeup.ikoba.interfaces import MessageFactory as _ 29 31 from waeup.ikoba.payments.interfaces import ( 30 IPayment, IOnlinePayment, 32 IPayment, IOnlinePayment, STATE_UNPAID, STATE_FAILED, STATE_PAID, 31 33 payment_states) 32 34 from waeup.ikoba.utils.helpers import attrs_to_fields, get_current_principal … … 53 55 super(Payment, self).__init__() 54 56 self.creation_date = datetime.utcnow() 55 self.p_id = u'' # XXX: Get a unique id here 57 self.payment_date = None 58 self.payment_id = u'PAY_' + unicode(uuid.uuid4().hex) 59 self.amount = decimal.Decimal("0.00") 60 self.payed_item_id = None 61 self.payer_id = None 62 self.state = STATE_UNPAID 56 63 return 57 64
Note: See TracChangeset for help on using the changeset viewer.