Changeset 12276 for main


Ignore:
Timestamp:
21 Dec 2014, 08:41:49 (10 years ago)
Author:
uli
Message:

Add iface for payment gateway services. More docs for IPayment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/payments/interfaces.py

    r12138 r12276  
    1818import decimal
    1919from zope import schema
     20from zope.interface import Interface
    2021from waeup.ikoba.interfaces import (
    2122    IIkobaObject, SimpleIkobaVocabulary, ContextualDictSourceFactoryBase)
     
    3334    (_('Failed'), STATE_FAILED),
    3435    )
     36
     37
     38class IPaymentGatewayService(Interface):
     39    """A financial gateway service.
     40
     41    Any gateway provider might provide several services. For instance
     42    payments by credit card, scratch card, bank transfer, etc. An
     43    `IPaymentGatewayService` represents one of those services.
     44
     45    Payment services are normally registered as a named global
     46    utility.
     47    """
     48    title = schema.TextLine(
     49        title=u'Title',
     50        description=u'Human readable name of gateway service.',
     51        required=True,
     52        )
    3553
    3654
     
    5270    """A base representation of payments.
    5371
     72    In a payment, a payer payes someone (the payee) for something, the
     73    item to pay.
     74
     75    We currently support only the case where one payer pays one payee
     76    for one item. The item might include taxes, handling,
     77    shipping, etc.
     78
     79    As in RL any payment is actually performed by some financial
     80    service provider (like paypal, interswitch, etc.), each of which
     81    might provide several types of payments (credit card, scratch
     82    card, you name it).
     83
     84    In Ikoba we call financial service providers 'gateway' and their
     85    types of services are handled as gateway types. Therefore PayPal
     86    handling a credit card payment is different from PayPal handling a
     87    regular PayPal account transaction.
     88
    5489    A payment can be approve()d, which means the act of paying was
    55     really performed. It can also fail for any reason.
    56 
     90    really performed. It can also fail for any reason, in which case
     91    we mark the payment 'failed'.
    5792    """
    5893    payment_id = schema.TextLine(
     
    69104
    70105    payed_item_id = schema.TextLine(
    71         title=u'Payed Item',
     106        title=u'Payed Item ID',
    72107        default=None,
    73108        required=True,
Note: See TracChangeset for help on using the changeset viewer.