X-Git-Url: https://svn.cri.ensmp.fr/git/photoprint.git/blobdiff_plain/601e5552ac5a86ac248dbf1079024d56016d5e45..b92ab62e2af2ba6788d1af5b0750f41948fffa68:/order.py?ds=sidebyside diff --git a/order.py b/order.py index 028a73a..6185b9d 100755 --- a/order.py +++ b/order.py @@ -30,6 +30,7 @@ from AccessControl import ClassSecurityInfo from AccessControl.requestmethod import postonly from zope.interface import implements from zope.component.factory import Factory +from persistent.list import PersistentList from OFS.SimpleItem import SimpleItem from ZTUtils import make_query from DateTime import DateTime @@ -41,8 +42,6 @@ from Products.Plinn.utils import getPreferredLanguages from interfaces import IPrintOrderTemplate, IPrintOrder from permissions import ManagePrintOrderTemplate, ManagePrintOrders from price import Price -from utils import Message as _ -from utils import translate from xml.dom.minidom import Document from tool import COPIES_COUNTERS from App.config import getConfiguration @@ -185,7 +184,7 @@ class PrintOrder(PortalContent, DefaultDublinCoreImpl) : self.billing = PersistentMapping() self.shipping = PersistentMapping() self.shippingFees = Price(0,0) - self._paymentResponse = PersistentMapping() + self._paypalLog = PersistentList() @property def amountWithFees(self) : @@ -357,7 +356,7 @@ class PrintOrder(PortalContent, DefaultDublinCoreImpl) : ppi = self._initPayPalInterface() response = ppi.set_express_checkout(**options) response = PrintOrder.recordifyPPResp(response) - # self._paypalLog.append(response) + self._paypalLog.append(response) response['url'] = ppi.generate_express_checkout_redirect_url(response['TOKEN']) console.info(options) console.info(response) @@ -368,7 +367,7 @@ class PrintOrder(PortalContent, DefaultDublinCoreImpl) : ppi = self._initPayPalInterface() response = ppi.get_express_checkout_details(TOKEN=token) response = PrintOrder.recordifyPPResp(response) - # self._paypalLog.append(response) + self._paypalLog.append(response) return response security.declarePrivate('ppDoExpressCheckoutPayment') @@ -380,7 +379,7 @@ class PrintOrder(PortalContent, DefaultDublinCoreImpl) : TOKEN=token, PAYERID=payerid) response = PrintOrder.recordifyPPResp(response) - # self._paypalLog.append(response) + self._paypalLog.append(response) return response security.declareProtected(ModifyPortalContent, 'ppPay')