RajatShukla / getpaid

Automatically exported from code.google.com/p/getpaid
0 stars 0 forks source link

acceptedCreditCardTypes no attribute 'context' #258

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1)
a minimal buildout.cfg with
zcml =
   getpaid.ogone
   getpaid.ogone-overrides

[getpaid]
recipe=getpaid.recipe.release
addpackages=
   getpaid.flatrateshipping
   getpaid.ogone

plus Products.Clouseau
2) new Plone site, install PlonegetPaid
3)
 - set FlatRateShipping  as a Shipping Method in
@@manage-getpaid-shipping-methods
 - any processor in @@manage-getpaid-payment-options Test or Ogone
4)  make shippable the front-page
---------
5) open a Python prompt

from zope import component
from getpaid.core import interfaces
from getpaid.flatrateshipping.interfaces import IFlatRateShippingSettings

ccte = component.getAdapter(IFlatRateShippingSettings)
>>>
<Products.PloneGetPaid.payment.CreditCardTypeEnumerator object at 0xe4caacc>

ccte.acceptedCreditCardTypes
>>
<bound method CreditCardTypeEnumerator.acceptedCreditCardTypes of
<Products.PloneGetPaid.payment.CreditCardTypeEnumerator object at
0xf014f6c>>

then

ccte.acceptedCreditCardTypes ()

>>  File
"/home/dan/Plone0/buildout-cache/eggs/Products.PloneGetPaid-0.7.5-py2.4.egg/Prod
ucts/PloneGetPaid/payment.py",
line 15, in 
   portal = getToolByName(self.context.context,
'portal_url').getPortalObject()
AttributeError: 'InterfaceClass' object has no attribute 'context'

Original issue reported on code.google.com by danielle...@gmail.com on 23 Apr 2009 at 5:56