-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
129 lines (106 loc) · 5.15 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# -*- coding: utf-8 -*-
import sys
from setuptools import setup
# Require Python 2.7.9 or higher or Python 3.4 or higher
if (sys.version_info[:3] < (2, 7, 9)) or ((sys.version_info[0] == 3) and sys.version_info[:2] < (3, 4)):
raise ValueError('''PyXB requires:
Python2 version 2.7.9 or later; or
Python3 version 3.4 or later
(You have %s.)''' % (sys.version,))
setup(
name='PayfacMpSDK',
version='13.1.0',
description='Worldpay payfac SDK',
author='Worldpay',
author_email='[email protected]',
url='https://developer.vantiv.com/community/ecommerce',
packages=['payfacMPSdk', 'payfacMPSdk.schema', 'scripts'],
package_data={'payfacMPSdk.schema': ['*.xsd']},
install_requires=[
'paramiko>=1.14.0',
'requests>=2.21.0 ',
'six>=1.10.0',
'xmlschema>=1.0.3, <=1.0.18',
'generateDS>=2.29.24',
'unittest2>=1.1.0',
'python-dateutil>=2.7.3',
'setuptools',
'mock', 'lxml',
'wheel'
],
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Intended Audience :: Information Technology',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Office/Business :: Financial',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules'
],
entry_points={
'console_scripts': [
'payfac_mp_sdk_setup = scripts.payfac_mp_sdk_setup:main',
],
},
long_description='''Worldpay Python Payfac SDK
=====================================================
.. _`WorldPay eCommerce`: https://developer.vantiv.com/community/ecommerce
About WorldPay eCommerce
----------------------
`WorldPay eCommerce`_ powers the payment processing engines for leading companies that sell directly to consumers through internet retail, direct response marketing (TV, radio and telephone), and online services. WorldPay eCommerce is the leading authority in card-not-present (CNP) commerce, transaction processing and merchant services.
About this SDK
--------------
The WorldPay Python PayFac SDK is a Python implementation of the `WorldPay eCommerce`_ PayFac API. This SDK was created to make it as easy as possible to manage your PayFac using WorldPay eCommerce API. This SDK utilizes the HTTPS protocol to securely connect to WorldPay eCommerce. Using the SDK requires coordination with the WorldPay eCommerce team in order to be provided with credentials for accessing our systems.
Each Python SDK release supports all of the functionality present in the associated WorldPay eCommerce PayFac API version (e.g., SDK v2.1.0 supports WorldPay eCommerce PayFac API v2.1). Please see the PayFac API reference guide to get more details on what the WorldPay eCommerce PayFac engine supports.
This SDK was implemented to support the Python programming language and was created by WorldPay eCommerce. Its intended use is for online and batch transaction processing utilizing your account on the WorldPay eCommerce payments engine.
See LICENSE file for details on using this software.
Please contact `WorldPay eCommerce`_ to receive valid merchant credentials in order to run test successfully or if you require assistance in any way. We are reachable at [email protected]
Dependencies
------------
* pyxb v1.2.5 : http://pyxb.sourceforge.net/
* paramiko v1.14.0: http://www.paramiko.org/
* requests v2.13.0: http://docs.python-requests.org/en/master/
* six v1.10.0: https://github.com/benjaminp/six
* xmltodict 0.10.2: https://github.com/martinblech/xmltodict
Setup
-----
* Run payfac_mp_sdk_setup and answer the questions.
.. code:: bash
payfac_mp_sdk_setup
EXAMPLE
-------
Using dict
..........
.. code-block:: python
#Example for PayFac SDK
from __future__ import print_function, unicode_literals
from cnpsdk import *
# Initial Configuration object. If you have saved configuration in '.payfac_mp_sdk.conf' at system environment
# variable: PAYFAC_SDK_CONFIG or user home directory, the saved configuration will be automatically load.
conf = utils.Configuration()
# Configuration need following attributes for PayFac requests:
# user = ''
# password = ''
# merchantId = ''
# url = 'https://www.testvantivcnp.com/sandbox/communicator/online'
# proxy = ''
# Retrieving information about a LegalEntity by legalentityID:
response = payfac_legalEntity.get_by_legalEntityId(legalentityId)
# Update a LegalEntity
request = "......(some request)"
response = payfac_legalEntity.put_by_legalEntityId(legalentityId, request)
# Create a LegalEntity
request = "......(some request)"
response = payfac_legalEntity.post_by_legalEntity(request)
''',
)