Open GoogleCodeExporter opened 9 years ago
I've just removed setUpWidgets ... and was able to send my first order to Ogone
Original comment by danielle...@gmail.com
on 15 Apr 2009 at 8:56
in the mean time, we can create a separate product to correct some issues.
in the buildout no slugs for ogone, but an overrides.zcml for the new product
starting with
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:five="http://namespaces.zope.org/five"
xmlns:browser="http://namespaces.zope.org/browser"
xmlns:plone="http://namespaces.plone.org/plone"
xmlns:zcml="http://namespaces.zope.org/zcml">
<!--useful zcml for prefix includeOverrides-->
<!-- issue 243 -->
<includeOverrides package="Products.PloneGetPaid"/>
<browser:page
for="*"
name="checkout-review-pay"
class=".browser.checkout.OgoneCheckoutPayment"
permission="zope2.View"
/>
in browser a checkout.py containing
from Products.CMFCore.utils import getToolByName
from Products.PloneGetPaid.browser.checkout import CheckoutReviewAndPay
from getpaid.core.order import Order
from getpaid.core import interfaces
from Products.PloneGetPaid.interfaces import IGetPaidManagementOptions
from zope.component import getAdapter
from zope.formlib import form
from Products.Five.browser.pagetemplatefile import ZopeTwoPageTemplateFile
class OgoneCheckoutPayment(CheckoutReviewAndPay):
"""
We need to override some of the method for the checkout
as the checkout process is different for ogone
create an order, and submit to the processor
no credit card
"""
# with the newer CheckoutReviewAndPay of Products.PloneGetPaid.browser.checkout
@form.action(u"Make Payment", name="make-payment")
def makePayment(self, action, data):
""" create an order, and submit to the processor
"""
siteroot = getToolByName(self.context, "portal_url").getPortalObject()
manage_options = IGetPaidManagementOptions(siteroot)
processor_name = manage_options.payment_processor
if not processor_name:
raise RuntimeError( "No Payment Processor Specified" )
processor = component.getAdapter( siteroot,
interfaces.IPaymentProcessor,
processor_name )
adapters = self.wizard.data_manager.adapters
order = self.createOrder()
order.processor_id = processor_name
Original comment by danielle...@gmail.com
on 18 Dec 2010 at 4:06
Original issue reported on code.google.com by
danielle...@gmail.com
on 8 Apr 2009 at 1:58