From b92ab62e2af2ba6788d1af5b0750f41948fffa68 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Sat, 5 Oct 2013 07:45:19 +0200 Subject: [PATCH] =?utf8?q?Enregistrement=20/=20visualisation=20des=20?= =?utf8?q?=C3=A9changes=20avec=20PayPal.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- order.py | 9 +++++---- skins/order_pplog.pt | 23 +++++++++++++++++++++++ 2 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 skins/order_pplog.pt diff --git a/order.py b/order.py index 815171b..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 @@ -183,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) : @@ -355,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) @@ -366,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') @@ -378,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') diff --git a/skins/order_pplog.pt b/skins/order_pplog.pt new file mode 100644 index 0000000..7f1e3de --- /dev/null +++ b/skins/order_pplog.pt @@ -0,0 +1,23 @@ + + + PayPal Log + + + + +
+
+ + + + + +
keyvalue
+
+
+
+ + -- 2.20.1