Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastien Robin
erp5
Commits
b4c6d186
Commit
b4c6d186
authored
Jul 20, 2020
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZODB Components: erp5_secure_payment: Migrate Tool and Interface from filesystem.
parent
ce827903
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
251 additions
and
111 deletions
+251
-111
bt5/erp5_paypal_secure_payment/DocumentTemplateItem/portal_components/document.erp5.PaypalService.py
...lateItem/portal_components/document.erp5.PaypalService.py
+3
-3
bt5/erp5_payzen_secure_payment/DocumentTemplateItem/portal_components/document.erp5.PayzenService.py
...lateItem/portal_components/document.erp5.PayzenService.py
+3
-2
bt5/erp5_secure_payment/InterfaceTemplateItem/portal_components/interface.erp5.IPaymentService.py
...eItem/portal_components/interface.erp5.IPaymentService.py
+1
-1
bt5/erp5_secure_payment/InterfaceTemplateItem/portal_components/interface.erp5.IPaymentService.xml
...Item/portal_components/interface.erp5.IPaymentService.xml
+104
-0
bt5/erp5_secure_payment/PortalTypeTemplateItem/portal_types/Secure%20Payment%20Tool.xml
...TypeTemplateItem/portal_types/Secure%20Payment%20Tool.xml
+4
-3
bt5/erp5_secure_payment/ToolComponentTemplateItem/portal_components/tool.erp5.SecurePaymentTool.py
...lateItem/portal_components/tool.erp5.SecurePaymentTool.py
+0
-11
bt5/erp5_secure_payment/ToolComponentTemplateItem/portal_components/tool.erp5.SecurePaymentTool.xml
...ateItem/portal_components/tool.erp5.SecurePaymentTool.xml
+131
-0
bt5/erp5_secure_payment/bt/template_interface_id_list
bt5/erp5_secure_payment/bt/template_interface_id_list
+1
-0
bt5/erp5_secure_payment/bt/template_tool_component_id_list
bt5/erp5_secure_payment/bt/template_tool_component_id_list
+1
-0
bt5/erp5_wechat_secure_payment/DocumentTemplateItem/portal_components/document.erp5.WechatService.py
...lateItem/portal_components/document.erp5.WechatService.py
+3
-3
product/ERP5SecurePayment/Document/__init__.py
product/ERP5SecurePayment/Document/__init__.py
+0
-0
product/ERP5SecurePayment/PropertySheet/__init__.py
product/ERP5SecurePayment/PropertySheet/__init__.py
+0
-0
product/ERP5SecurePayment/Tool/__init__.py
product/ERP5SecurePayment/Tool/__init__.py
+0
-0
product/ERP5SecurePayment/VERSION.txt
product/ERP5SecurePayment/VERSION.txt
+0
-1
product/ERP5SecurePayment/__init__.py
product/ERP5SecurePayment/__init__.py
+0
-59
product/ERP5SecurePayment/config.py
product/ERP5SecurePayment/config.py
+0
-14
product/ERP5SecurePayment/dtml/explainPaymentTool.dtml
product/ERP5SecurePayment/dtml/explainPaymentTool.dtml
+0
-14
product/ERP5SecurePayment/interfaces/__init__.py
product/ERP5SecurePayment/interfaces/__init__.py
+0
-0
product/ERP5SecurePayment/refresh.txt
product/ERP5SecurePayment/refresh.txt
+0
-0
product/ERP5SecurePayment/tool.png
product/ERP5SecurePayment/tool.png
+0
-0
No files found.
bt5/erp5_paypal_secure_payment/DocumentTemplateItem/portal_components/document.erp5.PaypalService.py
View file @
b4c6d186
...
...
@@ -31,9 +31,9 @@ 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
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
erp5.component.interface.IPaymentService
import
IPaymentService
class
PaypalService
(
XMLObject
):
"""Paypal Service for payment"""
...
...
@@ -41,7 +41,7 @@ class PaypalService(XMLObject):
meta_type
=
'Paypal Service'
portal_type
=
'Paypal Service'
security
=
ClassSecurityInfo
()
zope
.
interface
.
implements
(
interfaces
.
IPaymentService
)
zope
.
interface
.
implements
(
IPaymentService
)
# Declarative security
security
=
ClassSecurityInfo
()
...
...
bt5/erp5_payzen_secure_payment/DocumentTemplateItem/portal_components/document.erp5.PayzenService.py
View file @
b4c6d186
import
zope
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
import
hashlib
from
zLOG
import
LOG
,
WARNING
...
...
@@ -258,11 +258,12 @@ finally:
del
(
os
.
environ
[
'TZ'
])
time
.
tzset
()
from
erp5.component.interface.IPaymentService
import
IPaymentService
class
PayzenService
(
XMLObject
,
PayzenSOAP
):
meta_type
=
'Payzen Service'
portal_type
=
'Payzen Service'
zope
.
interface
.
implements
(
interfaces
.
IPaymentService
)
zope
.
interface
.
implements
(
IPaymentService
)
# Declarative security
security
=
ClassSecurityInfo
()
...
...
product/ERP5SecurePayment/interfaces/payment_s
ervice.py
→
bt5/erp5_secure_payment/InterfaceTemplateItem/portal_components/interface.erp5.IPaymentS
ervice.py
View file @
b4c6d186
...
...
@@ -27,7 +27,7 @@
#
##############################################################################
"""
Products.ERP5SecurePayment.interfaces.payment_s
ervice
erp5.component.interface.IPaymentS
ervice
"""
from
zope.interface
import
Interface
...
...
bt5/erp5_secure_payment/InterfaceTemplateItem/portal_components/interface.erp5.IPaymentService.xml
0 → 100644
View file @
b4c6d186
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Interface Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
IPaymentService
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5SecurePayment.interfaces.payment_service
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
interface.erp5.IPaymentService
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Interface Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</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>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_secure_payment/PortalTypeTemplateItem/portal_types/Secure%20Payment%20Tool.xml
View file @
b4c6d186
...
...
@@ -33,9 +33,10 @@
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
<value>
<string>
Payment Tool goals are to provide a unique interface to buy/sell on ERP5 instances.\n
\n
You need to have a Payement Gateway with reference egal to "default" to make payment.\n
Other reference can be used for specific purpose.
</string>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
...
...
product/ERP5SecurePayment/Tool/
SecurePaymentTool.py
→
bt5/erp5_secure_payment/ToolComponentTemplateItem/portal_components/tool.erp5.
SecurePaymentTool.py
View file @
b4c6d186
...
...
@@ -27,16 +27,10 @@
#
##############################################################################
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type.Tool.BaseTool
import
BaseTool
from
Products.ERP5Type.Permissions
import
ManagePortal
from
Products.ERP5Type.Globals
import
DTMLFile
from
Products.ERP5SecurePayment
import
_dtmldir
from
Products
import
ERP5Security
from
AccessControl.SecurityManagement
import
newSecurityManager
from
AccessControl
import
getSecurityManager
from
zLOG
import
LOG
class
SecurePaymentTool
(
BaseTool
):
"""
...
...
@@ -48,11 +42,6 @@ class SecurePaymentTool(BaseTool):
meta_type
=
'ERP5 Secure Payment Tool'
portal_type
=
'Secure Payment Tool'
# Declarative Security
security
=
ClassSecurityInfo
()
security
.
declareProtected
(
ManagePortal
,
'manage_overview'
)
manage_overview
=
DTMLFile
(
'explainPaymentTool'
,
_dtmldir
)
def
find
(
self
,
service_reference
=
"default"
):
"""Search a payment service by reference"""
if
service_reference
:
...
...
bt5/erp5_secure_payment/ToolComponentTemplateItem/portal_components/tool.erp5.SecurePaymentTool.xml
0 → 100644
View file @
b4c6d186
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Tool Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
SecurePaymentTool
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5SecurePayment.Tool.SecurePaymentTool
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
tool.erp5.SecurePaymentTool
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Tool Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</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>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_secure_payment/bt/template_interface_id_list
0 → 100644
View file @
b4c6d186
interface.erp5.IPaymentService
\ No newline at end of file
bt5/erp5_secure_payment/bt/template_tool_component_id_list
0 → 100644
View file @
b4c6d186
tool.erp5.SecurePaymentTool
\ No newline at end of file
bt5/erp5_wechat_secure_payment/DocumentTemplateItem/portal_components/document.erp5.WechatService.py
View file @
b4c6d186
import
zope
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
zLOG
import
LOG
,
WARNING
import
random
,
string
,
hashlib
,
urllib2
,
socket
...
...
@@ -15,7 +15,7 @@ class WechatException(Exception):
def
__init__
(
self
,
msg
):
super
(
WechatException
,
self
).
__init__
(
msg
)
from
erp5.component.interface.IPaymentService
import
IPaymentService
class
WechatService
(
XMLObject
):
meta_type
=
'Wechat Service'
portal_type
=
'Wechat Service'
...
...
@@ -23,7 +23,7 @@ class WechatService(XMLObject):
ORDER_URL
=
"/pay/unifiedorder"
# Wechat unified order API
QUERY_URL
=
"/pay/orderquery"
zope
.
interface
.
implements
(
interfaces
.
IPaymentService
)
zope
.
interface
.
implements
(
IPaymentService
)
# Declarative security
security
=
ClassSecurityInfo
()
...
...
product/ERP5SecurePayment/Document/__init__.py
deleted
100644 → 0
View file @
ce827903
product/ERP5SecurePayment/PropertySheet/__init__.py
deleted
100644 → 0
View file @
ce827903
product/ERP5SecurePayment/Tool/__init__.py
deleted
100644 → 0
View file @
ce827903
product/ERP5SecurePayment/VERSION.txt
deleted
100644 → 0
View file @
ce827903
ERP5 5.4.7
product/ERP5SecurePayment/__init__.py
deleted
100644 → 0
View file @
ce827903
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
# Francois-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.
#
##############################################################################
"""
ERP5 Secure Payment is a product containing everything needed to do secure payment on ERP5
"""
# Update ERP5 Globals
from
Products.ERP5Type.Utils
import
initializeProduct
,
updateGlobals
import
sys
this_module
=
sys
.
modules
[
__name__
]
document_classes
=
updateGlobals
(
this_module
,
globals
())
from
Tool
import
SecurePaymentTool
# Define object classes and tools
object_classes
=
()
portal_tools
=
(
SecurePaymentTool
.
SecurePaymentTool
,
)
content_classes
=
()
content_constructors
=
()
# Finish installation
def
initialize
(
context
):
import
Document
initializeProduct
(
context
,
this_module
,
globals
(),
document_module
=
Document
,
document_classes
=
document_classes
,
object_classes
=
object_classes
,
portal_tools
=
portal_tools
,
content_constructors
=
content_constructors
,
content_classes
=
content_classes
)
product/ERP5SecurePayment/config.py
deleted
100644 → 0
View file @
ce827903
##############################################################################
#
# Copyright (c) 2006-2010 Nexedi SA and Contributors. All Rights Reserved.
# Ivan Tyagov <ivan@nexedi.com>
# Lukasz Nowak <luke@nexedi.com>
#
# Contains secret information.
#
##############################################################################
# The path of modulev2.cgi for Paybox.
PAYBOX_MODULEV2_CGI
=
'/var/lib/erp5/modulev2.cgi'
# The path of the public key for Paybox.
PAYBOX_PUBLIC_KEY
=
'/var/lib/erp5/paybox_pubkey.pem'
product/ERP5SecurePayment/dtml/explainPaymentTool.dtml
deleted
100644 → 0
View file @
ce827903
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<h3>Explain Payment Tool</h3>
<p>
Payment Tool goals are to provide a unique interface to buy/sell on ERP5 instances.
</p>
<p>
You need to have a Payement Gateway with reference egal to "default" to make payment.
Other reference can be used for specific purpose.
</p>
<dtml-var manage_page_footer>
product/ERP5SecurePayment/interfaces/__init__.py
deleted
100644 → 0
View file @
ce827903
product/ERP5SecurePayment/refresh.txt
deleted
100644 → 0
View file @
ce827903
product/ERP5SecurePayment/tool.png
deleted
100644 → 0
View file @
ce827903
287 Bytes
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment