diff --git a/bt5/erp5_paypal_secure_payment/ActionTemplateItem/portal_types/Paypal%20Service/view.xml b/bt5/erp5_paypal_secure_payment/ActionTemplateItem/portal_types/Paypal%20Service/view.xml new file mode 100644 index 0000000000000000000000000000000000000000..c3335c279f715d141935702903e7c26bbb427ecd --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/ActionTemplateItem/portal_types/Paypal%20Service/view.xml @@ -0,0 +1,85 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ActionInformation" module="Products.CMFCore.ActionInformation"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>action</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>categories</string> </key> + <value> + <tuple> + <string>action_type/object_view</string> + </tuple> + </value> + </item> + <item> + <key> <string>category</string> </key> + <value> <string>object_view</string> </value> + </item> + <item> + <key> <string>condition</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>icon</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>view</string> </value> + </item> + <item> + <key> <string>permissions</string> </key> + <value> + <tuple> + <string>View</string> + </tuple> + </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Action Information</string> </value> + </item> + <item> + <key> <string>priority</string> </key> + <value> <float>10.0</float> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>View</string> </value> + </item> + <item> + <key> <string>visible</string> </key> + <value> <int>1</int> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="Expression" module="Products.CMFCore.Expression"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>string:${object_url}/PaypalService_view</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_paypal_secure_payment/DocumentTemplateItem/PaypalService.py b/bt5/erp5_paypal_secure_payment/DocumentTemplateItem/PaypalService.py new file mode 100644 index 0000000000000000000000000000000000000000..f05c7a2ab4947c78e4c25d7f3a89381b2571f0f1 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/DocumentTemplateItem/PaypalService.py @@ -0,0 +1,101 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved. +# Franč½ois-Xavier Algrain <fxalgrain@tiolive.com> +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsability of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# garantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## +import zope +from urllib import urlencode +from urllib2 import urlopen, Request +from zLOG import LOG, DEBUG +from AccessControl import ClassSecurityInfo +from Products.ERP5Type import Permissions, PropertySheet, interfaces +from Products.ERP5Type.XMLObject import XMLObject +from Products.ERP5Type.Document import newTempDocument + + +class PaypalService(XMLObject): + """Paypal Service for payment""" + + meta_type = 'Paypal Service' + portal_type = 'Paypal Service' + security = ClassSecurityInfo() + zope.interface.implements(interfaces.IPaymentService) + + # Declarative security + security = ClassSecurityInfo() + security.declareObjectProtected(Permissions.AccessContentsInformation) + + # Declarative properties + property_sheets = (PropertySheet.Base, + PropertySheet.XMLObject, + PropertySheet.Reference + ) + + def initialize(self, REQUEST=None, **kw): + """See Payment Service Interface Documentation""" + + def navigate(self, page_template, REQUEST=None, **kw): + """See Payment Service Interface Documentation""" + self.Base_checkConsistency() + temp_document = newTempDocument(self, 'id') + temp_document.edit( + link_url_string=self.getLinkUrlString(), + title='title', + # append the rest of transmitted parameters page template + **kw + ) + return getattr(temp_document, page_template)() + + def notifySuccess(self, redirect_path=None, REQUEST=None): + """See Payment Service Interface Documentation""" + return self._getTypeBasedMethod("acceptPayment")(redirect_path=redirect_path) + + def notifyFail(self, redirect_path=None, REQUEST=None): + """See Payment Service Interface Documentation""" + return self._getTypeBasedMethod("failInPayment")(redirect_path=redirect_path) + + def notifyCancel(self, redirect_path=None, REQUEST=None): + """See Payment Service Interface Documentation""" + return self._getTypeBasedMethod("abortPayment")(redirect_path=redirect_path) + + def reportPaymentStatus(self, REQUEST=None): + """See Payment Service Interface Documentation""" + param_dict = REQUEST.form + LOG("PaypalService", DEBUG, param_dict) + param_dict["cmd"] = "_notify-validate" + if param_dict.has_key("service"): + param_dict.pop("service") + param_list = urlencode(param_dict) + paypal_url = self.getLinkUrlString() + request = Request(paypal_url, param_list) + request.add_header("Content-type", "application/x-www-form-urlencoded") + response = urlopen(request) + status = response.read() + method = self._getTypeBasedMethod("reportPaymentStatus") + LOG("PaypalService status", DEBUG, status) + if method and status == "VERIFIED": + method(REQUEST=REQUEST) + return True \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml b/bt5/erp5_paypal_secure_payment/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml new file mode 100644 index 0000000000000000000000000000000000000000..e6a48fba4a1fb648c36e115f914f88dcc08c0f42 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml @@ -0,0 +1,8 @@ +<allowed_content_type_list> + <portal_type id="Paypal Service"> + <item>Link</item> + </portal_type> + <portal_type id="Secure Payment Tool"> + <item>Paypal Service</item> + </portal_type> +</allowed_content_type_list> \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/PortalTypePropertySheetTemplateItem/property_sheet_list.xml b/bt5/erp5_paypal_secure_payment/PortalTypePropertySheetTemplateItem/property_sheet_list.xml new file mode 100644 index 0000000000000000000000000000000000000000..394fcf35818a3a8d65cbf1fad4e55fa3969586fd --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/PortalTypePropertySheetTemplateItem/property_sheet_list.xml @@ -0,0 +1,6 @@ +<property_sheet_list> + <portal_type id="Paypal Service"> + <item>PaymentService</item> + <item>PaypalService</item> + </portal_type> +</property_sheet_list> \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/PortalTypeTemplateItem/portal_types/Paypal%20Service.xml b/bt5/erp5_paypal_secure_payment/PortalTypeTemplateItem/portal_types/Paypal%20Service.xml new file mode 100644 index 0000000000000000000000000000000000000000..319123ea014e01d1798b1999d28099da9a025f05 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/PortalTypeTemplateItem/portal_types/Paypal%20Service.xml @@ -0,0 +1,107 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Base Type" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_property_domain_dict</string> </key> + <value> + <dictionary> + <item> + <key> <string>short_title</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>title</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>content_icon</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Paypal Service</string> </value> + </item> + <item> + <key> <string>init_script</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>permission</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Base Type</string> </value> + </item> + <item> + <key> <string>type_class</string> </key> + <value> <string>PaypalService</string> </value> + </item> + <item> + <key> <string>type_mixin</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>domain_name</string> </key> + <value> <string>erp5_content</string> </value> + </item> + <item> + <key> <string>property_name</string> </key> + <value> <string>short_title</string> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>domain_name</string> </key> + <value> <string>erp5_content</string> </value> + </item> + <item> + <key> <string>property_name</string> </key> + <value> <string>title</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_paypal_secure_payment/PropertySheetTemplateItem/portal_property_sheets/PaypalService.xml b/bt5/erp5_paypal_secure_payment/PropertySheetTemplateItem/portal_property_sheets/PaypalService.xml new file mode 100644 index 0000000000000000000000000000000000000000..60edf31b5cdbf8842c8c710bd9ab30f53f4c7057 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/PropertySheetTemplateItem/portal_property_sheets/PaypalService.xml @@ -0,0 +1,60 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Property Sheet" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_count</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>_mt_index</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + <item> + <key> <string>_tree</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>PaypalService</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Property Sheet</string> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="Length" module="BTrees.Length"/> + </pickle> + <pickle> <int>0</int> </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <global name="OOBTree" module="BTrees.OOBTree"/> + </pickle> + <pickle> + <none/> + </pickle> + </record> + <record id="4" aka="AAAAAAAAAAQ="> + <pickle> + <global name="OOBTree" module="BTrees.OOBTree"/> + </pickle> + <pickle> + <none/> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_paypal_secure_payment/PropertySheetTemplateItem/portal_property_sheets/PaypalService/link_url_string_constraint.xml b/bt5/erp5_paypal_secure_payment/PropertySheetTemplateItem/portal_property_sheets/PaypalService/link_url_string_constraint.xml new file mode 100644 index 0000000000000000000000000000000000000000..b8b814be7ad9586e72400db6bfdc0a142c57d9c1 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/PropertySheetTemplateItem/portal_property_sheets/PaypalService/link_url_string_constraint.xml @@ -0,0 +1,105 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="String Attribute Match Constraint" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_identity_criterion</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>_local_properties</string> </key> + <value> + <tuple> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>message_property_not_set</string> </value> + </item> + <item> + <key> <string>type</string> </key> + <value> <string>string</string> </value> + </item> + </dictionary> + </tuple> + </value> + </item> + <item> + <key> <string>_range_criterion</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + <item> + <key> <string>constraint_property</string> </key> + <value> + <tuple> + <string>link_url_string</string> + </tuple> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>link_url_string_constraint</string> </value> + </item> + <item> + <key> <string>message_attribute_match</string> </key> + <value> <string>Paypal URL have to be set</string> </value> + </item> + <item> + <key> <string>message_no_such_property</string> </key> + <value> <string>Paypal URL have to be set</string> </value> + </item> + <item> + <key> <string>message_property_not_set</string> </key> + <value> <string>Paypal URL have to be set</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>String Attribute Match Constraint</string> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="PersistentMapping" module="Persistence.mapping"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>data</string> </key> + <value> + <dictionary/> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <global name="PersistentMapping" module="Persistence.mapping"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>data</string> </key> + <value> + <dictionary/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_paypal_secure_payment/PropertySheetTemplateItem/portal_property_sheets/PaypalService/service_signature_property.xml b/bt5/erp5_paypal_secure_payment/PropertySheetTemplateItem/portal_property_sheets/PaypalService/service_signature_property.xml new file mode 100644 index 0000000000000000000000000000000000000000..f97dac1259077c366cfb9eb8b2d687ab37634331 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/PropertySheetTemplateItem/portal_property_sheets/PaypalService/service_signature_property.xml @@ -0,0 +1,57 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Standard Property" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_local_properties</string> </key> + <value> + <tuple> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>mode</string> </value> + </item> + <item> + <key> <string>type</string> </key> + <value> <string>string</string> </value> + </item> + </dictionary> + </tuple> + </value> + </item> + <item> + <key> <string>categories</string> </key> + <value> + <tuple> + <string>elementary_type/string</string> + </tuple> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>Signature of account</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>service_signature_property</string> </value> + </item> + <item> + <key> <string>mode</string> </key> + <value> <string>w</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Standard Property</string> </value> + </item> + <item> + <key> <string>property_default</string> </key> + <value> <string>python: \'\'</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment.xml b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment.xml new file mode 100644 index 0000000000000000000000000000000000000000..374d52ff70cd41c8e564b53633899c18fe9b54a5 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment.xml @@ -0,0 +1,26 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Folder" module="OFS.Folder"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>erp5_paypal_secure_payment</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_abortPayment.xml b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_abortPayment.xml new file mode 100644 index 0000000000000000000000000000000000000000..9360d3c940bf9a9c0b846cb5c403e4dbde5d54a6 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_abortPayment.xml @@ -0,0 +1,72 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string>"""Redirect user to the path\n +Parameters:\n +redirect_path -- Specify where redirect user, use \'paypal.payment.aborted\' as default"""\n +\n +context.REQUEST.RESPONSE.redirect("%s/%s" % (context.Base_getWebSiteSecureUrl(), \n + redirect_path))\n +</string> </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>redirect_path=\'paypal.payment.aborted\', **kw</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>PaypalService_abortPayment</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_acceptPayment.xml b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_acceptPayment.xml new file mode 100644 index 0000000000000000000000000000000000000000..83bdbcb4f30b303afcfb66232509a2659f39afa3 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_acceptPayment.xml @@ -0,0 +1,72 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string>"""Redirect user to the path\n +Parameters:\n +redirect_path -- Specify where redirect user, use \'paypal.payment.accepted\' as default"""\n +\n +context.REQUEST.RESPONSE.redirect("%s/%s" % (context.Base_getWebSiteSecureUrl(), \n + redirect_path))\n +</string> </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>redirect_path=\'paypal.payment.accepted\', **kw</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>PaypalService_acceptPayment</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_failInPayment.xml b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_failInPayment.xml new file mode 100644 index 0000000000000000000000000000000000000000..e78c2f855a2165f4796b6b27a8bf0ec08b640258 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_failInPayment.xml @@ -0,0 +1,72 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string>"""Redirect user to the path\n +Parameters:\n +redirect_path -- Specify where redirect user, use \'paypal.payment.faild\' as default"""\n +\n +context.REQUEST.RESPONSE.redirect("%s/%s" % (context.Base_getWebSiteSecureUrl(), \n + redirect_path))\n +</string> </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>redirect_path=\'paypal.payment.failed\', **kw</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>PaypalService_failInPayment</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_getParameterDict.xml b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_getParameterDict.xml new file mode 100644 index 0000000000000000000000000000000000000000..a4eabeac91757c8e28cf066de3da7c8fbcb7b39a --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_getParameterDict.xml @@ -0,0 +1,67 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string>return {}\n +</string> </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>**kw</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>PaypalService_getParameterDict</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_reportPaymentStatus.xml b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_reportPaymentStatus.xml new file mode 100644 index 0000000000000000000000000000000000000000..ed9e67ffdc3f777d1023a82a9bb977b1d5c004f1 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_reportPaymentStatus.xml @@ -0,0 +1,68 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string>"""Call in server side after payment transaction"""\n +# Do nothing by default\n +</string> </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>REQUEST, **kw</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>PaypalService_reportPaymentStatus</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view.xml b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view.xml new file mode 100644 index 0000000000000000000000000000000000000000..8d58ce3a77e54afb6bdd7948283f52d5c681fdd3 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view.xml @@ -0,0 +1,162 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ERP5Form" module="Products.ERP5Form.Form"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary/> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>action</string> </key> + <value> <string>Base_edit</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>edit_order</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>encoding</string> </key> + <value> <string>UTF-8</string> </value> + </item> + <item> + <key> <string>enctype</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>group_list</string> </key> + <value> + <list> + <string>left</string> + <string>right</string> + <string>center</string> + <string>bottom</string> + <string>hidden</string> + </list> + </value> + </item> + <item> + <key> <string>groups</string> </key> + <value> + <dictionary> + <item> + <key> <string>bottom</string> </key> + <value> + <list> + <string>listbox</string> + </list> + </value> + </item> + <item> + <key> <string>center</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> + <list> + <string>listbox_int_index</string> + </list> + </value> + </item> + <item> + <key> <string>left</string> </key> + <value> + <list> + <string>my_title</string> + <string>my_reference</string> + <string>my_link_url_string</string> + </list> + </value> + </item> + <item> + <key> <string>right</string> </key> + <value> + <list> + <string>my_service_username</string> + <string>my_service_password</string> + <string>my_service_signature</string> + </list> + </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>PaypalService_view</string> </value> + </item> + <item> + <key> <string>method</string> </key> + <value> <string>POST</string> </value> + </item> + <item> + <key> <string>name</string> </key> + <value> <string>PaypalService_view</string> </value> + </item> + <item> + <key> <string>pt</string> </key> + <value> <string>form_view</string> </value> + </item> + <item> + <key> <string>row_length</string> </key> + <value> <int>4</int> </value> + </item> + <item> + <key> <string>stored_encoding</string> </key> + <value> <string>UTF-8</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>unicode_mode</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>update_action</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>update_action_title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/listbox.xml b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/listbox.xml new file mode 100644 index 0000000000000000000000000000000000000000..f625c78ad4ced74b06b393756d8a74032140ea6a --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/listbox.xml @@ -0,0 +1,186 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>anchor</string> + <string>columns</string> + <string>editable_columns</string> + <string>portal_types</string> + <string>selection_name</string> + <string>sort</string> + <string>title</string> + <string>url_columns</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>listbox</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>anchor</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>columns</string> </key> + <value> + <list> + <tuple> + <string>int_index</string> + <string>Index</string> + </tuple> + <tuple> + <string>title</string> + <string>Title</string> + </tuple> + <tuple> + <string>translated_id</string> + <string>Coordinate Function</string> + </tuple> + <tuple> + <string>url_string</string> + <string>URL</string> + </tuple> + </list> + </value> + </item> + <item> + <key> <string>editable_columns</string> </key> + <value> + <list> + <tuple> + <string>int_index</string> + <string>Index</string> + </tuple> + <tuple> + <string>title</string> + <string>Title</string> + </tuple> + </list> + </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_view_mode_listbox</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>portal_types</string> </key> + <value> + <list> + <tuple> + <string>Link</string> + <string>Link</string> + </tuple> + </list> + </value> + </item> + <item> + <key> <string>selection_name</string> </key> + <value> <string>paypal_service_list_selection</string> </value> + </item> + <item> + <key> <string>sort</string> </key> + <value> + <list> + <tuple> + <string>portal_type</string> + <string>Type</string> + </tuple> + <tuple> + <string>int_index</string> + <string>Index</string> + </tuple> + </list> + </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Coordinates</string> </value> + </item> + <item> + <key> <string>url_columns</string> </key> + <value> + <list> + <tuple> + <string>url_string</string> + <string>Coordinate_asURL</string> + </tuple> + </list> + </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/listbox_int_index.xml b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/listbox_int_index.xml new file mode 100644 index 0000000000000000000000000000000000000000..008e8f0e77c76346ad472e480e6415016dd34e5c --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/listbox_int_index.xml @@ -0,0 +1,115 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>listbox_int_index</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>items</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_view_mode_int_index</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <tuple> + <string>Products.Formulator.TALESField</string> + <string>TALESMethod</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>here/portal_categories/activity/getCategoryChildTranslatedLogicalPathItemList</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/my_link_url_string.xml b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/my_link_url_string.xml new file mode 100644 index 0000000000000000000000000000000000000000..355be7c48f5cebb1e4829a11572dadbe3e71c13e --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/my_link_url_string.xml @@ -0,0 +1,96 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>title</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>my_link_url_string</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_link_field</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Paypal URL</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/my_reference.xml b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/my_reference.xml new file mode 100644 index 0000000000000000000000000000000000000000..50e005aef6f04a485a8fef90feea6833ce5dbe2a --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/my_reference.xml @@ -0,0 +1,90 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>my_reference</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_dialog_mode_reference</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/my_service_password.xml b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/my_service_password.xml new file mode 100644 index 0000000000000000000000000000000000000000..7f8e8391046320be3b0de77d1d66d471bd56e7da --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/my_service_password.xml @@ -0,0 +1,90 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>my_service_password</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_password</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/my_service_signature.xml b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/my_service_signature.xml new file mode 100644 index 0000000000000000000000000000000000000000..ee5eca2f23bdacf712064996a69ef51e9acc61f1 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/my_service_signature.xml @@ -0,0 +1,96 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>title</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>my_service_signature</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_string_field</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Signature</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/my_service_username.xml b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/my_service_username.xml new file mode 100644 index 0000000000000000000000000000000000000000..03a3748b088b51e9929d2a41a57010c3a8cbc5fa --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/my_service_username.xml @@ -0,0 +1,96 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>title</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>my_service_username</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_string_field</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Username</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/my_title.xml b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/my_title.xml new file mode 100644 index 0000000000000000000000000000000000000000..ef309226fd90d5ae28f312c8cc57561e420f08fb --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/SkinTemplateItem/portal_skins/erp5_paypal_secure_payment/PaypalService_view/my_title.xml @@ -0,0 +1,90 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>my_title</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_view_mode_title</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_paypal_secure_payment/TestTemplateItem/testERP5PaypalSecurePayment.py b/bt5/erp5_paypal_secure_payment/TestTemplateItem/testERP5PaypalSecurePayment.py new file mode 100644 index 0000000000000000000000000000000000000000..d7bdbee1f18e1eaa431e4d98250458e462417033 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/TestTemplateItem/testERP5PaypalSecurePayment.py @@ -0,0 +1,97 @@ +############################################################################## +# +# Copyright (c) 2002-2012 Nexedi SA and Contributors. All Rights Reserved. +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +############################################################################## + +import random +from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase + + +def getMessageList(o): + return [str(q.getMessage()) for q in o.checkConsistency()] + +class TestERP5PaypalSecurePaymentMixin(ERP5TypeTestCase): + """ + An ERP5 Paypal Secure Payment test case + """ + + def getTitle(self): + return "ERP5 Paypal Secure Payment" + + def getBusinessTemplateList(self): + """ + Tuple of Business Templates we need to install + """ + return ('erp5_base', + 'erp5_secure_payment', + 'erp5_paypal_secure_payment') + + def afterSetUp(self): + self.portal = self.getPortalObject() + if not self.portal.hasObject('portal_secure_payments'): + self.portal.manage_addProduct['ERP5SecurePayment'].manage_addTool( + 'ERP5 Secure Payment Tool', None) + self.tic() + self.service = self.portal.portal_secure_payments.newContent( + portal_type='Paypal Service', + reference="default") + self.tic() + + +class TestERP5PaypalSecurePaymenConstraint(TestERP5PaypalSecurePaymentMixin): + + def _test(self, message, prop, value='12345'): + self.assertTrue(message in getMessageList(self.service)) + self.service.edit(**{prop: value}) + self.assertFalse(message in getMessageList(self.service)) + + def test_link_url_string(self): + self._test('Paypal URL have to be set', 'link_url_string') + + +class TestERP5PaypalSecurePayment(TestERP5PaypalSecurePaymentMixin): + + def test_navigate(self): + self.service.edit( + link_url_string='http://paypal/', + service_username="business@sample.com" + ) + pt_id = str(random.random()) + page_template_text = """ + link=<tal:block tal:replace='here/link_url_string'/> +business=<tal:block tal:replace='here/service_username'/> + """ + self.portal.portal_skins.custom.manage_addProduct['PageTemplates']\ + .manage_addPageTemplate(id=pt_id, text=page_template_text) + # flush skin cache + self.portal.changeSkin(None) + try: + result = self.service.navigate(pt_id) + self.assertEquals(result, """link=http://paypal/ +business=business@sample.com""") + finally: + self.portal.portal_skins.custom.manage_delObjects([pt_id]) + # flush skin cache + self.portal.changeSkin(None) \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/bt/change_log b/bt5/erp5_paypal_secure_payment/bt/change_log new file mode 100644 index 0000000000000000000000000000000000000000..2f0234e929398c8d2db682f836df9b6608745d51 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/bt/change_log @@ -0,0 +1,2 @@ +2012/07/03 Gabriel Monnerat +* Initial version. \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/bt/copyright_list b/bt5/erp5_paypal_secure_payment/bt/copyright_list new file mode 100644 index 0000000000000000000000000000000000000000..dd86b8376aa272001a8ce936e0bc88919f447407 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/bt/copyright_list @@ -0,0 +1 @@ +Nexedi SA 2012 \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/bt/dependency_list b/bt5/erp5_paypal_secure_payment/bt/dependency_list new file mode 100644 index 0000000000000000000000000000000000000000..eab34eef81a5d380b5042d123daff15274056e66 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/bt/dependency_list @@ -0,0 +1 @@ +erp5_secure_payment \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/bt/description b/bt5/erp5_paypal_secure_payment/bt/description new file mode 100644 index 0000000000000000000000000000000000000000..d54f0cec2258b748ea7624c20acb9e4c3fd50d1a --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/bt/description @@ -0,0 +1 @@ +Integrate Paypal payment service in ERP5 \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/bt/license b/bt5/erp5_paypal_secure_payment/bt/license new file mode 100644 index 0000000000000000000000000000000000000000..3a3e12bcad97e4b3bdd6a8bb499fd23a4bcb0819 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/bt/license @@ -0,0 +1 @@ +GPL \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/bt/maintainer_list b/bt5/erp5_paypal_secure_payment/bt/maintainer_list new file mode 100644 index 0000000000000000000000000000000000000000..38363f73039fa6118b4a55f85965b90af9fc9384 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/bt/maintainer_list @@ -0,0 +1 @@ +gabriel \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/bt/revision b/bt5/erp5_paypal_secure_payment/bt/revision new file mode 100644 index 0000000000000000000000000000000000000000..56a6051ca2b02b04ef92d5150c9ef600403cb1de --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/bt/revision @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/bt/template_action_path_list b/bt5/erp5_paypal_secure_payment/bt/template_action_path_list new file mode 100644 index 0000000000000000000000000000000000000000..e20444be8b380fbc66b3ee1b3ca410a5512ee04d --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/bt/template_action_path_list @@ -0,0 +1 @@ +Paypal Service | view \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/bt/template_document_id_list b/bt5/erp5_paypal_secure_payment/bt/template_document_id_list new file mode 100644 index 0000000000000000000000000000000000000000..157fae487975ef103231fb335cac4930df6a5df2 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/bt/template_document_id_list @@ -0,0 +1 @@ +PaypalService \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/bt/template_format_version b/bt5/erp5_paypal_secure_payment/bt/template_format_version new file mode 100644 index 0000000000000000000000000000000000000000..56a6051ca2b02b04ef92d5150c9ef600403cb1de --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/bt/template_format_version @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/bt/template_portal_type_allowed_content_type_list b/bt5/erp5_paypal_secure_payment/bt/template_portal_type_allowed_content_type_list new file mode 100644 index 0000000000000000000000000000000000000000..492a8f1ee459779ee8fd03aef34b3745ff694b24 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/bt/template_portal_type_allowed_content_type_list @@ -0,0 +1,2 @@ +Paypal Service | Link +Secure Payment Tool | Paypal Service \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/bt/template_portal_type_id_list b/bt5/erp5_paypal_secure_payment/bt/template_portal_type_id_list new file mode 100644 index 0000000000000000000000000000000000000000..14966cc636e15e71e1af4ac137710159ebc57984 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/bt/template_portal_type_id_list @@ -0,0 +1 @@ +Paypal Service \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/bt/template_portal_type_property_sheet_list b/bt5/erp5_paypal_secure_payment/bt/template_portal_type_property_sheet_list new file mode 100644 index 0000000000000000000000000000000000000000..fb17e0c12bb3a3d1a1410521e6ca551d8950cfd7 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/bt/template_portal_type_property_sheet_list @@ -0,0 +1,2 @@ +Paypal Service | PaymentService +Paypal Service | PaypalService \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/bt/template_property_sheet_id_list b/bt5/erp5_paypal_secure_payment/bt/template_property_sheet_id_list new file mode 100644 index 0000000000000000000000000000000000000000..157fae487975ef103231fb335cac4930df6a5df2 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/bt/template_property_sheet_id_list @@ -0,0 +1 @@ +PaypalService \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/bt/template_skin_id_list b/bt5/erp5_paypal_secure_payment/bt/template_skin_id_list new file mode 100644 index 0000000000000000000000000000000000000000..1e55ae79120594110423e11fc9eb277a0c39ba59 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/bt/template_skin_id_list @@ -0,0 +1 @@ +erp5_paypal_secure_payment \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/bt/template_test_id_list b/bt5/erp5_paypal_secure_payment/bt/template_test_id_list new file mode 100644 index 0000000000000000000000000000000000000000..8cd365f91b4590c34e54c02e2867c26167fb6d62 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/bt/template_test_id_list @@ -0,0 +1 @@ +testERP5PaypalSecurePayment \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/bt/title b/bt5/erp5_paypal_secure_payment/bt/title new file mode 100644 index 0000000000000000000000000000000000000000..1e55ae79120594110423e11fc9eb277a0c39ba59 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/bt/title @@ -0,0 +1 @@ +erp5_paypal_secure_payment \ No newline at end of file diff --git a/bt5/erp5_paypal_secure_payment/bt/version b/bt5/erp5_paypal_secure_payment/bt/version new file mode 100644 index 0000000000000000000000000000000000000000..48360de846a2e022a0b981d250895f20d3480d34 --- /dev/null +++ b/bt5/erp5_paypal_secure_payment/bt/version @@ -0,0 +1 @@ +5.4.7 \ No newline at end of file