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

Add payment provider services lookup.

File:
1 edited

Legend:

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

    r12163 r12277  
    2323import uuid
    2424from datetime import datetime
     25from zope.component import getUtilitiesFor
    2526from zope.event import notify
    2627from waeup.ikoba.payments.interfaces import (
    2728    IPayment, STATE_UNPAID, STATE_FAILED, STATE_PAID,
     29    IPaymentGatewayService,
    2830    )
    2931from waeup.ikoba.utils.logger import Logger
     32
     33
     34def get_payment_providers():
     35    """Get all services of payment gateways registered.
     36    """
     37    return dict(
     38        getUtilitiesFor(IPaymentGatewayService)
     39        )
     40
     41
     42class PaymentProviderServiceBase(grok.GlobalUtility):
     43
     44    grok.baseclass()
     45    grok.implements(IPaymentGatewayService)
     46
     47    title = u'Sample Credit Card Service'
    3048
    3149
Note: See TracChangeset for help on using the changeset viewer.