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
self.billing = PersistentMapping()
self.shipping = PersistentMapping()
self.shippingFees = Price(0,0)
- self._paymentResponse = PersistentMapping()
+ self._paypalLog = PersistentList()
@property
def amountWithFees(self) :
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)
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')
TOKEN=token,
PAYERID=payerid)
response = PrintOrder.recordifyPPResp(response)
- # self._paypalLog.append(response)
+ self._paypalLog.append(response)
return response
security.declareProtected(ModifyPortalContent, 'ppPay')
--- /dev/null
+<html metal:use-macro="here/main_template/macros/master"
+ xmlns:tal="http://xml.zope.org/namespaces/tal"
+ xmlns:metal="http://xml.zope.org/namespaces/metal"
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <head>
+ <title>PayPal Log</title>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8" />
+
+ </head>
+ <body>
+ <div metal:fill-slot="main_no_tabs" tal:omit-tag="">
+ <div tal:repeat="entry here/getPPLog">
+ <table border="1">
+ <tr tal:repeat="item entry/items">
+ <th tal:content="python:item[0]">key</th>
+ <td tal:content="python:item[1]">value</td>
+ </tr>
+ </table>
+ <br/>
+ </div>
+ </div>
+ </body>
+</html>