sofizpay-python-sdk 1.1.0__py3-none-any.whl

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.
sofizpay/__init__.py ADDED
@@ -0,0 +1,67 @@
1
+ """
2
+ SofizPay SDK - Python library for Stellar-based payments
3
+
4
+ This SDK provides easy-to-use functions for integrating SofizPay
5
+ payment functionality into Python applications.
6
+ """
7
+
8
+ from .client import SofizPayClient
9
+ from .payments import PaymentManager
10
+ from .transactions import TransactionManager
11
+ from .exceptions import (
12
+ SofizPayError,
13
+ PaymentError,
14
+ TransactionError,
15
+ NetworkError,
16
+ ValidationError
17
+ )
18
+
19
+ __version__ = "1.1.0"
20
+ __author__ = "SofizPay Team"
21
+ __email__ = "support@sofizpay.com"
22
+
23
+ # Unified class alias
24
+ SofizPaySDK = SofizPayClient
25
+
26
+ __all__ = [
27
+ "SofizPayClient",
28
+ "SofizPaySDK",
29
+ "PaymentManager",
30
+
31
+ "TransactionManager",
32
+ "SofizPayError",
33
+ "PaymentError",
34
+ "TransactionError",
35
+ "NetworkError",
36
+ "ValidationError",
37
+ "make_cib_transaction",
38
+ "make_sandbox_cib_transaction",
39
+ "verify_signature",
40
+ "verify_webhook_signature",
41
+ "verify_sofizpay_signature"
42
+ ]
43
+
44
+ # Convenience functions for easy access
45
+ def make_cib_transaction(transaction_data):
46
+ """Convenience function to make CIB transaction"""
47
+ client = SofizPayClient()
48
+ return client.make_cib_transaction(transaction_data)
49
+
50
+ def make_sandbox_cib_transaction(transaction_data):
51
+ """Convenience function to make Sandbox CIB transaction"""
52
+ client = SofizPayClient(sandbox=True)
53
+ return client.make_sandbox_cib_transaction(transaction_data)
54
+
55
+ def verify_signature(verification_data, signature=None):
56
+ """Convenience function to verify signature"""
57
+ return SofizPayClient.verify_signature(verification_data, signature)
58
+
59
+ def verify_webhook_signature(webhook_payload):
60
+ """Convenience function to verify SofizPay webhook signature"""
61
+ client = SofizPayClient()
62
+ return client.verify_webhook_signature(webhook_payload)
63
+
64
+ def verify_sofizpay_signature(verification_data):
65
+ """Convenience function to verify SofizPay signature (backward-compatible)"""
66
+ client = SofizPayClient()
67
+ return client.verify_sofizpay_signature(verification_data)