mangopay4-python-sdk 3.52.0__py2.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.
- mangopay/__init__.py +27 -0
- mangopay/api.py +381 -0
- mangopay/auth.py +130 -0
- mangopay/base.py +289 -0
- mangopay/compat.py +16 -0
- mangopay/constants.py +466 -0
- mangopay/exceptions.py +26 -0
- mangopay/fields.py +1345 -0
- mangopay/page.py +17 -0
- mangopay/query.py +280 -0
- mangopay/ratelimit.py +5 -0
- mangopay/resources.py +3219 -0
- mangopay/signals.py +14 -0
- mangopay/utils.py +1582 -0
- mangopay4_python_sdk-3.52.0.dist-info/METADATA +53 -0
- mangopay4_python_sdk-3.52.0.dist-info/RECORD +20 -0
- mangopay4_python_sdk-3.52.0.dist-info/WHEEL +6 -0
- mangopay4_python_sdk-3.52.0.dist-info/entry_points.txt +2 -0
- mangopay4_python_sdk-3.52.0.dist-info/licenses/LICENSE +22 -0
- mangopay4_python_sdk-3.52.0.dist-info/top_level.txt +1 -0
mangopay/constants.py
ADDED
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
from .utils import Choices
|
|
2
|
+
|
|
3
|
+
USER_TYPE_CHOICES = Choices(
|
|
4
|
+
('NATURAL', 'natural', 'Natural user'),
|
|
5
|
+
('LEGAL', 'legal', 'Legal user'),
|
|
6
|
+
('PLATFORM', 'platform', 'Platform user')
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
LEGAL_USER_TYPE_CHOICES = Choices(
|
|
10
|
+
('BUSINESS', 'business', 'Business'),
|
|
11
|
+
('ORGANIZATION', 'organization', 'Organization'),
|
|
12
|
+
('SOLETRADER', 'soletrader', 'Soletrader'),
|
|
13
|
+
('PARTNERSHIP', 'partnership', 'Partnership')
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
STATUS_CHOICES = Choices(
|
|
17
|
+
('CREATED', 'created', 'Created'),
|
|
18
|
+
('SUCCEEDED', 'succeeded', 'Succeeded'),
|
|
19
|
+
('FAILED', 'failed', 'Failed')
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
CARD_TYPE_CHOICES = Choices(
|
|
23
|
+
('CB_VISA_MASTERCARD', 'cb_visa_mastercard', 'CB VISA MASTERCARD'),
|
|
24
|
+
('MAESTRO', 'maestro', 'Maestro'),
|
|
25
|
+
('DINERS', 'diners', 'Diners'),
|
|
26
|
+
('AMEX', 'amex', 'Amex'),
|
|
27
|
+
('MASTERPASS', 'masterpass', 'Masterpass'),
|
|
28
|
+
('P24', 'p24', 'P24'),
|
|
29
|
+
('IDEAL', 'ideal', 'Ideal'),
|
|
30
|
+
('PAYLIB', 'paylib', 'Paylib'),
|
|
31
|
+
('BCMC', 'bcmc', 'Bcmc')
|
|
32
|
+
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
PAYMENT_STATUS_CHOICES = Choices(
|
|
36
|
+
('WAITING', 'waiting', 'Waiting'),
|
|
37
|
+
('CANCELED', 'canceled', 'Canceled'),
|
|
38
|
+
('EXPIRED', 'expired', 'Expired'),
|
|
39
|
+
('VALIDATED', 'validated', 'Validated'),
|
|
40
|
+
('CANCEL_REQUESTED', 'cancel_requested', 'Cancel Requested'),
|
|
41
|
+
('TO_BE_COMPLETED', 'to_be_completed', 'To Be Completed'),
|
|
42
|
+
('NO_SHOW_REQUESTED', 'no_show_requested', 'No Show Requested'),
|
|
43
|
+
('NO_SHOW', 'no_show', 'No Show'),
|
|
44
|
+
('FAILED', 'failed', 'Failed')
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
VALIDITY_CHOICES = Choices(
|
|
48
|
+
('UNKNOWN', 'unknown', 'Unknown'),
|
|
49
|
+
('VALID', 'valid', 'Valid'),
|
|
50
|
+
('INVALID', 'invalid', 'Invalid')
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
TRANSACTION_TYPE_CHOICES = Choices(
|
|
54
|
+
('PAYIN', 'payin', 'Pay In'),
|
|
55
|
+
('PAYOUT', 'payout', 'Pay out'),
|
|
56
|
+
('TRANSFER', 'transfer', 'Transfer'),
|
|
57
|
+
('CARD_VALIDATION', 'card_validation', 'Card validation')
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
NATURE_CHOICES = Choices(
|
|
61
|
+
('REGULAR', 'regular', 'Regular'),
|
|
62
|
+
('REFUND', 'refund', 'Refund'),
|
|
63
|
+
('REPUDIATION', 'repudiation', 'Repudiation'),
|
|
64
|
+
('SETTLEMENT', 'settlement', 'Settlement')
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
EXECUTION_TYPE_CHOICES = Choices(
|
|
68
|
+
('WEB', 'web', 'Web'),
|
|
69
|
+
('DIRECT', 'direct', 'Direct'),
|
|
70
|
+
('EXTERNAL_INSTRUCTION', 'external_instruction', 'External instruction')
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
SECURE_MODE_CHOICES = Choices(
|
|
74
|
+
('DEFAULT', 'default', 'Default'),
|
|
75
|
+
('FORCE', 'force', 'Force'),
|
|
76
|
+
('NO_CHOICE', 'no_choice', 'No_Choice')
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
BANK_ACCOUNT_TYPE_CHOICES = Choices(
|
|
80
|
+
('IBAN', 'iban', 'Iban'),
|
|
81
|
+
('GB', 'gb', 'GB'),
|
|
82
|
+
('US', 'us', 'US'),
|
|
83
|
+
('CA', 'ca', 'CA'),
|
|
84
|
+
('OTHER', 'other', 'Other')
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
DEPOSIT_CHOICES = Choices(
|
|
88
|
+
('CHECKING', 'checking', 'Checking'),
|
|
89
|
+
('SAVINGS', 'savings', 'Savings'),
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
DOCUMENTS_TYPE_CHOICES = Choices(
|
|
93
|
+
('IDENTITY_PROOF', 'identity_proof', 'Identity proof'),
|
|
94
|
+
('REGISTRATION_PROOF', 'registration_proof', 'Registration proof'),
|
|
95
|
+
('ARTICLES_OF_ASSOCIATION', 'articles_of_association', 'Articles of association'),
|
|
96
|
+
('SHAREHOLDER_DECLARATION', 'shareholder_declaration', 'Shareholder Declaration'),
|
|
97
|
+
('ADDRESS_PROOF', 'address_proof', 'Address Proof')
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
DOCUMENTS_STATUS_CHOICES = Choices(
|
|
101
|
+
('CREATED', 'created', 'Created'),
|
|
102
|
+
('VALIDATION_ASKED', 'validation_asked', 'Validation asked'),
|
|
103
|
+
('VALIDATED', 'validated', 'Validated'),
|
|
104
|
+
('REFUSED', 'refused', 'Refused'),
|
|
105
|
+
('OUT_OF_DATE', 'out_of_date', 'Out of Date')
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
EVENT_TYPE_CHOICES = Choices(
|
|
109
|
+
('KYC_CREATED', 'kyc_created', 'KYC Created'),
|
|
110
|
+
('KYC_SUCCEEDED', 'kyc_succeeded', 'KYC succeeded'),
|
|
111
|
+
('KYC_FAILED', 'kyc_failed', 'KYC failed'),
|
|
112
|
+
('KYC_VALIDATION_ASKED', 'kyc_validation_asked', 'KYC Validation asked'),
|
|
113
|
+
('KYC_OUTDATED', 'kyc_outdated', 'KYC Outdated'),
|
|
114
|
+
('PAYIN_NORMAL_CREATED', 'payin_normal_created', 'Payin normal created'),
|
|
115
|
+
('PAYIN_NORMAL_SUCCEEDED', 'payin_normal_succeeded', 'Payin normal succeeded'),
|
|
116
|
+
('PAYIN_NORMAL_FAILED', 'payin_normal_failed', 'Payin normal failed'),
|
|
117
|
+
('PAYIN_NORMAL_PROCESSING_STATUS_PENDING_SUCCEEDED',
|
|
118
|
+
'payin_normal_processing_status_pending_succeeded', 'Payin normal processing status pending succeeded'),
|
|
119
|
+
('PAYOUT_NORMAL_CREATED', 'payout_normal_created', 'Payout normal created'),
|
|
120
|
+
('PAYOUT_NORMAL_SUCCEEDED', 'payout_normal_succeeded', 'Payout normal succeeded'),
|
|
121
|
+
('PAYOUT_NORMAL_FAILED', 'payout_normal_failed', 'Payout normal failed'),
|
|
122
|
+
('TRANSFER_NORMAL_CREATED', 'transfer_normal_created', 'Transfer normal created'),
|
|
123
|
+
('TRANSFER_NORMAL_SUCCEEDED', 'transfer_normal_succeeded', 'Transfer normal succeeded'),
|
|
124
|
+
('TRANSFER_NORMAL_FAILED', 'transfer_normal_failed', 'Transfer normal failed'),
|
|
125
|
+
('PAYIN_REFUND_CREATED', 'payin_refund_created', 'Payin refund created'),
|
|
126
|
+
('PAYIN_REFUND_SUCCEEDED', 'payin_refund_succeeded', 'Payin refund succeeded'),
|
|
127
|
+
('PAYIN_REFUND_FAILED', 'payin_refund_failed', 'Payin refund failed'),
|
|
128
|
+
('PAYOUT_REFUND_CREATED', 'payout_refund_created', 'Payout refund created'),
|
|
129
|
+
('PAYOUT_REFUND_SUCCEEDED', 'payout_refund_succeeded', 'Payout refund succeeded'),
|
|
130
|
+
('PAYOUT_REFUND_FAILED', 'payout_refund_failed', 'Payout refund failed'),
|
|
131
|
+
('TRANSFER_REFUND_CREATED', 'transfer_refund_created', 'Transfer refund created'),
|
|
132
|
+
('TRANSFER_REFUND_SUCCEEDED', 'transfer_refund_succeeded', 'Transfer refund succeeded'),
|
|
133
|
+
('TRANSFER_REFUND_FAILED', 'transfer_refund_failed', 'Transfer refund failed'),
|
|
134
|
+
('MANDATE_CREATED', 'mandate_created', 'Mandate created'),
|
|
135
|
+
('MANDATE_FAILED', 'mandate_failed', 'Mandate failed'),
|
|
136
|
+
('MANDATE_ACTIVATED', 'mandate_activated', 'Mandate activated'),
|
|
137
|
+
('MANDATE_SUBMITTED', 'mandate_submitted', 'Mandate submitted'),
|
|
138
|
+
('MANDATE_EXPIRED', 'mandate_expired', 'Mandate expired'),
|
|
139
|
+
('USER_KYC_REGULAR', 'user_kyc_regular', 'User kyc regular'),
|
|
140
|
+
('USER_INFLOWS_BLOCKED', 'user_inflows_blocked', 'User inflows blocked'),
|
|
141
|
+
('USER_INFLOWS_UNBLOCKED', 'user_inflows_unblocked', 'User inflows unblocked'),
|
|
142
|
+
('USER_OUTFLOWS_BLOCKED', 'user_outflows_blocked', 'User outflows blocked'),
|
|
143
|
+
('USER_OUTFLOWS_UNBLOCKED', 'user_outflows_unblocked', 'User outflows unblocked'),
|
|
144
|
+
('PREAUTHORIZATION_CREATED', 'preauthorization_created', 'PreAuthorization created'),
|
|
145
|
+
('PREAUTHORIZATION_SUCCEEDED', 'preauthorization_succeeded', 'PreAuthorization succeeded'),
|
|
146
|
+
('PREAUTHORIZATION_FAILED', 'preauthorization_failed', 'PreAuthorization failed'),
|
|
147
|
+
('INSTANT_PAYOUT_SUCCEEDED', 'instant_payout_succeeded', 'Instant Payout Succeeded'),
|
|
148
|
+
('INSTANT_PAYOUT_FALLBACKED', 'instant_payout_fallbacked', 'Instant Payout Fallbacked'),
|
|
149
|
+
('INSTANT_PAYOUT_FAILED', 'instant_payout_failed', 'Instant Payout Failed'),
|
|
150
|
+
('RECURRING_REGISTRATION_CREATED', 'recurring_registration_created', 'Recurring Registration Created'),
|
|
151
|
+
('RECURRING_REGISTRATION_AUTH_NEEDED', 'recurring_registration_auth_needed', 'Recurring Auth Needed'),
|
|
152
|
+
('RECURRING_REGISTRATION_IN_PROGRESS', 'recurring_registration_in_progress', 'Recurring In Progress'),
|
|
153
|
+
('RECURRING_REGISTRATION_ENDED', 'recurring_registration_ended', 'Recurring Ended'),
|
|
154
|
+
('COUNTRY_AUTHORIZATION_UPDATED', 'country_authorization_updated', 'Country Authorization Updated'),
|
|
155
|
+
('DISPUTE_ACTION_REQUIRED', 'dispute_action_required', 'Dispute Action Required'),
|
|
156
|
+
('DISPUTE_CLOSED', 'dispute_closed', 'Dispute Closed'),
|
|
157
|
+
('DISPUTE_CREATED', 'dispute_created', 'Dispute Created'),
|
|
158
|
+
('DISPUTE_DOCUMENT_CREATED', 'dispute_document_created', 'Dispute Document Created'),
|
|
159
|
+
('DISPUTE_DOCUMENT_VALIDATION_ASKED', 'dispute_document_validation_asked', 'Dispute Document Validation Asked'),
|
|
160
|
+
('DISPUTE_DOCUMENT_SUCCEEDED', 'dispute_document_succeeded', 'Dispute Document Succeeded'),
|
|
161
|
+
('DISPUTE_DOCUMENT_FAILED', 'dispute_document_failed', 'Dispute Document Failed'),
|
|
162
|
+
('DISPUTE_FURTHER_ACTION_REQUIRED', 'dispute_further_action_required', 'Dispute Further Action Required'),
|
|
163
|
+
('DISPUTE_SENT_TO_BANK', 'dispute_sent_to_bank', 'Dispute Sent To Bank'),
|
|
164
|
+
('DISPUTE_SUBMITTED', 'dispute_submitted', 'Dispute Submitted'),
|
|
165
|
+
('PAYIN_REPUDIATION_CREATED', 'payin_repudiation_created', 'Payin Repudiation Created'),
|
|
166
|
+
('PAYIN_REPUDIATION_SUCCEEDED', 'payin_repudiation_succeeded', 'Payin Repudiation Succeeded'),
|
|
167
|
+
('PAYIN_REPUDIATION_FAILED', 'payin_repudiation_failed', 'Payin Repudiation Failed'),
|
|
168
|
+
('PREAUTHORIZATION_PAYMENT_WAITING', 'preauthorization_payment_waiting', 'Preauthorization Payment Waiting'),
|
|
169
|
+
('PREAUTHORIZATION_PAYMENT_EXPIRED', 'preauthorization_payment_expired', 'Preauthorization Payment Expired'),
|
|
170
|
+
('PREAUTHORIZATION_PAYMENT_CANCELED', 'preauthorization_payment_canceled', 'Preauthorization Payment Canceled'),
|
|
171
|
+
('PREAUTHORIZATION_PAYMENT_VALIDATED', 'preauthorization_payment_validated', 'Preauthorization Payment Validated'),
|
|
172
|
+
('TRANSFER_SETTLEMENT_CREATED', 'transfer_settlement_created', 'Transfer Settlement Created'),
|
|
173
|
+
('TRANSFER_SETTLEMENT_SUCCEEDED', 'transfer_settlement_succeeded', 'Transfer Settlement Succeeded'),
|
|
174
|
+
('TRANSFER_SETTLEMENT_FAILED', 'transfer_settlement_failed', 'Transfer Settlement Failed'),
|
|
175
|
+
('UBO_DECLARATION_CREATED', 'ubo_declaration_created', 'Ubo Declaration Created'),
|
|
176
|
+
('UBO_DECLARATION_VALIDATION_ASKED', 'ubo_declaration_validation_asked', 'Ubo Declaration Validation Asked'),
|
|
177
|
+
('UBO_DECLARATION_REFUSED', 'ubo_declaration_refused', 'Ubo Declaration Refused'),
|
|
178
|
+
('UBO_DECLARATION_VALIDATED', 'ubo_declaration_validated', 'Ubo Declaration Validated'),
|
|
179
|
+
('UBO_DECLARATION_INCOMPLETE', 'ubo_declaration_incomplete', 'Ubo Declaration Incomplete'),
|
|
180
|
+
('USER_KYC_LIGHT', 'user_kyc_light', 'User Kyc Light'),
|
|
181
|
+
|
|
182
|
+
('SCA_ENROLLMENT_SUCCEEDED', 'sca_enrollment_succeeded', 'Sca enrollment succeeded'),
|
|
183
|
+
('SCA_ENROLLMENT_FAILED', 'sca_enrollment_failed', 'Sca enrollment failed'),
|
|
184
|
+
('SCA_ENROLLMENT_EXPIRED', 'sca_enrollment_expired', 'Sca enrollment expired'),
|
|
185
|
+
|
|
186
|
+
('VIRTUAL_ACCOUNT_ACTIVE', 'virtual_account_active', 'Virtual Account Active'),
|
|
187
|
+
('VIRTUAL_ACCOUNT_BLOCKED', 'virtual_account_blocked', 'Virtual Account Blocked'),
|
|
188
|
+
('VIRTUAL_ACCOUNT_CLOSED', 'virtual_account_closed', 'Virtual Account Closed'),
|
|
189
|
+
('VIRTUAL_ACCOUNT_FAILED', 'virtual_account_failed', 'Virtual Account Failed'),
|
|
190
|
+
|
|
191
|
+
('DEPOSIT_PREAUTHORIZATION_CREATED', 'deposit_preauthorization_created', 'Deposit Preauthorization Created'),
|
|
192
|
+
('DEPOSIT_PREAUTHORIZATION_FAILED', 'deposit_preauthorization_failed', 'Deposit Preauthorization Failed'),
|
|
193
|
+
('DEPOSIT_PREAUTHORIZATION_PAYMENT_WAITING', 'deposit_preauthorization_payment_waiting',
|
|
194
|
+
'Deposit Preauthorization Payment Waiting'),
|
|
195
|
+
('DEPOSIT_PREAUTHORIZATION_PAYMENT_EXPIRED', 'deposit_preauthorization_payment_expired',
|
|
196
|
+
'Deposit Preauthorization Payment Expired'),
|
|
197
|
+
('DEPOSIT_PREAUTHORIZATION_PAYMENT_CANCEL_REQUESTED', 'deposit_preauthorization_payment_cancel_requested',
|
|
198
|
+
'Deposit Preauthorization Payment Cancel Requested'),
|
|
199
|
+
('DEPOSIT_PREAUTHORIZATION_PAYMENT_CANCELED', 'deposit_preauthorization_payment_canceled',
|
|
200
|
+
'Deposit Preauthorization Payment Canceled'),
|
|
201
|
+
('DEPOSIT_PREAUTHORIZATION_PAYMENT_VALIDATED', 'deposit_preauthorization_payment_validated',
|
|
202
|
+
'Deposit Preauthorization Payment Validated'),
|
|
203
|
+
|
|
204
|
+
('CARD_VALIDATION_CREATED', 'card_validation_created', 'Card Validation Created'),
|
|
205
|
+
('CARD_VALIDATION_FAILED', 'card_validation_failed', 'Card Validation Failed'),
|
|
206
|
+
('CARD_VALIDATION_SUCCEEDED', 'card_validation_succeeded', 'Card Validation Succeeded'),
|
|
207
|
+
|
|
208
|
+
('IDENTITY_VERIFICATION_VALIDATED', 'identity_verification_validated', 'Identity Verification Validated'),
|
|
209
|
+
('IDENTITY_VERIFICATION_FAILED', 'identity_verification_failed', 'Identity Verification Failed'),
|
|
210
|
+
('IDENTITY_VERIFICATION_INCONCLUSIVE', 'identity_verification_inconclusive', 'Identity Verification Inconclusive'),
|
|
211
|
+
('IDENTITY_VERIFICATION_OUTDATED', 'identity_verification_outdated', 'Identity Verification Outdated'),
|
|
212
|
+
('IDENTITY_VERIFICATION_TIMEOUT', 'identity_verification_timeout', 'Identity Verification Timeout'),
|
|
213
|
+
('IDENTITY_VERIFICATION_PENDING', 'identity_verification_pending', 'Identity Verification Pending'),
|
|
214
|
+
|
|
215
|
+
('RECIPIENT_ACTIVE', 'recipient_active', 'Recipient Active'),
|
|
216
|
+
('RECIPIENT_CANCELED', 'recipient_canceled', 'Recipient Canceled'),
|
|
217
|
+
('RECIPIENT_DEACTIVATED', 'recipient_deactivated', 'Recipient Deactivated'),
|
|
218
|
+
|
|
219
|
+
('USER_ACCOUNT_VALIDATION_ASKED', 'user_account_validation_asked', 'User Account Validation Asked'),
|
|
220
|
+
('USER_ACCOUNT_ACTIVATED', 'user_account_activated', 'User Account Activated'),
|
|
221
|
+
('USER_ACCOUNT_CLOSED', 'user_account_closed', 'User Account Closed'),
|
|
222
|
+
|
|
223
|
+
('INSTANT_CONVERSION_CREATED', 'instant_conversion_created', 'Instant Conversion Created'),
|
|
224
|
+
('INSTANT_CONVERSION_SUCCEEDED', 'instant_conversion_succeeded', 'Instant Conversion Succeeded'),
|
|
225
|
+
('INSTANT_CONVERSION_FAILED', 'instant_conversion_failed', 'Instant Conversion Failed'),
|
|
226
|
+
('QUOTED_CONVERSION_CREATED', 'quoted_conversion_created', 'Quoted Conversion Created'),
|
|
227
|
+
('QUOTED_CONVERSION_SUCCEEDED', 'quoted_conversion_succeeded', 'Quoted Conversion Succeeded'),
|
|
228
|
+
('QUOTED_CONVERSION_FAILED', 'quoted_conversion_failed', 'Quoted Conversion Failed'),
|
|
229
|
+
|
|
230
|
+
('USER_CATEGORY_UPDATED_TO_OWNER', 'user_category_updated_to_owner', 'User category updated to owner'),
|
|
231
|
+
('USER_CATEGORY_UPDATED_TO_PAYER', 'user_category_updated_to_payer', 'User category updated to payer'),
|
|
232
|
+
('USER_CATEGORY_UPDATED_TO_PLATFORM', 'user_category_updated_to_platform', 'User category updated to platform'),
|
|
233
|
+
|
|
234
|
+
('REPORT_GENERATED', 'report_generated', 'Report Generated'),
|
|
235
|
+
('REPORT_FAILED', 'report_failed', 'Report Failed'),
|
|
236
|
+
|
|
237
|
+
('INTENT_AUTHORIZED', 'intent_authorized', 'Intent Authorized'),
|
|
238
|
+
('INTENT_CAPTURED', 'intent_captured', 'Intent Captured'),
|
|
239
|
+
('INTENT_REFUNDED', 'intent_refunded', 'Intent Refunded'),
|
|
240
|
+
('INTENT_REFUND_REVERSED', 'intent_refund_reversed', 'Intent Refund Reversed'),
|
|
241
|
+
('INTENT_DISPUTE_CREATED', 'intent_dispute_created', 'Intent Dispute Created'),
|
|
242
|
+
('INTENT_DISPUTE_DEFENDED', 'intent_dispute_defended', 'Intent Dispute Defended'),
|
|
243
|
+
('INTENT_DISPUTE_WON', 'intent_dispute_won', 'Intent Dispute Won'),
|
|
244
|
+
('INTENT_DISPUTE_LOST', 'intent_dispute_lost', 'Intent Dispute Lost'),
|
|
245
|
+
('INTENT_SETTLED_NOT_PAID', 'intent_settled_not_paid', 'Intent Settled Not Paid'),
|
|
246
|
+
('INTENT_PAID', 'intent_paid', 'Intent Paid'),
|
|
247
|
+
|
|
248
|
+
('SPLIT_CREATED', 'split_created', 'Split Created'),
|
|
249
|
+
('SPLIT_PENDING_FUNDS_RECEPTION', 'split_pending_funds_reception', 'Split Pending Funds Reception'),
|
|
250
|
+
('SPLIT_AVAILABLE', 'split_available', 'Split Available'),
|
|
251
|
+
('SPLIT_REJECTED', 'split_rejected', 'Split Rejected'),
|
|
252
|
+
('SPLIT_REVERSED', 'split_reversed', 'Split Reversed')
|
|
253
|
+
)
|
|
254
|
+
|
|
255
|
+
NOTIFICATION_STATUS_CHOICES = Choices(
|
|
256
|
+
('ENABLED', 'enabled', 'Enabled'),
|
|
257
|
+
('DISABLED', 'disabled', 'Disabled')
|
|
258
|
+
)
|
|
259
|
+
|
|
260
|
+
NOTIFICATION_VALIDITY_CHOICES = Choices(
|
|
261
|
+
('VALID', 'valid', 'Valid'),
|
|
262
|
+
('INVALID', 'invalid', 'Invalid')
|
|
263
|
+
)
|
|
264
|
+
|
|
265
|
+
DIRECT_DEBIT_TYPE_CHOICES = Choices(
|
|
266
|
+
('SOFORT', 'sofort', 'Sofort'),
|
|
267
|
+
('ELV', 'elv', 'ELV'),
|
|
268
|
+
('GIROPAY', 'giropay', 'Giropay')
|
|
269
|
+
)
|
|
270
|
+
|
|
271
|
+
DISPUTE_TYPE_CHOICE = Choices(
|
|
272
|
+
('CONTESTABLE', 'contestable', 'Contestable'),
|
|
273
|
+
('NOT_CONTESTABLE', 'not_contestable', 'Not Contestable'),
|
|
274
|
+
('RETRIEVAL', 'retrieval', 'Retrieval')
|
|
275
|
+
)
|
|
276
|
+
|
|
277
|
+
DISPUTES_STATUS_CHOICES = Choices(
|
|
278
|
+
('CREATED', 'created', 'Created'),
|
|
279
|
+
('PENDING_CLIENT_ACTION', 'pending_client_action', 'Pending Client Action'),
|
|
280
|
+
('SUBMITTED', 'submitted', 'Submitted'),
|
|
281
|
+
('PENDING_BANK_ACTION', 'pending_bank_action', 'Pending Bank Action'),
|
|
282
|
+
('REOPENED_PENDING_CLIENT_ACTION', 'reopened_pending_client_action', 'Reopened Pending Client Action'),
|
|
283
|
+
('CLOSED', 'closed', 'Closed')
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
DISPUTE_DOCUMENT_TYPE_CHOICES = Choices(
|
|
287
|
+
('DELIVERY_PROOF', 'delivery_proof', 'Delivery Proof'),
|
|
288
|
+
('INVOICE', 'invoice', 'Invoice'),
|
|
289
|
+
('REFUND_PROOF', 'refund_proof', 'Refund Proof'),
|
|
290
|
+
('USER_CORRESPONDANCE', 'user_correspondance', 'User Correspondance'),
|
|
291
|
+
('USER_ACCEPTANCE_PROOF', 'user_acceptance_proof', 'User Acceptance Proof'),
|
|
292
|
+
('PRODUCT_REPLACEMENT_PROOF', 'product_replacement_proof', 'Product Replacement Proof'),
|
|
293
|
+
('OTHER', 'other', 'Other')
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
REFUSED_REASON_TYPE_CHOICES = Choices(
|
|
297
|
+
('DOCUMENT_UNREADABLE', 'document_unreadable', 'Document Unreadable'),
|
|
298
|
+
('DOCUMENT_NOT_ACCEPTED', 'document_not_accepted', 'Document Not Accepted'),
|
|
299
|
+
('DOCUMENT_HAS_EXPIRED', 'document_has_expired', 'Document Has Expired'),
|
|
300
|
+
('DOCUMENT_INCOMPLETE', 'document_incomplete', 'Document Incomplete'),
|
|
301
|
+
('DOCUMENT_MISSING', 'document_missing', 'Document Missing'),
|
|
302
|
+
('DOCUMENT_DO_NOT_MATCH_USER_DATA', 'document_do_not_match_user_data', 'Document Do Not Match User Data'),
|
|
303
|
+
('DOCUMENT_DO_NOT_MATCH_ACCOUNT_DATA', 'document_do_not_match_account_data', 'Document Do Not Match Account Data'),
|
|
304
|
+
('SPECIFIC_CASE', 'specific_case', 'Specific Case'),
|
|
305
|
+
('DOCUMENT_FALSIFIED', 'document_falsified', 'Document Falsified'),
|
|
306
|
+
('UNDERAGE_PERSON', 'underage_person', 'Underage Person'),
|
|
307
|
+
('COUNTERFEIT_PRODUCT', 'counterfeit_product', 'Counterfeit Product'),
|
|
308
|
+
('OTHER', 'other', 'Other')
|
|
309
|
+
)
|
|
310
|
+
|
|
311
|
+
MANDATE_STATUS_CHOICES = Choices(
|
|
312
|
+
('CREATED', 'created', 'Created'),
|
|
313
|
+
('SUBMITTED', 'submitted', 'Submitted'),
|
|
314
|
+
('ACTIVE', 'active', 'Active'),
|
|
315
|
+
('FAILED', 'failed', 'Failed'),
|
|
316
|
+
('EXPIRED', 'expired', 'Expired')
|
|
317
|
+
)
|
|
318
|
+
|
|
319
|
+
MANDATE_TYPE_CHOICES = Choices(
|
|
320
|
+
('DIRECT_DEBIT', 'direct_debit', 'Direct Debit')
|
|
321
|
+
)
|
|
322
|
+
|
|
323
|
+
MANDATE_SCHEME_CHOICES = Choices(
|
|
324
|
+
('SEPA', 'sepa', 'Sepa'),
|
|
325
|
+
('BACS', 'bacs', 'Bacs')
|
|
326
|
+
)
|
|
327
|
+
|
|
328
|
+
PAYOUT_PAYMENT_TYPE = Choices(
|
|
329
|
+
('BANK_WIRE', 'bank_wire', 'Bank Wire')
|
|
330
|
+
)
|
|
331
|
+
|
|
332
|
+
KYC_LEVEL = Choices(
|
|
333
|
+
('LIGHT', 'light', 'Light'),
|
|
334
|
+
('REGULAR', 'regular', 'Regular')
|
|
335
|
+
)
|
|
336
|
+
|
|
337
|
+
PLATFORM_TYPE = Choices(
|
|
338
|
+
('MARKETPLACE', 'marketplace', 'Marketplace'),
|
|
339
|
+
('P2P_PAYMENT', 'p2p_payment', 'P2p Payment'),
|
|
340
|
+
('CROWDFUNDING_DONATION', 'crowdfunding_donation', 'Crowdfunding Donation'),
|
|
341
|
+
('CROWDFUNDING_REWARD', 'crowdfunding_reward', 'Crowdfunding Reward'),
|
|
342
|
+
('CROWDFUNDING_EQUITY', 'crowdfunding_equity', 'Crowdfunding Equity'),
|
|
343
|
+
('CROWDFUNDING_LOAN', 'crowdfunding_loan', 'Crowdfunding Loan'),
|
|
344
|
+
('OTHER', 'other', 'Other')
|
|
345
|
+
)
|
|
346
|
+
|
|
347
|
+
DOWNLOAD_FORMAT = Choices(
|
|
348
|
+
('CSV', 'csv', 'Csv')
|
|
349
|
+
)
|
|
350
|
+
|
|
351
|
+
REPORT_TYPE = Choices(
|
|
352
|
+
('TRANSACTIONS', 'transactions', 'Transactions'),
|
|
353
|
+
('WALLETS', 'wallets', 'Wallets')
|
|
354
|
+
)
|
|
355
|
+
|
|
356
|
+
PAYIN_PAYMENT_TYPE = Choices(
|
|
357
|
+
("CARD", "card", "Card"),
|
|
358
|
+
("DIRECT_DEBIT", "direct_debit", "Direct Debit"),
|
|
359
|
+
("PREAUTHORIZED", "preauthorized", "Preauthorized"),
|
|
360
|
+
("BANK_WIRE", "bank_wire", "Bank Wire"),
|
|
361
|
+
("APPLEPAY", "applepay", "Applepay"),
|
|
362
|
+
("GOOGLEPAY", "googlepay", "Googlepay"),
|
|
363
|
+
("GOOGLE_PAY", "google_pay", "Google Pay"),
|
|
364
|
+
("MBWAY", "mbway", "Mbway"),
|
|
365
|
+
("PAYPAL", "paypal", "PayPal"),
|
|
366
|
+
("MULTIBANCO", "multibanco", "Multibanco"),
|
|
367
|
+
("SATISPAY", "satispay", "Satispay"),
|
|
368
|
+
("BLIK", "blik", "Blik"),
|
|
369
|
+
("IDEAL", "ideal", "Ideal"),
|
|
370
|
+
("GIROPAY", "giropay", "Giropay"),
|
|
371
|
+
("BCMC", "bancontact", "Bancontact"),
|
|
372
|
+
("BIZUM", "bizum", "Bizum"),
|
|
373
|
+
("SWISH", "swish", "Swish"),
|
|
374
|
+
("TWINT", "twint", "Twint")
|
|
375
|
+
)
|
|
376
|
+
|
|
377
|
+
RECURRING_PAYIN_REGISTRATION_PAYMENT_TYPE = Choices(
|
|
378
|
+
("CARD_DIRECT", "card_direct", "Card Direct"),
|
|
379
|
+
("PAYPAL", "paypal", "PayPal"),
|
|
380
|
+
)
|
|
381
|
+
|
|
382
|
+
CARD_STATUS_CHOICES = Choices(
|
|
383
|
+
("CREATED", "created", "Created"),
|
|
384
|
+
("VALIDATED", "validated", "Validated"),
|
|
385
|
+
("ERROR", "error", "Error")
|
|
386
|
+
)
|
|
387
|
+
|
|
388
|
+
UBO_DECLARATION_STATUS_CHOICES = Choices(
|
|
389
|
+
("CREATED", "created", "Created"),
|
|
390
|
+
("VALIDATION_ASKED", "validation_asked", "Validation Asked"),
|
|
391
|
+
("VALIDATED", "validated", "Validated"),
|
|
392
|
+
("REFUSED", "refused", "Refused"),
|
|
393
|
+
("INCOMPLETE", "incomplete", "Incomplete")
|
|
394
|
+
)
|
|
395
|
+
|
|
396
|
+
UBO_DECLARATION_REFUSED_REASON_CHOICES = Choices(
|
|
397
|
+
("MISSING_UBO", "missing_ubo", "Missing UBO"),
|
|
398
|
+
("DECLARATION_DO_NOT_MATCH_UBO_INFORMATION", "declaration_do_not_match_ubo_information", "Declaration Do Not "
|
|
399
|
+
"Match UBO Information")
|
|
400
|
+
)
|
|
401
|
+
|
|
402
|
+
DECLARED_UBO_STATUS_CHOICES = Choices(
|
|
403
|
+
("CREATED", "created", "Created"),
|
|
404
|
+
("VALIDATED", "validated", "Validated"),
|
|
405
|
+
("REFUSED", "refused", "Refused")
|
|
406
|
+
)
|
|
407
|
+
|
|
408
|
+
DECLARED_UBO_REFUSED_REASON_CHOICES = Choices(
|
|
409
|
+
("INVALID_DECLARED_UBO", "invalid_declared_ubo", "Invalid Declared UBO"),
|
|
410
|
+
("INVALID_UBO_DETAILS", "invalid_ubo_details", "Invalid UBO Details")
|
|
411
|
+
)
|
|
412
|
+
|
|
413
|
+
NATURAL_USER_CAPACITY_CHOICES = Choices(
|
|
414
|
+
("NORMAL", "normal", "Normal"),
|
|
415
|
+
("DECLARATIVE", "declarative", "Declarative")
|
|
416
|
+
)
|
|
417
|
+
|
|
418
|
+
AVS_RESULT_CHOICES = Choices(
|
|
419
|
+
("FULL_MATCH", "full_match", "Full Match"),
|
|
420
|
+
("ADDRESS_MATCH_ONLY", "address_match_only", "Address Match Only"),
|
|
421
|
+
("POSTAL_CODE_MATCH_ONLY", "postal_code_match_only", "Postal Code Match Only"),
|
|
422
|
+
("NO_MATCH", "no_match", "No Match"),
|
|
423
|
+
("NO_CHECK", "no_check", "No Check")
|
|
424
|
+
)
|
|
425
|
+
|
|
426
|
+
DEPOSIT_STATUS_CHOICES = Choices(
|
|
427
|
+
('CREATED', 'created', 'Created'),
|
|
428
|
+
('SUCCEEDED', 'succeeded', 'Succeeded'),
|
|
429
|
+
('FAILED', 'failed', 'Failed')
|
|
430
|
+
)
|
|
431
|
+
|
|
432
|
+
SHIPPING_PREFERENCE_CHOICES = Choices(
|
|
433
|
+
('SET_PROVIDED_ADDRESS', 'set_provided_address', 'Set Provided Address'),
|
|
434
|
+
('GET_FROM_FILE', 'get_from_file', 'Get From File'),
|
|
435
|
+
('NO_SHIPPING', 'no_shipping', 'No Shipping')
|
|
436
|
+
)
|
|
437
|
+
|
|
438
|
+
BIC_CHOICES = Choices(
|
|
439
|
+
('RABONL2U'),
|
|
440
|
+
('ABNANL2A'),
|
|
441
|
+
('FVLBNL22'),
|
|
442
|
+
('TRIONL2U'),
|
|
443
|
+
('INGBNL2A'),
|
|
444
|
+
('SNSBNL2A'),
|
|
445
|
+
('ASNBNL21'),
|
|
446
|
+
('RBRBNL21'),
|
|
447
|
+
('KNABNL2H'),
|
|
448
|
+
('BUNQNL2A'),
|
|
449
|
+
('REVOLT21'),
|
|
450
|
+
('BITSNL2A')
|
|
451
|
+
)
|
|
452
|
+
|
|
453
|
+
BANK_NAME_CHOICES = Choices(
|
|
454
|
+
('Rabobank'),
|
|
455
|
+
('ABN AMRO'),
|
|
456
|
+
('Van Lanschot Baniers'),
|
|
457
|
+
('Triodos Bank'),
|
|
458
|
+
('ING Bank'),
|
|
459
|
+
('SNS Bank'),
|
|
460
|
+
('ASN'),
|
|
461
|
+
('RegioBank'),
|
|
462
|
+
('Knab'),
|
|
463
|
+
('Bunq'),
|
|
464
|
+
('Revolut'),
|
|
465
|
+
('Yoursafe')
|
|
466
|
+
)
|
mangopay/exceptions.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
class APIError(Exception):
|
|
2
|
+
def __init__(self, *args, **kwargs):
|
|
3
|
+
self.code = kwargs.pop('code', None)
|
|
4
|
+
self.url = kwargs.pop('url', None)
|
|
5
|
+
self.content = kwargs.pop('content', None)
|
|
6
|
+
self.headers = kwargs.pop('headers', None)
|
|
7
|
+
|
|
8
|
+
super(APIError, self).__init__(*args, **kwargs)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class DecodeError(APIError):
|
|
12
|
+
def __init__(self, *args, **kwargs):
|
|
13
|
+
self.body = kwargs.pop('body', None)
|
|
14
|
+
self.headers = kwargs.pop('headers', None)
|
|
15
|
+
self.url = kwargs.pop('url', None)
|
|
16
|
+
self.content = kwargs.pop('content', None)
|
|
17
|
+
|
|
18
|
+
super(DecodeError, self).__init__(*args, **kwargs)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class AuthenticationError(APIError):
|
|
22
|
+
pass
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class CurrencyMismatch(Exception):
|
|
26
|
+
pass
|