solidgate-sdk 0.3.0__tar.gz → 0.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,135 @@
1
+ Metadata-Version: 2.4
2
+ Name: solidgate-sdk
3
+ Version: 0.3.2
4
+ Summary: Python API SDK for SolidGate payment gateway
5
+ Home-page: https://api-docs.solidgate.com/
6
+ Author: SolidGate
7
+ Author-email: info@solidgate.com
8
+ Classifier: Programming Language :: Python :: 3.7
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE.md
13
+ Requires-Dist: requests
14
+ Requires-Dist: pycryptodome
15
+ Dynamic: author
16
+ Dynamic: author-email
17
+ Dynamic: classifier
18
+ Dynamic: description
19
+ Dynamic: description-content-type
20
+ Dynamic: home-page
21
+ Dynamic: license-file
22
+ Dynamic: requires-dist
23
+ Dynamic: summary
24
+
25
+ # Solidgate API
26
+
27
+ [![PyPI version](https://badge.fury.io/py/solidgate-sdk.svg)](https://badge.fury.io/py/solidgate-sdk)
28
+
29
+ Python SDK provides API options for integrating Solidgate’s payment orchestrator into your Python applications.
30
+
31
+ Check our
32
+ * <a href="https://docs.solidgate.com/" target="_blank">Payment guide</a> to understand business value better
33
+ * <a href="https://api-docs.solidgate.com/" target="_blank">API Reference</a> to find more examples of usage
34
+
35
+ ## Structure
36
+
37
+ <table style="width: 100%; background: transparent;">
38
+ <colgroup>
39
+ <col style="width: 50%;">
40
+ <col style="width: 50%;">
41
+ </colgroup>
42
+ <tr>
43
+ <th>SDK for Python contains</th>
44
+ <th>Table of contents</th>
45
+ </tr>
46
+ <tr>
47
+ <td>
48
+ <ul>
49
+ <li>
50
+ <code>solidgate/</code> – main library source code for development
51
+ <ul>
52
+ <li><code>__init__.py</code> – initializes the SDK package for importing</li>
53
+ <li><code>api_client.py</code> – main file for API integration and HTTP request handling</li>
54
+ <li><code>encryption.py</code> – library for encryption-related operations</li>
55
+ <li><code>model.py</code> – defines data structures for payment attributes and responses</li>
56
+ </ul>
57
+ </li>
58
+ <li><code>setup.py</code> – script for managing dependencies and library imports</li>
59
+ </ul>
60
+ </td>
61
+ <td>
62
+ <a href="https://github.com/solidgate-tech/python-sdk?tab=readme-ov-file#requirements">Requirements</a><br>
63
+ <a href="https://github.com/solidgate-tech/python-sdk?tab=readme-ov-file#installation">Installation</a><br>
64
+ <a href="https://github.com/solidgate-tech/python-sdk?tab=readme-ov-file#usage">Usage</a><br>
65
+ <a href="https://github.com/solidgate-tech/python-sdk?tab=readme-ov-file#errors">Errors</a><br>
66
+ </td>
67
+ </tr>
68
+ </table>
69
+
70
+ <br>
71
+
72
+ ## Requirements
73
+
74
+ * **Python**: 3.7 or later
75
+ * **Packages**: `requests` library
76
+ * **Solidgate account**: Public and secret key (request via <a href="mailto:sales@solidgate.com">sales@solidgate.com</a>)
77
+
78
+ <br>
79
+
80
+ ## Installation
81
+
82
+ To start using the Python SDK:
83
+
84
+ 1. Ensure you have your public and secret key.
85
+ 2. Install the SDK in your project using pip:
86
+ ```bash
87
+ pip install solidgate-card-sdk
88
+ ```
89
+ 3. Import the classes into your project:
90
+ ```
91
+ from solidgate import ApiClient
92
+ client = ApiClient(public_key='YourMerchantId', secret_key='YourPrivateKey')
93
+ ```
94
+ 4. Use test credentials for integration testing. After successful testing, switch to production credentials.
95
+
96
+ <br>
97
+
98
+ ## Usage
99
+
100
+ ### Charge a payment
101
+
102
+ Create a class instance of the `ApiClient` class.
103
+
104
+ ```
105
+ from solidgate import ApiClient
106
+
107
+ client = ApiClient(public_key, secret_key)
108
+ ```
109
+
110
+ - `public_key` - unique merchant identification
111
+ - `secret_key` - secret code for request signature, it is provided at the moment of merchant registration
112
+
113
+ ### Resign form
114
+
115
+ ```python
116
+ response = client.form_resign({'order_id': '12345'})
117
+ ```
118
+
119
+ <br>
120
+
121
+ ## Errors
122
+
123
+ Handle <a href="https://docs.solidgate.com/payments/payments-insights/error-codes/" target="_blank">errors</a>.
124
+
125
+ ```python
126
+ try:
127
+ response = client.charge({...})
128
+ except Exception as e:
129
+ print(e)
130
+ ```
131
+
132
+ ---
133
+
134
+ Looking for help? <a href="https://support.solidgate.com/support/tickets/new" target="_blank">Contact us</a> <br>
135
+ Want to contribute? <a href="https://github.com/solidgate-tech/python-sdk/pulls" target="_blank">Submit a pull request</a>
@@ -0,0 +1,111 @@
1
+ # Solidgate API
2
+
3
+ [![PyPI version](https://badge.fury.io/py/solidgate-sdk.svg)](https://badge.fury.io/py/solidgate-sdk)
4
+
5
+ Python SDK provides API options for integrating Solidgate’s payment orchestrator into your Python applications.
6
+
7
+ Check our
8
+ * <a href="https://docs.solidgate.com/" target="_blank">Payment guide</a> to understand business value better
9
+ * <a href="https://api-docs.solidgate.com/" target="_blank">API Reference</a> to find more examples of usage
10
+
11
+ ## Structure
12
+
13
+ <table style="width: 100%; background: transparent;">
14
+ <colgroup>
15
+ <col style="width: 50%;">
16
+ <col style="width: 50%;">
17
+ </colgroup>
18
+ <tr>
19
+ <th>SDK for Python contains</th>
20
+ <th>Table of contents</th>
21
+ </tr>
22
+ <tr>
23
+ <td>
24
+ <ul>
25
+ <li>
26
+ <code>solidgate/</code> – main library source code for development
27
+ <ul>
28
+ <li><code>__init__.py</code> – initializes the SDK package for importing</li>
29
+ <li><code>api_client.py</code> – main file for API integration and HTTP request handling</li>
30
+ <li><code>encryption.py</code> – library for encryption-related operations</li>
31
+ <li><code>model.py</code> – defines data structures for payment attributes and responses</li>
32
+ </ul>
33
+ </li>
34
+ <li><code>setup.py</code> – script for managing dependencies and library imports</li>
35
+ </ul>
36
+ </td>
37
+ <td>
38
+ <a href="https://github.com/solidgate-tech/python-sdk?tab=readme-ov-file#requirements">Requirements</a><br>
39
+ <a href="https://github.com/solidgate-tech/python-sdk?tab=readme-ov-file#installation">Installation</a><br>
40
+ <a href="https://github.com/solidgate-tech/python-sdk?tab=readme-ov-file#usage">Usage</a><br>
41
+ <a href="https://github.com/solidgate-tech/python-sdk?tab=readme-ov-file#errors">Errors</a><br>
42
+ </td>
43
+ </tr>
44
+ </table>
45
+
46
+ <br>
47
+
48
+ ## Requirements
49
+
50
+ * **Python**: 3.7 or later
51
+ * **Packages**: `requests` library
52
+ * **Solidgate account**: Public and secret key (request via <a href="mailto:sales@solidgate.com">sales@solidgate.com</a>)
53
+
54
+ <br>
55
+
56
+ ## Installation
57
+
58
+ To start using the Python SDK:
59
+
60
+ 1. Ensure you have your public and secret key.
61
+ 2. Install the SDK in your project using pip:
62
+ ```bash
63
+ pip install solidgate-card-sdk
64
+ ```
65
+ 3. Import the classes into your project:
66
+ ```
67
+ from solidgate import ApiClient
68
+ client = ApiClient(public_key='YourMerchantId', secret_key='YourPrivateKey')
69
+ ```
70
+ 4. Use test credentials for integration testing. After successful testing, switch to production credentials.
71
+
72
+ <br>
73
+
74
+ ## Usage
75
+
76
+ ### Charge a payment
77
+
78
+ Create a class instance of the `ApiClient` class.
79
+
80
+ ```
81
+ from solidgate import ApiClient
82
+
83
+ client = ApiClient(public_key, secret_key)
84
+ ```
85
+
86
+ - `public_key` - unique merchant identification
87
+ - `secret_key` - secret code for request signature, it is provided at the moment of merchant registration
88
+
89
+ ### Resign form
90
+
91
+ ```python
92
+ response = client.form_resign({'order_id': '12345'})
93
+ ```
94
+
95
+ <br>
96
+
97
+ ## Errors
98
+
99
+ Handle <a href="https://docs.solidgate.com/payments/payments-insights/error-codes/" target="_blank">errors</a>.
100
+
101
+ ```python
102
+ try:
103
+ response = client.charge({...})
104
+ except Exception as e:
105
+ print(e)
106
+ ```
107
+
108
+ ---
109
+
110
+ Looking for help? <a href="https://support.solidgate.com/support/tickets/new" target="_blank">Contact us</a> <br>
111
+ Want to contribute? <a href="https://github.com/solidgate-tech/python-sdk/pulls" target="_blank">Submit a pull request</a>
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setuptools.setup(
7
7
  name="solidgate-sdk",
8
- version="0.3.0",
8
+ version="0.3.2",
9
9
  author="SolidGate",
10
10
  author_email="info@solidgate.com",
11
11
  description="Python API SDK for SolidGate payment gateway",
@@ -75,9 +75,9 @@ class ApiClient:
75
75
  return form_update_dto
76
76
 
77
77
  def form_resign(self, attributes: dict) -> FormInitDTO:
78
- payment_intent = AESCipher(self.__private_key).encrypt(self.__convert_request_attributes_to_str(attributes))
79
- signature = self.__generate_signature(payment_intent)
80
- form_resign_dto = FormResignDTO(payment_intent=payment_intent, publicKey=self.__merchant_id, signature=signature)
78
+ resign_intent = AESCipher(self.__private_key).encrypt(self.__convert_request_attributes_to_str(attributes))
79
+ signature = self.__generate_signature(resign_intent)
80
+ form_resign_dto = FormResignDTO(resign_intent=resign_intent, publicKey=self.__merchant_id, signature=signature)
81
81
  return form_resign_dto
82
82
 
83
83
  def order_reconciliation(self, date_from: datetime, date_to: datetime) -> Generator:
@@ -10,7 +10,7 @@ class FormUpdateDTO:
10
10
  self.signature = signature
11
11
 
12
12
  class FormResignDTO:
13
- def __init__(self, payment_intent: str, publicKey: str, signature: str):
14
- self.payment_intent = payment_intent
13
+ def __init__(self, resignIntent: str, publicKey: str, signature: str):
14
+ self.resign_intent = resignIntent
15
15
  self.merchant = publicKey
16
16
  self.signature = signature
@@ -0,0 +1,135 @@
1
+ Metadata-Version: 2.4
2
+ Name: solidgate-sdk
3
+ Version: 0.3.2
4
+ Summary: Python API SDK for SolidGate payment gateway
5
+ Home-page: https://api-docs.solidgate.com/
6
+ Author: SolidGate
7
+ Author-email: info@solidgate.com
8
+ Classifier: Programming Language :: Python :: 3.7
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE.md
13
+ Requires-Dist: requests
14
+ Requires-Dist: pycryptodome
15
+ Dynamic: author
16
+ Dynamic: author-email
17
+ Dynamic: classifier
18
+ Dynamic: description
19
+ Dynamic: description-content-type
20
+ Dynamic: home-page
21
+ Dynamic: license-file
22
+ Dynamic: requires-dist
23
+ Dynamic: summary
24
+
25
+ # Solidgate API
26
+
27
+ [![PyPI version](https://badge.fury.io/py/solidgate-sdk.svg)](https://badge.fury.io/py/solidgate-sdk)
28
+
29
+ Python SDK provides API options for integrating Solidgate’s payment orchestrator into your Python applications.
30
+
31
+ Check our
32
+ * <a href="https://docs.solidgate.com/" target="_blank">Payment guide</a> to understand business value better
33
+ * <a href="https://api-docs.solidgate.com/" target="_blank">API Reference</a> to find more examples of usage
34
+
35
+ ## Structure
36
+
37
+ <table style="width: 100%; background: transparent;">
38
+ <colgroup>
39
+ <col style="width: 50%;">
40
+ <col style="width: 50%;">
41
+ </colgroup>
42
+ <tr>
43
+ <th>SDK for Python contains</th>
44
+ <th>Table of contents</th>
45
+ </tr>
46
+ <tr>
47
+ <td>
48
+ <ul>
49
+ <li>
50
+ <code>solidgate/</code> – main library source code for development
51
+ <ul>
52
+ <li><code>__init__.py</code> – initializes the SDK package for importing</li>
53
+ <li><code>api_client.py</code> – main file for API integration and HTTP request handling</li>
54
+ <li><code>encryption.py</code> – library for encryption-related operations</li>
55
+ <li><code>model.py</code> – defines data structures for payment attributes and responses</li>
56
+ </ul>
57
+ </li>
58
+ <li><code>setup.py</code> – script for managing dependencies and library imports</li>
59
+ </ul>
60
+ </td>
61
+ <td>
62
+ <a href="https://github.com/solidgate-tech/python-sdk?tab=readme-ov-file#requirements">Requirements</a><br>
63
+ <a href="https://github.com/solidgate-tech/python-sdk?tab=readme-ov-file#installation">Installation</a><br>
64
+ <a href="https://github.com/solidgate-tech/python-sdk?tab=readme-ov-file#usage">Usage</a><br>
65
+ <a href="https://github.com/solidgate-tech/python-sdk?tab=readme-ov-file#errors">Errors</a><br>
66
+ </td>
67
+ </tr>
68
+ </table>
69
+
70
+ <br>
71
+
72
+ ## Requirements
73
+
74
+ * **Python**: 3.7 or later
75
+ * **Packages**: `requests` library
76
+ * **Solidgate account**: Public and secret key (request via <a href="mailto:sales@solidgate.com">sales@solidgate.com</a>)
77
+
78
+ <br>
79
+
80
+ ## Installation
81
+
82
+ To start using the Python SDK:
83
+
84
+ 1. Ensure you have your public and secret key.
85
+ 2. Install the SDK in your project using pip:
86
+ ```bash
87
+ pip install solidgate-card-sdk
88
+ ```
89
+ 3. Import the classes into your project:
90
+ ```
91
+ from solidgate import ApiClient
92
+ client = ApiClient(public_key='YourMerchantId', secret_key='YourPrivateKey')
93
+ ```
94
+ 4. Use test credentials for integration testing. After successful testing, switch to production credentials.
95
+
96
+ <br>
97
+
98
+ ## Usage
99
+
100
+ ### Charge a payment
101
+
102
+ Create a class instance of the `ApiClient` class.
103
+
104
+ ```
105
+ from solidgate import ApiClient
106
+
107
+ client = ApiClient(public_key, secret_key)
108
+ ```
109
+
110
+ - `public_key` - unique merchant identification
111
+ - `secret_key` - secret code for request signature, it is provided at the moment of merchant registration
112
+
113
+ ### Resign form
114
+
115
+ ```python
116
+ response = client.form_resign({'order_id': '12345'})
117
+ ```
118
+
119
+ <br>
120
+
121
+ ## Errors
122
+
123
+ Handle <a href="https://docs.solidgate.com/payments/payments-insights/error-codes/" target="_blank">errors</a>.
124
+
125
+ ```python
126
+ try:
127
+ response = client.charge({...})
128
+ except Exception as e:
129
+ print(e)
130
+ ```
131
+
132
+ ---
133
+
134
+ Looking for help? <a href="https://support.solidgate.com/support/tickets/new" target="_blank">Contact us</a> <br>
135
+ Want to contribute? <a href="https://github.com/solidgate-tech/python-sdk/pulls" target="_blank">Submit a pull request</a>
@@ -1,44 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: solidgate-sdk
3
- Version: 0.3.0
4
- Summary: Python API SDK for SolidGate payment gateway
5
- Home-page: https://api-docs.solidgate.com/
6
- Author: SolidGate
7
- Author-email: info@solidgate.com
8
- Classifier: Programming Language :: Python :: 3.7
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Operating System :: OS Independent
11
- Description-Content-Type: text/markdown
12
- License-File: LICENSE.md
13
-
14
- [![PyPI version](https://badge.fury.io/py/solidgate-sdk.svg)](https://badge.fury.io/py/solidgate-sdk)
15
-
16
- # SolidGate API
17
- This library provides basic API options of SolidGate payment gateway.
18
-
19
- ## Requirements
20
-
21
- - Python 3.7
22
- - Packages: requests
23
- - SolidGate account. If you don’t have this you can request it by contacting sales@solidgate.com
24
-
25
- ## Installation
26
-
27
- Use pip command: ```pip3 install solidgate-card-sdk```
28
-
29
- ## Usage
30
-
31
- Create a class instance of the 'ApiClient' class.
32
- ```
33
- from solidgate import ApiClient
34
-
35
- client = ApiClient(public_key, secret_key)
36
- ```
37
- - public_key - unique merchant identification;
38
- - secret_key - secret code for request signature. It's provided at the moment of merchant registration.
39
-
40
- ## Documentation
41
- * https://docs.solidgate.com
42
-
43
- ## Support
44
- If you have any problems, questions or suggestions send your inquiry to info@solidgate.com.
@@ -1,31 +0,0 @@
1
- [![PyPI version](https://badge.fury.io/py/solidgate-sdk.svg)](https://badge.fury.io/py/solidgate-sdk)
2
-
3
- # SolidGate API
4
- This library provides basic API options of SolidGate payment gateway.
5
-
6
- ## Requirements
7
-
8
- - Python 3.7
9
- - Packages: requests
10
- - SolidGate account. If you don’t have this you can request it by contacting sales@solidgate.com
11
-
12
- ## Installation
13
-
14
- Use pip command: ```pip3 install solidgate-card-sdk```
15
-
16
- ## Usage
17
-
18
- Create a class instance of the 'ApiClient' class.
19
- ```
20
- from solidgate import ApiClient
21
-
22
- client = ApiClient(public_key, secret_key)
23
- ```
24
- - public_key - unique merchant identification;
25
- - secret_key - secret code for request signature. It's provided at the moment of merchant registration.
26
-
27
- ## Documentation
28
- * https://docs.solidgate.com
29
-
30
- ## Support
31
- If you have any problems, questions or suggestions send your inquiry to info@solidgate.com.
@@ -1,44 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: solidgate-sdk
3
- Version: 0.3.0
4
- Summary: Python API SDK for SolidGate payment gateway
5
- Home-page: https://api-docs.solidgate.com/
6
- Author: SolidGate
7
- Author-email: info@solidgate.com
8
- Classifier: Programming Language :: Python :: 3.7
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Operating System :: OS Independent
11
- Description-Content-Type: text/markdown
12
- License-File: LICENSE.md
13
-
14
- [![PyPI version](https://badge.fury.io/py/solidgate-sdk.svg)](https://badge.fury.io/py/solidgate-sdk)
15
-
16
- # SolidGate API
17
- This library provides basic API options of SolidGate payment gateway.
18
-
19
- ## Requirements
20
-
21
- - Python 3.7
22
- - Packages: requests
23
- - SolidGate account. If you don’t have this you can request it by contacting sales@solidgate.com
24
-
25
- ## Installation
26
-
27
- Use pip command: ```pip3 install solidgate-card-sdk```
28
-
29
- ## Usage
30
-
31
- Create a class instance of the 'ApiClient' class.
32
- ```
33
- from solidgate import ApiClient
34
-
35
- client = ApiClient(public_key, secret_key)
36
- ```
37
- - public_key - unique merchant identification;
38
- - secret_key - secret code for request signature. It's provided at the moment of merchant registration.
39
-
40
- ## Documentation
41
- * https://docs.solidgate.com
42
-
43
- ## Support
44
- If you have any problems, questions or suggestions send your inquiry to info@solidgate.com.
File without changes
File without changes