mangopay4-python-sdk 3.58.0__tar.gz → 3.59.0__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.
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/PKG-INFO +1 -1
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/mangopay/constants.py +11 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/mangopay/resources.py +42 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/mangopay/utils.py +6 -4
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/mangopay4_python_sdk.egg-info/PKG-INFO +1 -1
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/setup.py +1 -1
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_base.py +5 -1
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_identity_verification.py +38 -1
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_payins.py +25 -4
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/DESCRIPTION.md +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/LICENSE +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/MANIFEST.in +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/Makefile +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/README.md +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/mangopay/__init__.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/mangopay/api.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/mangopay/auth.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/mangopay/base.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/mangopay/compat.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/mangopay/exceptions.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/mangopay/fields.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/mangopay/page.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/mangopay/query.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/mangopay/ratelimit.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/mangopay/signals.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/mangopay4_python_sdk.egg-info/SOURCES.txt +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/mangopay4_python_sdk.egg-info/dependency_links.txt +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/mangopay4_python_sdk.egg-info/entry_points.txt +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/mangopay4_python_sdk.egg-info/requires.txt +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/mangopay4_python_sdk.egg-info/top_level.txt +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/setup.cfg +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/__init__.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/card.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/cardregistrations.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/cardregistrations_update.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/declarative_user.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/legal_user.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/legal_user_wallet.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/legal_user_wallet_89.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/legal_user_wallet_99.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/list_ubo_declarations.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/natural_user.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/natural_user_wallet.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/natural_user_wallet_9.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/ubo.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/ubo_declaration.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/ubo_declaration_submit.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/ubo_update.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/user_list_2_per_page.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/user_list_2_per_page_page1.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/user_list_3_per_page_page2.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/user_list_full.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/user_list_page1.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/user_wallet.json +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/images/image.jpg +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/mocks.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/resources/TestKycPageFile.png +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/resources/settlement_sample.csv +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/resources/settlement_sample_bad_footer.csv +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/resources/settlement_sample_bad_line.csv +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/resources.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/settings.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_acquiring.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_bankaccounts.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_banking_aliases.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_cards.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_client_wallets.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_clients.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_conversion.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_country_authorizations.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_deposits.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_disputes.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_documentconsult.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_emoney.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_idempotency.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_kyc_document.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_kycs.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_mandates.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_notifications.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_payouts.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_preauthorizations.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_rate_limit.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_recipients.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_refunds.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_reports.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_reports_v2.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_repudiations.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_settlements.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_tokens.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_transactions.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_transfers.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_ubos.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_users.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_utils.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_virtual_account.py +0 -0
- {mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_wallets.py +0 -0
|
@@ -223,6 +223,17 @@ EVENT_TYPE_CHOICES = Choices(
|
|
|
223
223
|
('IDENTITY_VERIFICATION_OUTDATED', 'identity_verification_outdated', 'Identity Verification Outdated'),
|
|
224
224
|
('IDENTITY_VERIFICATION_TIMEOUT', 'identity_verification_timeout', 'Identity Verification Timeout'),
|
|
225
225
|
('IDENTITY_VERIFICATION_PENDING', 'identity_verification_pending', 'Identity Verification Pending'),
|
|
226
|
+
('IDENTITY_VERIFICATION_EXPIRED', 'identity_verification_expired', 'Identity Verification Expired'),
|
|
227
|
+
('IDENTITY_VERIFICATION_PENDING_PSC_ACTION', 'identity_verification_pending_psc_action',
|
|
228
|
+
'Identity Verification Pending PSC Action'),
|
|
229
|
+
('IDENTITY_VERIFICATION_PSC_PENDING', 'identity_verification_psc_pending',
|
|
230
|
+
'Identity Verification PSC Pending'),
|
|
231
|
+
('IDENTITY_VERIFICATION_PSC_VALIDATED', 'identity_verification_psc_validated',
|
|
232
|
+
'Identity Verification PSC Validated'),
|
|
233
|
+
('IDENTITY_VERIFICATION_PSC_REJECTED', 'identity_verification_psc_rejected',
|
|
234
|
+
'Identity Verification PSC Rejected'),
|
|
235
|
+
('IDENTITY_VERIFICATION_PSC_ABANDONED', 'identity_verification_psc_abandoned',
|
|
236
|
+
'Identity Verification PSC Abandoned'),
|
|
226
237
|
|
|
227
238
|
('RECIPIENT_ACTIVE', 'recipient_active', 'Recipient Active'),
|
|
228
239
|
('RECIPIENT_CANCELED', 'recipient_canceled', 'Recipient Canceled'),
|
|
@@ -3302,6 +3302,7 @@ class IdentityVerification(BaseModel):
|
|
|
3302
3302
|
last_update = DateTimeField(api_name='UpdateDate')
|
|
3303
3303
|
user_id = CharField(api_name='UserId')
|
|
3304
3304
|
checks = ListField(api_name='Checks')
|
|
3305
|
+
pscs = ListField(api_name='PSCs')
|
|
3305
3306
|
|
|
3306
3307
|
class Meta:
|
|
3307
3308
|
verbose_name = 'identity_verification'
|
|
@@ -3327,6 +3328,40 @@ class IdentityVerification(BaseModel):
|
|
|
3327
3328
|
return select.all(*args, **kwargs)
|
|
3328
3329
|
|
|
3329
3330
|
|
|
3331
|
+
class Psc(BaseModel):
|
|
3332
|
+
first_name = CharField(api_name='FirstName')
|
|
3333
|
+
last_name = CharField(api_name='LastName')
|
|
3334
|
+
email = CharField(api_name='Email')
|
|
3335
|
+
date_of_birth = DateField(api_name='DateOfBirth')
|
|
3336
|
+
country = CharField(api_name='Country')
|
|
3337
|
+
nationality = CharField(api_name='Nationality')
|
|
3338
|
+
psc_type = CharField(api_name='PscType')
|
|
3339
|
+
status = CharField(api_name='Status')
|
|
3340
|
+
validation_date = DateTimeField(api_name='ValidationDate')
|
|
3341
|
+
hosted_url = CharField(api_name='HostedUrl')
|
|
3342
|
+
data = ListField(api_name='Data')
|
|
3343
|
+
last_update = DateTimeField(api_name='LastUpdate')
|
|
3344
|
+
|
|
3345
|
+
class Meta:
|
|
3346
|
+
verbose_name = 'psc'
|
|
3347
|
+
verbose_name_plural = 'pscs'
|
|
3348
|
+
|
|
3349
|
+
url = {
|
|
3350
|
+
'RETRY': '/identity-verifications/%(identity_verification_id)s/pscs/%(psc_id)s/retry'
|
|
3351
|
+
}
|
|
3352
|
+
|
|
3353
|
+
@classmethod
|
|
3354
|
+
def retry(cls, identity_verification_id, psc_id, **kwargs):
|
|
3355
|
+
"""Request the retry of a PSC session.
|
|
3356
|
+
|
|
3357
|
+
The keyword arguments can be empty or contain the values to be updated.
|
|
3358
|
+
"""
|
|
3359
|
+
path_params = {'identity_verification_id': identity_verification_id, 'psc_id': psc_id}
|
|
3360
|
+
update = UpdateQuery(Psc, None, path_params, **kwargs)
|
|
3361
|
+
update.identifier = 'RETRY'
|
|
3362
|
+
return update.execute()
|
|
3363
|
+
|
|
3364
|
+
|
|
3330
3365
|
class RecipientSchema(BaseModel):
|
|
3331
3366
|
display_name = RecipientPropertySchemaField(api_name='DisplayName')
|
|
3332
3367
|
payout_method_type = RecipientPropertySchemaField(api_name='PayoutMethodType')
|
|
@@ -3425,6 +3460,7 @@ class PayInIntent(BaseModel):
|
|
|
3425
3460
|
'REVERSE_REFUND': '/payins/intents/%(intent_id)s/refunds/%(refund_id)s/reverse',
|
|
3426
3461
|
'CREATE_DISPUTE': '/payins/intents/%(intent_id)s/captures/%(capture_id)s/disputes',
|
|
3427
3462
|
'UPDATE_DISPUTE_OUTCOME': '/payins/intents/%(intent_id)s/captures/%(capture_id)s/disputes/%(dispute_id)s/decision',
|
|
3463
|
+
'GET_EXTERNAL_PROVIDERS_LIST': '/payins/intents/external-providers',
|
|
3428
3464
|
}
|
|
3429
3465
|
|
|
3430
3466
|
def create_authorization(self, idempotency_key=None, **kwargs):
|
|
@@ -3481,6 +3517,12 @@ class PayInIntent(BaseModel):
|
|
|
3481
3517
|
update.identifier = 'UPDATE_DISPUTE_OUTCOME'
|
|
3482
3518
|
return update.execute(is_v3=True)
|
|
3483
3519
|
|
|
3520
|
+
@classmethod
|
|
3521
|
+
def get_external_providers_list(cls, *args, **kwargs):
|
|
3522
|
+
select = SelectQuery(PayInIntent, *args, **kwargs)
|
|
3523
|
+
select.identifier = 'GET_EXTERNAL_PROVIDERS_LIST'
|
|
3524
|
+
return select.get("", is_v3=True, strict_dict_parsing=False, *args, **kwargs)
|
|
3525
|
+
|
|
3484
3526
|
|
|
3485
3527
|
class Settlement(BaseModel):
|
|
3486
3528
|
settlement_id = CharField(api_name='SettlementId')
|
|
@@ -1521,7 +1521,7 @@ class PayInIntentSeller(object):
|
|
|
1521
1521
|
@add_camelcase_aliases
|
|
1522
1522
|
class IntentSplit(object):
|
|
1523
1523
|
def __init__(self, line_item_id=None, wallet_id=None, seller_id=None, split_amount=None, fees_amount=None,
|
|
1524
|
-
transfer_date=None, description=None, status=None):
|
|
1524
|
+
transfer_date=None, description=None, status=None, tag=None):
|
|
1525
1525
|
self.line_item_id = line_item_id
|
|
1526
1526
|
self.wallet_id = wallet_id
|
|
1527
1527
|
self.seller_id = seller_id
|
|
@@ -1530,11 +1530,12 @@ class IntentSplit(object):
|
|
|
1530
1530
|
self.description = description
|
|
1531
1531
|
self.status = status
|
|
1532
1532
|
self.transfer_date = transfer_date
|
|
1533
|
+
self.tag = tag
|
|
1533
1534
|
|
|
1534
1535
|
def __str__(self):
|
|
1535
|
-
return 'PayInIntentSplit: %s %s %s %s %s %s %s %s' % \
|
|
1536
|
+
return 'PayInIntentSplit: %s %s %s %s %s %s %s %s %s' % \
|
|
1536
1537
|
(self.line_item_id, self.wallet_id, self.seller_id, self.split_amount, self.fees_amount, self.description,
|
|
1537
|
-
self.status, self.transfer_date)
|
|
1538
|
+
self.status, self.transfer_date, self.tag)
|
|
1538
1539
|
|
|
1539
1540
|
def to_api_json(self):
|
|
1540
1541
|
return {
|
|
@@ -1545,7 +1546,8 @@ class IntentSplit(object):
|
|
|
1545
1546
|
"FeesAmount": self.fees_amount,
|
|
1546
1547
|
"Description": self.description,
|
|
1547
1548
|
"Status": self.status,
|
|
1548
|
-
"TransferDate": self.transfer_date
|
|
1549
|
+
"TransferDate": self.transfer_date,
|
|
1550
|
+
"Tag": self.tag
|
|
1549
1551
|
}
|
|
1550
1552
|
|
|
1551
1553
|
|
|
@@ -10,7 +10,7 @@ with open(path.join(here, 'DESCRIPTION.md'), encoding='utf-8') as f:
|
|
|
10
10
|
|
|
11
11
|
setup(
|
|
12
12
|
name='mangopay4-python-sdk',
|
|
13
|
-
version='3.
|
|
13
|
+
version='3.59.0',
|
|
14
14
|
description='A client library written in python to work with mangopay v2 api',
|
|
15
15
|
long_description='This SDK is a client library for interacting with the Mangopay API.',
|
|
16
16
|
url='https://github.com/Mangopay/mangopay2-python-sdk',
|
|
@@ -873,6 +873,7 @@ class BaseTestLive(unittest.TestCase):
|
|
|
873
873
|
intent_authorization.external_data = external_data
|
|
874
874
|
intent_authorization.line_items = line_items
|
|
875
875
|
intent_authorization.buyer = buyer
|
|
876
|
+
intent_authorization.tag = 'Intent tag'
|
|
876
877
|
return PayInIntent(**intent_authorization.create_authorization())
|
|
877
878
|
|
|
878
879
|
@staticmethod
|
|
@@ -908,11 +909,13 @@ class BaseTestLive(unittest.TestCase):
|
|
|
908
909
|
intent_authorization.external_data = external_data
|
|
909
910
|
intent_authorization.line_items = line_items
|
|
910
911
|
intent_authorization.buyer = buyer
|
|
912
|
+
intent_authorization.tag = 'Intent tag'
|
|
911
913
|
|
|
912
914
|
intent = PayInIntent(**intent_authorization.create_authorization())
|
|
913
915
|
|
|
914
916
|
full_capture = PayInIntent()
|
|
915
917
|
full_capture.external_data = external_data
|
|
918
|
+
full_capture.tag = 'Intent tag'
|
|
916
919
|
|
|
917
920
|
return PayInIntent(**full_capture.create_capture(intent.id))
|
|
918
921
|
|
|
@@ -928,7 +931,8 @@ class BaseTestLive(unittest.TestCase):
|
|
|
928
931
|
external_data.external_provider_payment_method = 'PAYPAL'
|
|
929
932
|
|
|
930
933
|
refund_dto = {
|
|
931
|
-
'external_data': external_data
|
|
934
|
+
'external_data': external_data,
|
|
935
|
+
'tag': 'Intent tag'
|
|
932
936
|
}
|
|
933
937
|
return PayInIntent(**PayInIntent.create_refund(full_capture.id, **refund_dto))
|
|
934
938
|
|
{mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_identity_verification.py
RENAMED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import unittest
|
|
2
|
+
import uuid
|
|
3
|
+
|
|
4
|
+
from mangopay.resources import IdentityVerification, Psc
|
|
2
5
|
from tests.test_base import BaseTestLive
|
|
3
6
|
|
|
4
7
|
|
|
5
8
|
class IdentityVerificationTest(BaseTestLive):
|
|
6
9
|
_identity_verification = None
|
|
10
|
+
_idv_id_with_pscs = 'idnver_01KZXBHDH1DWC887PW6T46NVTV'
|
|
11
|
+
_psc_id = 'psc_x_01KZXBT5F8FGGSK9JXGCYMNWRP'
|
|
7
12
|
|
|
8
13
|
def test_create_identity_verification(self):
|
|
9
14
|
self.create_new_identity_verification()
|
|
@@ -30,6 +35,38 @@ class IdentityVerificationTest(BaseTestLive):
|
|
|
30
35
|
self.assertIsInstance(fetched.data, list)
|
|
31
36
|
self.assertTrue(len(fetched.data) > 0)
|
|
32
37
|
|
|
38
|
+
def test_get_identity_verification_with_pscs(self):
|
|
39
|
+
fetched = IdentityVerification.get(IdentityVerificationTest._idv_id_with_pscs)
|
|
40
|
+
|
|
41
|
+
self.assertIsNotNone(fetched)
|
|
42
|
+
self.assertIsNotNone(fetched.pscs)
|
|
43
|
+
self.assertTrue(len(fetched.pscs) > 0)
|
|
44
|
+
self.assertTrue(len(fetched.pscs[0]['Data']) > 0)
|
|
45
|
+
|
|
46
|
+
@unittest.skip("PSC must be manually invalidated before testing")
|
|
47
|
+
def test_retry_psc_without_update_params(self):
|
|
48
|
+
psc = Psc(**Psc.retry(IdentityVerificationTest._idv_id_with_pscs, IdentityVerificationTest._psc_id))
|
|
49
|
+
|
|
50
|
+
self.assertIsNotNone(psc)
|
|
51
|
+
self.assertIsNotNone(psc.hosted_url)
|
|
52
|
+
self.assertEqual('PENDING_VALIDATION', psc.status)
|
|
53
|
+
|
|
54
|
+
@unittest.skip("PSC must be manually invalidated before testing")
|
|
55
|
+
def test_retry_psc_with_update_params(self):
|
|
56
|
+
first_name = str(uuid.uuid4())
|
|
57
|
+
last_name = str(uuid.uuid4())
|
|
58
|
+
|
|
59
|
+
psc = Psc(**Psc.retry(IdentityVerificationTest._idv_id_with_pscs,
|
|
60
|
+
IdentityVerificationTest._psc_id,
|
|
61
|
+
first_name=first_name,
|
|
62
|
+
last_name=last_name))
|
|
63
|
+
|
|
64
|
+
self.assertIsNotNone(psc)
|
|
65
|
+
self.assertIsNotNone(psc.hosted_url)
|
|
66
|
+
self.assertEqual('PENDING_VALIDATION', psc.status)
|
|
67
|
+
self.assertEqual(first_name, psc.first_name)
|
|
68
|
+
self.assertEqual(last_name, psc.last_name)
|
|
69
|
+
|
|
33
70
|
@staticmethod
|
|
34
71
|
def create_new_identity_verification():
|
|
35
72
|
if IdentityVerificationTest._identity_verification is None:
|
|
@@ -738,6 +738,7 @@ def create_new_splits(intent):
|
|
|
738
738
|
split = IntentSplit()
|
|
739
739
|
split.line_item_id = intent.line_items[0]['Id']
|
|
740
740
|
split.split_amount = 10
|
|
741
|
+
split.tag = 'custom tag'
|
|
741
742
|
|
|
742
743
|
intent_splits = PayInIntentSplits()
|
|
743
744
|
intent_splits.splits = [split]
|
|
@@ -2343,16 +2344,19 @@ class PayInsTestLive(BaseTestLive):
|
|
|
2343
2344
|
self.assertEqual('AUTHORIZED', created.status)
|
|
2344
2345
|
self.assertIsNotNone(created.unfunded_amount)
|
|
2345
2346
|
self.assertIsNotNone(created.line_items[0]['UnfundedSellerAmount'])
|
|
2347
|
+
self.assertEqual('Intent tag', created.tag)
|
|
2346
2348
|
|
|
2347
2349
|
def test_create_pay_in_intent_full_capture(self):
|
|
2348
2350
|
created = BaseTestLive.create_new_pay_in_intent_full_capture()
|
|
2349
2351
|
|
|
2350
2352
|
self.assertIsNotNone(created)
|
|
2351
2353
|
self.assertEqual('CAPTURED', created.status)
|
|
2354
|
+
self.assertEqual('Intent tag', created.tag)
|
|
2352
2355
|
|
|
2353
2356
|
def test_create_full_pay_in_intent_refund(self):
|
|
2354
2357
|
refund = BaseTestLive.create_new_full_pay_in_intent_refund()
|
|
2355
2358
|
self.assertEqual('REFUNDED', refund.status)
|
|
2359
|
+
self.assertEqual('Intent tag', refund.tag)
|
|
2356
2360
|
|
|
2357
2361
|
def test_create_partial_pay_in_intent_refund(self):
|
|
2358
2362
|
full_capture = BaseTestLive.create_new_pay_in_intent_full_capture()
|
|
@@ -2367,6 +2371,7 @@ class PayInsTestLive(BaseTestLive):
|
|
|
2367
2371
|
refund_dto = {
|
|
2368
2372
|
'external_data': external_data,
|
|
2369
2373
|
'amount': 1000,
|
|
2374
|
+
'tag': 'Intent tag',
|
|
2370
2375
|
'line_items': [
|
|
2371
2376
|
{
|
|
2372
2377
|
'id': full_capture.line_items[0]['Id'],
|
|
@@ -2376,6 +2381,7 @@ class PayInsTestLive(BaseTestLive):
|
|
|
2376
2381
|
}
|
|
2377
2382
|
refund = PayInIntent(**PayInIntent.create_refund(full_capture.id, **refund_dto))
|
|
2378
2383
|
self.assertEqual('REFUNDED', refund.status)
|
|
2384
|
+
self.assertEqual('Intent tag', refund.tag)
|
|
2379
2385
|
|
|
2380
2386
|
def test_fully_reverse_pay_in_intent_refund(self):
|
|
2381
2387
|
refund = BaseTestLive.create_new_full_pay_in_intent_refund()
|
|
@@ -2426,9 +2432,9 @@ class PayInsTestLive(BaseTestLive):
|
|
|
2426
2432
|
external_data = PayInIntentExternalData()
|
|
2427
2433
|
external_data.external_processing_date = '01-10-2026'
|
|
2428
2434
|
external_data.external_provider_reference = ''.join(random.choices(string.ascii_letters + string.digits, k=10))
|
|
2429
|
-
external_data.external_merchant_reference = 'Order-xyz-35e8490e-2ec9-4c82-978e-c712a3f5ba16'
|
|
2435
|
+
# external_data.external_merchant_reference = 'Order-xyz-35e8490e-2ec9-4c82-978e-c712a3f5ba16'
|
|
2430
2436
|
external_data.external_provider_name = 'Stripe'
|
|
2431
|
-
external_data.external_provider_payment_method = 'PAYPAL'
|
|
2437
|
+
# external_data.external_provider_payment_method = 'PAYPAL'
|
|
2432
2438
|
|
|
2433
2439
|
line_item = PayInIntentLineItem()
|
|
2434
2440
|
line_item.id = intent.line_items[0]['Id']
|
|
@@ -2452,6 +2458,7 @@ class PayInsTestLive(BaseTestLive):
|
|
|
2452
2458
|
fetched = PayInIntent.get(intent.id)
|
|
2453
2459
|
self.assertIsNotNone(fetched)
|
|
2454
2460
|
self.assertEqual(fetched.status, intent.status)
|
|
2461
|
+
self.assertEqual(intent.tag, fetched.tag)
|
|
2455
2462
|
|
|
2456
2463
|
def test_cancel_pay_in_intent(self):
|
|
2457
2464
|
intent = BaseTestLive.create_new_pay_in_intent_authorization()
|
|
@@ -2464,12 +2471,19 @@ class PayInsTestLive(BaseTestLive):
|
|
|
2464
2471
|
cancelled = PayInIntent(**PayInIntent.cancel(intent.id, **cancel_details))
|
|
2465
2472
|
self.assertEqual(cancelled.status, 'CANCELLED')
|
|
2466
2473
|
|
|
2474
|
+
def test_get_external_providers_list(self):
|
|
2475
|
+
providers = PayInIntent.get_external_providers_list()
|
|
2476
|
+
self.assertIsNotNone(providers)
|
|
2477
|
+
self.assertTrue(len(providers) > 0)
|
|
2478
|
+
self.assertIn('Mangopay', providers)
|
|
2479
|
+
|
|
2467
2480
|
def test_create_pay_in_intent_splits(self):
|
|
2468
2481
|
intent = BaseTestLive.create_new_pay_in_intent_authorization()
|
|
2469
2482
|
created_splits = create_new_splits(intent)
|
|
2470
2483
|
|
|
2471
2484
|
self.assertIsNotNone(created_splits)
|
|
2472
2485
|
self.assertEqual('CREATED', created_splits.splits[0]['Status'])
|
|
2486
|
+
self.assertIsNotNone(created_splits.splits[0]['Tag'])
|
|
2473
2487
|
|
|
2474
2488
|
def test_execute_split(self):
|
|
2475
2489
|
intent = BaseTestLive.create_new_pay_in_intent_authorization()
|
|
@@ -2494,6 +2508,7 @@ class PayInsTestLive(BaseTestLive):
|
|
|
2494
2508
|
created_splits = create_new_splits(intent)
|
|
2495
2509
|
fetched = PayInIntentSplit.get(intent.id, created_splits.splits[0]['Id'])
|
|
2496
2510
|
self.assertEqual('CREATED', fetched.status)
|
|
2511
|
+
self.assertIsNotNone(fetched.tag)
|
|
2497
2512
|
|
|
2498
2513
|
def test_update_split(self):
|
|
2499
2514
|
intent = BaseTestLive.create_new_pay_in_intent_authorization()
|
|
@@ -2503,10 +2518,12 @@ class PayInsTestLive(BaseTestLive):
|
|
|
2503
2518
|
created_splits.splits[0]['Id'],
|
|
2504
2519
|
**{
|
|
2505
2520
|
'description': 'updated description',
|
|
2506
|
-
'line_item_id': created_splits.splits[0]['LineItemId']
|
|
2521
|
+
'line_item_id': created_splits.splits[0]['LineItemId'],
|
|
2522
|
+
'tag': 'updated tag'
|
|
2507
2523
|
}
|
|
2508
2524
|
)
|
|
2509
2525
|
self.assertEqual('updated description', updated['description'])
|
|
2526
|
+
self.assertEqual('updated tag', updated['tag'])
|
|
2510
2527
|
|
|
2511
2528
|
def test_create_client_bank_wire_direct_payin(self):
|
|
2512
2529
|
pay_in = ClientBankWireDirectPayIn()
|
|
@@ -2575,10 +2592,12 @@ class PayInsTestLive(BaseTestLive):
|
|
|
2575
2592
|
external_data.external_provider_payment_method = 'PAYPAL'
|
|
2576
2593
|
|
|
2577
2594
|
create_dto = {
|
|
2578
|
-
'external_data': external_data
|
|
2595
|
+
'external_data': external_data,
|
|
2596
|
+
'tag': 'Intent tag'
|
|
2579
2597
|
}
|
|
2580
2598
|
dispute = PayInIntent(**PayInIntent.create_dispute(full_capture.id, full_capture.capture.id, **create_dto))
|
|
2581
2599
|
self.assertEqual('DISPUTED', dispute.status)
|
|
2600
|
+
self.assertEqual('Intent tag', dispute.tag)
|
|
2582
2601
|
|
|
2583
2602
|
def test_create_partial_pay_in_intent_dispute(self):
|
|
2584
2603
|
full_capture = BaseTestLive.create_new_pay_in_intent_full_capture()
|
|
@@ -2593,6 +2612,7 @@ class PayInsTestLive(BaseTestLive):
|
|
|
2593
2612
|
create_dto = {
|
|
2594
2613
|
'external_data': external_data,
|
|
2595
2614
|
'amount': 1000,
|
|
2615
|
+
'tag': 'Intent tag',
|
|
2596
2616
|
'line_items': [
|
|
2597
2617
|
{
|
|
2598
2618
|
'id': full_capture.line_items[0]['Id'],
|
|
@@ -2602,6 +2622,7 @@ class PayInsTestLive(BaseTestLive):
|
|
|
2602
2622
|
}
|
|
2603
2623
|
dispute = PayInIntent(**PayInIntent.create_dispute(full_capture.id, full_capture.capture.id, **create_dto))
|
|
2604
2624
|
self.assertEqual('DISPUTED', dispute.status)
|
|
2625
|
+
self.assertEqual('Intent tag', dispute.tag)
|
|
2605
2626
|
|
|
2606
2627
|
def test_update_intent_dispute_outcome(self):
|
|
2607
2628
|
full_capture = BaseTestLive.create_new_pay_in_intent_full_capture()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/cardregistrations.json
RENAMED
|
File without changes
|
|
File without changes
|
{mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/declarative_user.json
RENAMED
|
File without changes
|
|
File without changes
|
{mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/legal_user_wallet.json
RENAMED
|
File without changes
|
{mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/legal_user_wallet_89.json
RENAMED
|
File without changes
|
{mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/legal_user_wallet_99.json
RENAMED
|
File without changes
|
|
File without changes
|
{mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/natural_user.json
RENAMED
|
File without changes
|
{mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/natural_user_wallet.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/ubo_declaration.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/user_list_2_per_page.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/user_list_full.json
RENAMED
|
File without changes
|
{mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/fixtures/user_list_page1.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/resources/TestKycPageFile.png
RENAMED
|
File without changes
|
{mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/resources/settlement_sample.csv
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mangopay4_python_sdk-3.58.0 → mangopay4_python_sdk-3.59.0}/tests/test_country_authorizations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|