mangopay4-python-sdk 3.55.0__tar.gz → 3.56.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.55.0 → mangopay4_python_sdk-3.56.0}/PKG-INFO +1 -1
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/mangopay/fields.py +4 -1
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/mangopay/resources.py +232 -45
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/mangopay/utils.py +14 -10
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/mangopay4_python_sdk.egg-info/PKG-INFO +1 -1
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/mangopay4_python_sdk.egg-info/SOURCES.txt +1 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/setup.py +1 -1
- mangopay4_python_sdk-3.56.0/tests/test_acquiring.py +215 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_base.py +4 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_cards.py +5 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_payins.py +5 -107
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/DESCRIPTION.md +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/LICENSE +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/MANIFEST.in +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/Makefile +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/README.md +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/mangopay/__init__.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/mangopay/api.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/mangopay/auth.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/mangopay/base.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/mangopay/compat.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/mangopay/constants.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/mangopay/exceptions.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/mangopay/page.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/mangopay/query.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/mangopay/ratelimit.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/mangopay/signals.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/mangopay4_python_sdk.egg-info/dependency_links.txt +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/mangopay4_python_sdk.egg-info/entry_points.txt +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/mangopay4_python_sdk.egg-info/requires.txt +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/mangopay4_python_sdk.egg-info/top_level.txt +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/setup.cfg +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/__init__.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/card.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/cardregistrations.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/cardregistrations_update.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/declarative_user.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/legal_user.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/legal_user_wallet.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/legal_user_wallet_89.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/legal_user_wallet_99.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/list_ubo_declarations.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/natural_user.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/natural_user_wallet.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/natural_user_wallet_9.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/ubo.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/ubo_declaration.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/ubo_declaration_submit.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/ubo_update.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/user_list_2_per_page.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/user_list_2_per_page_page1.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/user_list_3_per_page_page2.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/user_list_full.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/user_list_page1.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/user_wallet.json +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/images/image.jpg +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/mocks.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/resources/TestKycPageFile.png +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/resources/settlement_sample.csv +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/resources/settlement_sample_bad.csv +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/resources.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/settings.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_bankaccounts.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_banking_aliases.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_client_wallets.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_clients.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_conversion.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_country_authorizations.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_deposits.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_disputes.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_documentconsult.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_emoney.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_idempotency.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_identity_verification.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_kyc_document.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_kycs.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_mandates.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_notifications.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_payouts.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_preauthorizations.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_rate_limit.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_recipients.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_refunds.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_reports.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_reports_v2.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_repudiations.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_settlements.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_tokens.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_transactions.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_transfers.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_ubos.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_users.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_utils.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_virtual_account.py +0 -0
- {mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_wallets.py +0 -0
|
@@ -1220,7 +1220,8 @@ class ReportFilterField(Field):
|
|
|
1220
1220
|
status=value.get('Status', None), type=value.get('Type', None),
|
|
1221
1221
|
intent_id=value.get('IntentId', None),
|
|
1222
1222
|
external_provider_name=value.get('ExternalProviderName', None),
|
|
1223
|
-
scheduled=value.get('Scheduled', None)
|
|
1223
|
+
scheduled=value.get('Scheduled', None),
|
|
1224
|
+
settlement_id=value.get('SettlementId', None))
|
|
1224
1225
|
|
|
1225
1226
|
return value
|
|
1226
1227
|
|
|
@@ -1247,6 +1248,8 @@ class ReportFilterField(Field):
|
|
|
1247
1248
|
result['ExternalProviderName'] = value.external_provider_name
|
|
1248
1249
|
if value.scheduled is not None:
|
|
1249
1250
|
result['Scheduled'] = value.scheduled
|
|
1251
|
+
if value.settlement_id is not None:
|
|
1252
|
+
result['SettlementId'] = value.settlement_id
|
|
1250
1253
|
return result
|
|
1251
1254
|
|
|
1252
1255
|
return value
|
|
@@ -762,12 +762,21 @@ class CardValidation(BaseModel):
|
|
|
762
762
|
select.identifier = 'GET_CARD_VALIDATION'
|
|
763
763
|
return select.all(*args, **kwargs)
|
|
764
764
|
|
|
765
|
+
@classmethod
|
|
766
|
+
def get(cls, card_validation_id, card_id, *args, **kwargs):
|
|
767
|
+
kwargs['card_id'] = card_id
|
|
768
|
+
kwargs['id'] = card_validation_id
|
|
769
|
+
select = SelectQuery(CardValidation, *args, **kwargs)
|
|
770
|
+
select.identifier = 'GET'
|
|
771
|
+
return select.get("", *args, **kwargs)
|
|
772
|
+
|
|
765
773
|
class Meta:
|
|
766
774
|
verbose_name = 'card_validation'
|
|
767
775
|
verbose_name_plural = 'card_validations'
|
|
768
776
|
url = {
|
|
769
777
|
'CARD_VALIDATE': '/cards/%(id)s/validation',
|
|
770
|
-
'GET_CARD_VALIDATION': '/cards/%(card_id)s/validation/%(id)s'
|
|
778
|
+
'GET_CARD_VALIDATION': '/cards/%(card_id)s/validation/%(id)s',
|
|
779
|
+
'GET': '/cards/%(card_id)s/validation/%(id)s'
|
|
771
780
|
}
|
|
772
781
|
|
|
773
782
|
|
|
@@ -1263,50 +1272,6 @@ class PayPalWebPayIn(PayIn):
|
|
|
1263
1272
|
return action.execute()
|
|
1264
1273
|
|
|
1265
1274
|
|
|
1266
|
-
@python_2_unicode_compatible
|
|
1267
|
-
class PayconiqPayIn(PayIn):
|
|
1268
|
-
author = ForeignKeyField(User, api_name='AuthorId', required=True)
|
|
1269
|
-
debited_funds = MoneyField(api_name='DebitedFunds', required=True)
|
|
1270
|
-
fees = MoneyField(api_name='Fees', required=True)
|
|
1271
|
-
return_url = CharField(api_name='ReturnURL', required=False)
|
|
1272
|
-
redirect_url = CharField(api_name='RedirectURL', required=False)
|
|
1273
|
-
creation_date = DateField(api_name='CreationDate', required=False)
|
|
1274
|
-
expiration_date = CharField(api_name='ExpirationDate', required=False)
|
|
1275
|
-
deep_link_url = CharField(api_name='DeepLinkURL', required=False)
|
|
1276
|
-
|
|
1277
|
-
class Meta:
|
|
1278
|
-
verbose_name = 'payin'
|
|
1279
|
-
verbose_name_plural = 'payins'
|
|
1280
|
-
url = {
|
|
1281
|
-
InsertQuery.identifier: '/payins/payconiq/web',
|
|
1282
|
-
SelectQuery.identifier: '/payins'
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
@python_2_unicode_compatible
|
|
1287
|
-
class PayconiqV2PayIn(PayIn):
|
|
1288
|
-
author = ForeignKeyField(User, api_name='AuthorId', required=True)
|
|
1289
|
-
debited_funds = MoneyField(api_name='DebitedFunds', required=True)
|
|
1290
|
-
fees = MoneyField(api_name='Fees', required=True)
|
|
1291
|
-
return_url = CharField(api_name='ReturnURL', required=True)
|
|
1292
|
-
credited_wallet = ForeignKeyField(Wallet, api_name='CreditedWalletId', required=True)
|
|
1293
|
-
redirect_url = CharField(api_name='RedirectURL')
|
|
1294
|
-
creation_date = DateField(api_name='CreationDate')
|
|
1295
|
-
expiration_date = CharField(api_name='ExpirationDate')
|
|
1296
|
-
deep_link_url = CharField(api_name='DeepLinkURL')
|
|
1297
|
-
country = CharField(api_name='Country', required=True)
|
|
1298
|
-
statement_descriptor = CharField(api_name='StatementDescriptor')
|
|
1299
|
-
qr_code_url = CharField(api_name='QRCodeURL')
|
|
1300
|
-
|
|
1301
|
-
class Meta:
|
|
1302
|
-
verbose_name = 'payin'
|
|
1303
|
-
verbose_name_plural = 'payins'
|
|
1304
|
-
url = {
|
|
1305
|
-
InsertQuery.identifier: '/payins/payment-methods/payconiq',
|
|
1306
|
-
SelectQuery.identifier: '/payins'
|
|
1307
|
-
}
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
1275
|
class ApplepayPayIn(PayIn):
|
|
1311
1276
|
tag = CharField(api_name='Tag')
|
|
1312
1277
|
author = ForeignKeyField(User, api_name='AuthorId', required=True)
|
|
@@ -3325,3 +3290,225 @@ class ScaStatus(BaseModel):
|
|
|
3325
3290
|
select = SelectQuery(ScaStatus, *args, **kwargs)
|
|
3326
3291
|
select.identifier = 'GET'
|
|
3327
3292
|
return select.get("", *args, **kwargs)
|
|
3293
|
+
|
|
3294
|
+
|
|
3295
|
+
class AcquiringDirectPayIn(PayIn):
|
|
3296
|
+
secure_mode_redirect_url = CharField(api_name='SecureModeRedirectURL')
|
|
3297
|
+
secure_mode_return_url = CharField(api_name='SecureModeReturnURL', required=True)
|
|
3298
|
+
card = ForeignKeyField(Card, api_name='CardId', required=True)
|
|
3299
|
+
secure_mode_needed = BooleanField(api_name='SecureModeNeeded')
|
|
3300
|
+
secure_mode = CharField(api_name='SecureMode',
|
|
3301
|
+
choices=constants.SECURE_MODE_CHOICES,
|
|
3302
|
+
default=constants.SECURE_MODE_CHOICES.default,
|
|
3303
|
+
required=True)
|
|
3304
|
+
creation_date = DateTimeField(api_name='CreationDate')
|
|
3305
|
+
statement_descriptor = CharField(api_name='StatementDescriptor')
|
|
3306
|
+
debited_funds = MoneyField(api_name='DebitedFunds', required=True)
|
|
3307
|
+
billing = BillingField(api_name='Billing')
|
|
3308
|
+
security_info = SecurityInfoField(api_name='SecurityInfo')
|
|
3309
|
+
culture = CharField(api_name='Culture')
|
|
3310
|
+
ip_address = CharField(api_name='IpAddress', required=True)
|
|
3311
|
+
browser_info = BrowserInfoField(api_name='BrowserInfo', required=True)
|
|
3312
|
+
shipping = ShippingField(api_name='Shipping')
|
|
3313
|
+
requested_3ds_version = CharField(api_name='Requested3DSVersion')
|
|
3314
|
+
applied_3ds_version = CharField(api_name='Applied3DSVersion')
|
|
3315
|
+
preferred_card_network = CharField(api_name='PreferredCardNetwork')
|
|
3316
|
+
card_info = CardInfoField(api_name='CardInfo')
|
|
3317
|
+
payment_category = CharField(api_name='PaymentCategory')
|
|
3318
|
+
|
|
3319
|
+
class Meta:
|
|
3320
|
+
verbose_name = 'acquiring_payin'
|
|
3321
|
+
verbose_name_plural = 'acquiring_payins'
|
|
3322
|
+
url = {
|
|
3323
|
+
InsertQuery.identifier: '/acquiring/payins/card/direct',
|
|
3324
|
+
SelectQuery.identifier: '/payins'
|
|
3325
|
+
}
|
|
3326
|
+
|
|
3327
|
+
|
|
3328
|
+
class AcquiringIdealPayIn(PayIn):
|
|
3329
|
+
debited_funds = MoneyField(api_name='DebitedFunds', required=True)
|
|
3330
|
+
return_url = CharField(api_name='ReturnURL', required=True)
|
|
3331
|
+
bic = CharField(api_name='Bic', choices=constants.BIC_CHOICES)
|
|
3332
|
+
statement_descriptor = CharField(api_name='StatementDescriptor')
|
|
3333
|
+
creation_date = DateTimeField(api_name='CreationDate')
|
|
3334
|
+
redirect_url = CharField(api_name='RedirectURL')
|
|
3335
|
+
bank_name = CharField(api_name='BankName', choices=constants.BANK_NAME_CHOICES)
|
|
3336
|
+
|
|
3337
|
+
class Meta:
|
|
3338
|
+
verbose_name = 'acquiring_ideal_payin'
|
|
3339
|
+
verbose_name_plural = 'acquiring_ideal_payins'
|
|
3340
|
+
url = {
|
|
3341
|
+
InsertQuery.identifier: '/acquiring/payins/payment-methods/ideal',
|
|
3342
|
+
SelectQuery.identifier: '/payins'
|
|
3343
|
+
}
|
|
3344
|
+
|
|
3345
|
+
|
|
3346
|
+
class AcquiringApplepayPayIn(PayIn):
|
|
3347
|
+
tag = CharField(api_name='Tag')
|
|
3348
|
+
payment_data = ApplepayPaymentDataField(api_name='PaymentData', required=True)
|
|
3349
|
+
debited_funds = MoneyField(api_name='DebitedFunds', required=True)
|
|
3350
|
+
statement_descriptor = CharField(api_name='StatementDescriptor')
|
|
3351
|
+
card_info = CardInfoField(api_name='CardInfo')
|
|
3352
|
+
|
|
3353
|
+
class Meta:
|
|
3354
|
+
verbose_name = 'acquiring_applepay_payin'
|
|
3355
|
+
verbose_name_plural = 'acquiring_applepay_payins'
|
|
3356
|
+
url = {
|
|
3357
|
+
InsertQuery.identifier: '/acquiring/payins/payment-methods/applepay',
|
|
3358
|
+
SelectQuery.identifier: '/payins'
|
|
3359
|
+
}
|
|
3360
|
+
|
|
3361
|
+
|
|
3362
|
+
class AcquiringGooglePayDirectPayIn(PayIn):
|
|
3363
|
+
debited_funds = MoneyField(api_name='DebitedFunds', required=True)
|
|
3364
|
+
secure_mode_return_url = CharField(api_name='SecureModeReturnURL', required=True)
|
|
3365
|
+
secure_mode_redirect_url = CharField(api_name='SecureModeRedirectURL')
|
|
3366
|
+
secure_mode = CharField(api_name='SecureMode',
|
|
3367
|
+
choices=constants.SECURE_MODE_CHOICES,
|
|
3368
|
+
default=constants.SECURE_MODE_CHOICES.default)
|
|
3369
|
+
ip_address = CharField(api_name='IpAddress', required=True)
|
|
3370
|
+
browser_info = BrowserInfoField(api_name='BrowserInfo', required=True)
|
|
3371
|
+
payment_data = CharField(api_name='PaymentData', required=True)
|
|
3372
|
+
shipping = ShippingField(api_name='Shipping')
|
|
3373
|
+
billing = BillingField(api_name='Billing')
|
|
3374
|
+
statement_descriptor = CharField(api_name='StatementDescriptor')
|
|
3375
|
+
card_info = CardInfoField(api_name='CardInfo')
|
|
3376
|
+
|
|
3377
|
+
class Meta:
|
|
3378
|
+
verbose_name = 'acquiring_googlepay_direct_payin'
|
|
3379
|
+
verbose_name_plural = 'acquiring_googlepay_direct_payins'
|
|
3380
|
+
url = {
|
|
3381
|
+
InsertQuery.identifier: '/acquiring/payins/payment-methods/googlepay',
|
|
3382
|
+
SelectQuery.identifier: '/payins'
|
|
3383
|
+
}
|
|
3384
|
+
|
|
3385
|
+
|
|
3386
|
+
class AcquiringPayPalWebPayIn(PayIn):
|
|
3387
|
+
creation_date = DateTimeField(api_name='CreationDate')
|
|
3388
|
+
debited_funds = MoneyField(api_name='DebitedFunds', required=True)
|
|
3389
|
+
return_url = CharField(api_name='ReturnURL', required=True)
|
|
3390
|
+
redirect_url = CharField(api_name='RedirectURL')
|
|
3391
|
+
statement_descriptor = CharField(api_name='StatementDescriptor')
|
|
3392
|
+
shipping = ShippingField(api_name='Shipping')
|
|
3393
|
+
line_items = ListField(api_name='LineItems', required=True)
|
|
3394
|
+
culture = CharField(api_name='Culture')
|
|
3395
|
+
shipping_preference = CharField(api_name='ShippingPreference', choices=constants.SHIPPING_PREFERENCE_CHOICES,
|
|
3396
|
+
default=None)
|
|
3397
|
+
reference = CharField(api_name='Reference')
|
|
3398
|
+
cancel_url = CharField(api_name='CancelURL')
|
|
3399
|
+
paypal_payer_id = CharField(api_name='PaypalPayerID')
|
|
3400
|
+
buyer_country = CharField(api_name='BuyerCountry')
|
|
3401
|
+
buyer_first_name = CharField(api_name='BuyerFirstname')
|
|
3402
|
+
buyer_last_name = CharField(api_name='BuyerLastname')
|
|
3403
|
+
buyer_phone = CharField(api_name='BuyerPhone')
|
|
3404
|
+
paypal_order_id = CharField(api_name='PaypalOrderID')
|
|
3405
|
+
trackings = ListField(api_name='Trackings')
|
|
3406
|
+
data_collection_id = CharField(api_name='DataCollectionId')
|
|
3407
|
+
|
|
3408
|
+
class Meta:
|
|
3409
|
+
verbose_name = 'acquiring_paypal_web_payin'
|
|
3410
|
+
verbose_name_plural = 'acquiring_paypal_web_payins'
|
|
3411
|
+
url = {
|
|
3412
|
+
InsertQuery.identifier: '/acquiring/payins/payment-methods/paypal',
|
|
3413
|
+
SelectQuery.identifier: '/payins'
|
|
3414
|
+
}
|
|
3415
|
+
|
|
3416
|
+
|
|
3417
|
+
class AcquiringPayPalDataCollection(BaseModel):
|
|
3418
|
+
# since the properties needed by PayPal are different depending on the use-case,
|
|
3419
|
+
# use Dict as payload and response for Create and Get. The cast to AcquiringPayPalDataCollection model is skipped.
|
|
3420
|
+
class Meta:
|
|
3421
|
+
verbose_name = 'acquiring_paypal_data_collection'
|
|
3422
|
+
verbose_name_plural = 'acquiring_paypal_data_collections'
|
|
3423
|
+
url = {
|
|
3424
|
+
'CREATE': '/acquiring/payins/payment-methods/paypal/data-collection',
|
|
3425
|
+
'GET': '/acquiring/payins/payment-methods/paypal/data-collection'
|
|
3426
|
+
}
|
|
3427
|
+
|
|
3428
|
+
@classmethod
|
|
3429
|
+
def create(cls, idempotency_key=None, handler=None, **kwargs):
|
|
3430
|
+
insert = InsertQuery(AcquiringPayPalDataCollection, idempotency_key, None, **kwargs)
|
|
3431
|
+
insert.insert_query = kwargs
|
|
3432
|
+
insert.identifier = 'CREATE'
|
|
3433
|
+
return insert.execute(handler=handler, strict_dict_parsing=False)
|
|
3434
|
+
|
|
3435
|
+
@classmethod
|
|
3436
|
+
def get(cls, data_collection_id, *args, **kwargs):
|
|
3437
|
+
select = SelectQuery(AcquiringPayPalDataCollection, *args, **kwargs)
|
|
3438
|
+
select.identifier = 'GET'
|
|
3439
|
+
return select.get(data_collection_id, strict_dict_parsing=False, **kwargs)
|
|
3440
|
+
|
|
3441
|
+
|
|
3442
|
+
class AcquiringPayInRefund(BaseModel):
|
|
3443
|
+
debited_funds = MoneyField(api_name='DebitedFunds')
|
|
3444
|
+
payin = ForeignKeyField(PayIn)
|
|
3445
|
+
reference = CharField(api_name='Reference')
|
|
3446
|
+
statement_descriptor = CharField(api_name='StatementDescriptor')
|
|
3447
|
+
status = CharField(api_name='Status', choices=constants.STATUS_CHOICES, default=None)
|
|
3448
|
+
result_code = CharField(api_name='ResultCode')
|
|
3449
|
+
result_message = CharField(api_name='ResultMessage')
|
|
3450
|
+
execution_date = DateTimeField(api_name='ExecutionDate')
|
|
3451
|
+
type = CharField(api_name='Type', choices=constants.TRANSACTION_TYPE_CHOICES, default=None)
|
|
3452
|
+
nature = CharField(api_name='Nature', choices=constants.NATURE_CHOICES, default=None)
|
|
3453
|
+
refund_reason = RefundReasonField(api_name='RefundReason')
|
|
3454
|
+
initial_transaction_id = CharField(api_name='InitialTransactionId')
|
|
3455
|
+
initial_transaction_type = CharField(api_name='InitialTransactionType', choices=constants.TRANSACTION_TYPE_CHOICES,
|
|
3456
|
+
default=None)
|
|
3457
|
+
initial_transaction_nature = CharField(api_name='InitialTransactionNature', choices=constants.NATURE_CHOICES,
|
|
3458
|
+
default=None)
|
|
3459
|
+
|
|
3460
|
+
class Meta:
|
|
3461
|
+
verbose_name = 'acquiring_payin_refund'
|
|
3462
|
+
verbose_name_plural = 'acquiring_payin_refund'
|
|
3463
|
+
url = {
|
|
3464
|
+
InsertQuery.identifier: '/acquiring/payins/%(payin_id)s/refunds'
|
|
3465
|
+
}
|
|
3466
|
+
|
|
3467
|
+
|
|
3468
|
+
class AcquiringCardValidation(BaseModel):
|
|
3469
|
+
creation_date = DateTimeField(api_name='CreationDate')
|
|
3470
|
+
ip_address = CharField(api_name='IpAddress', required=True)
|
|
3471
|
+
browser_info = BrowserInfoField(api_name='BrowserInfo', required=True)
|
|
3472
|
+
secure_mode_return_url = CharField(api_name='SecureModeReturnURL', required=True)
|
|
3473
|
+
secure_mode_redirect_url = CharField(api_name='SecureModeRedirectURL')
|
|
3474
|
+
secure_mode_needed = BooleanField(api_name='SecureModeNeeded')
|
|
3475
|
+
secure_mode = CharField(api_name='SecureMode',
|
|
3476
|
+
choices=constants.SECURE_MODE_CHOICES)
|
|
3477
|
+
validity = CharField(api_name='Validity',
|
|
3478
|
+
choices=constants.VALIDITY_CHOICES,
|
|
3479
|
+
default=constants.VALIDITY_CHOICES.unknown)
|
|
3480
|
+
type = CharField(api_name='Type', choices=constants.TRANSACTION_TYPE_CHOICES, default=None)
|
|
3481
|
+
applied_3ds_version = CharField(api_name='Applied3DSVersion')
|
|
3482
|
+
status = CharField(api_name='Status',
|
|
3483
|
+
choices=constants.STATUS_CHOICES,
|
|
3484
|
+
default=None)
|
|
3485
|
+
result_code = CharField(api_name='ResultCode')
|
|
3486
|
+
result_message = CharField(api_name='ResultMessage')
|
|
3487
|
+
preferred_card_network = CharField(api_name='PreferredCardNetwork')
|
|
3488
|
+
authorization_date = DateTimeField(api_name='AuthorizationDate')
|
|
3489
|
+
card_info = CardInfoField(api_name='CardInfo')
|
|
3490
|
+
payment_category = CharField(api_name='PaymentCategory')
|
|
3491
|
+
authentication_result = AuthenticationResultField(api_name='AuthenticationResult')
|
|
3492
|
+
|
|
3493
|
+
def validate(self, card_id, **kwargs):
|
|
3494
|
+
insert = InsertQuery(self, **kwargs)
|
|
3495
|
+
insert.insert_query = self.get_field_dict()
|
|
3496
|
+
insert.insert_query['id'] = card_id
|
|
3497
|
+
insert.identifier = 'CREATE_CARD_VALIDATION'
|
|
3498
|
+
return insert.execute()
|
|
3499
|
+
|
|
3500
|
+
@classmethod
|
|
3501
|
+
def get(cls, card_validation_id, card_id, *args, **kwargs):
|
|
3502
|
+
kwargs['card_id'] = card_id
|
|
3503
|
+
kwargs['id'] = card_validation_id
|
|
3504
|
+
select = SelectQuery(AcquiringCardValidation, *args, **kwargs)
|
|
3505
|
+
select.identifier = 'GET'
|
|
3506
|
+
return select.get("", *args, **kwargs)
|
|
3507
|
+
|
|
3508
|
+
class Meta:
|
|
3509
|
+
verbose_name = 'acquiring_card_validation'
|
|
3510
|
+
verbose_name_plural = 'acquiring_card_validations'
|
|
3511
|
+
url = {
|
|
3512
|
+
'CREATE_CARD_VALIDATION': '/acquiring/cards/%(id)s/validation',
|
|
3513
|
+
'GET': '/cards/%(card_id)s/validation/%(id)s'
|
|
3514
|
+
}
|
|
@@ -952,7 +952,7 @@ class PayinsLinked(object):
|
|
|
952
952
|
|
|
953
953
|
class LineItem(object):
|
|
954
954
|
def __init__(self, name=None, quantity=None, unit_amount=None, tax_amount=None, description=None, category=None,
|
|
955
|
-
sku=None):
|
|
955
|
+
sku=None, discount=None):
|
|
956
956
|
self.name = name
|
|
957
957
|
self.quantity = quantity
|
|
958
958
|
self.unit_amount = unit_amount
|
|
@@ -960,10 +960,11 @@ class LineItem(object):
|
|
|
960
960
|
self.description = description
|
|
961
961
|
self.category = category
|
|
962
962
|
self.sku = sku
|
|
963
|
+
self.discount = discount
|
|
963
964
|
|
|
964
965
|
def __str__(self):
|
|
965
|
-
return 'LineItem: %s %s %s %s %s %s %s' % \
|
|
966
|
-
(self.name, self.quantity, self.unit_amount, self.tax_amount, self.description, self.category, self.sku)
|
|
966
|
+
return 'LineItem: %s %s %s %s %s %s %s %s' % \
|
|
967
|
+
(self.name, self.quantity, self.unit_amount, self.tax_amount, self.description, self.category, self.sku, self.discount)
|
|
967
968
|
|
|
968
969
|
def to_api_json(self):
|
|
969
970
|
return {
|
|
@@ -973,7 +974,8 @@ class LineItem(object):
|
|
|
973
974
|
"TaxAmount": self.tax_amount,
|
|
974
975
|
"Description": self.description,
|
|
975
976
|
"Category": self.category,
|
|
976
|
-
"Sku": self.sku
|
|
977
|
+
"Sku": self.sku,
|
|
978
|
+
"Discount": self.discount
|
|
977
979
|
}
|
|
978
980
|
|
|
979
981
|
|
|
@@ -1337,8 +1339,7 @@ class CompanyNumberValidation(object):
|
|
|
1337
1339
|
@add_camelcase_aliases
|
|
1338
1340
|
class ReportFilter(object):
|
|
1339
1341
|
def __init__(self, currency=None, user_id=None, wallet_id=None, payment_method=None, status=None, type=None,
|
|
1340
|
-
intent_id=None,
|
|
1341
|
-
external_provider_name=None, scheduled=None):
|
|
1342
|
+
intent_id=None, external_provider_name=None, scheduled=None, settlement_id=None):
|
|
1342
1343
|
self.currency = currency
|
|
1343
1344
|
self.user_id = user_id
|
|
1344
1345
|
self.wallet_id = wallet_id
|
|
@@ -1348,11 +1349,12 @@ class ReportFilter(object):
|
|
|
1348
1349
|
self.intent_id = intent_id
|
|
1349
1350
|
self.external_provider_name = external_provider_name
|
|
1350
1351
|
self.scheduled = scheduled
|
|
1352
|
+
self.settlement_id = settlement_id
|
|
1351
1353
|
|
|
1352
1354
|
def __str__(self):
|
|
1353
|
-
return 'ReportFilter: %s, %s, %s, %s, %s, %s, %s, %s, %s' % \
|
|
1355
|
+
return 'ReportFilter: %s, %s, %s, %s, %s, %s, %s, %s, %s %s' % \
|
|
1354
1356
|
(self.currency, self.user_id, self.wallet_id, self.payment_method, self.status, self.type, self.intent_id,
|
|
1355
|
-
self.external_provider_name, self.scheduled)
|
|
1357
|
+
self.external_provider_name, self.scheduled, self.settlement_id)
|
|
1356
1358
|
|
|
1357
1359
|
def __eq__(self, other):
|
|
1358
1360
|
if isinstance(other, ReportFilter):
|
|
@@ -1364,7 +1366,8 @@ class ReportFilter(object):
|
|
|
1364
1366
|
(self.type == other.type) and
|
|
1365
1367
|
(self.intent_id == other.intent_id) and
|
|
1366
1368
|
(self.external_provider_name == other.external_provider_name) and
|
|
1367
|
-
(self.scheduled == other.scheduled)
|
|
1369
|
+
(self.scheduled == other.scheduled) and
|
|
1370
|
+
(self.settlement_id == other.settlement_id))
|
|
1368
1371
|
return stat
|
|
1369
1372
|
return False
|
|
1370
1373
|
|
|
@@ -1378,7 +1381,8 @@ class ReportFilter(object):
|
|
|
1378
1381
|
"Type": self.type,
|
|
1379
1382
|
"IntentId": self.intent_id,
|
|
1380
1383
|
"ExternalProviderName": self.external_provider_name,
|
|
1381
|
-
"Scheduled": self.scheduled
|
|
1384
|
+
"Scheduled": self.scheduled,
|
|
1385
|
+
"SettlementId": self.settlement_id
|
|
1382
1386
|
}
|
|
1383
1387
|
|
|
1384
1388
|
|
|
@@ -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.56.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',
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
|
|
3
|
+
from mangopay.resources import AcquiringDirectPayIn, Card, AcquiringIdealPayIn, AcquiringApplepayPayIn, \
|
|
4
|
+
AcquiringGooglePayDirectPayIn, AcquiringPayPalWebPayIn, AcquiringPayPalDataCollection, AcquiringPayInRefund, \
|
|
5
|
+
AcquiringCardValidation, ReportV2
|
|
6
|
+
from mangopay.utils import Money, LineItem, ReportFilter, ApplepayPaymentData
|
|
7
|
+
from tests.test_base import AcquiringBaseTestLive, BaseTest
|
|
8
|
+
|
|
9
|
+
card_id = "placeholder"
|
|
10
|
+
author_id = "placeholder"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def get_acquiring_pay_in_card_direct():
|
|
14
|
+
pay_in = AcquiringDirectPayIn()
|
|
15
|
+
pay_in.debited_funds = Money()
|
|
16
|
+
pay_in.debited_funds.amount = 100
|
|
17
|
+
pay_in.debited_funds.currency = "EUR"
|
|
18
|
+
pay_in.secure_mode = "DEFAULT"
|
|
19
|
+
pay_in.secure_mode_return_url = "http://www.example.com/"
|
|
20
|
+
pay_in.ip_address = "2001:0620:0000:0000:0211:24FF:FE80:C12C"
|
|
21
|
+
pay_in.browser_info = BaseTest.get_browser_info()
|
|
22
|
+
|
|
23
|
+
card = Card()
|
|
24
|
+
card.id = card_id
|
|
25
|
+
pay_in.card = card
|
|
26
|
+
|
|
27
|
+
return pay_in
|
|
28
|
+
|
|
29
|
+
@unittest.skip("to be manually tested")
|
|
30
|
+
class AcquiringTestLive(AcquiringBaseTestLive):
|
|
31
|
+
|
|
32
|
+
def test_PayIns_CardDirect_Create(self):
|
|
33
|
+
pay_in = get_acquiring_pay_in_card_direct()
|
|
34
|
+
|
|
35
|
+
result = AcquiringDirectPayIn(**pay_in.save())
|
|
36
|
+
fetched = AcquiringDirectPayIn.get(result.id)
|
|
37
|
+
|
|
38
|
+
self.assertIsNotNone(result)
|
|
39
|
+
self.assertEqual('SUCCEEDED', result.status)
|
|
40
|
+
self.assertEqual('DIRECT', result.execution_type)
|
|
41
|
+
self.assertEqual('CARD', result.payment_type)
|
|
42
|
+
self.assertEqual(result.id, fetched.id)
|
|
43
|
+
self.assertEqual(result.status, fetched.status)
|
|
44
|
+
|
|
45
|
+
def test_PayIns_IdealWeb_Create(self):
|
|
46
|
+
pay_in = AcquiringIdealPayIn()
|
|
47
|
+
pay_in.debited_funds = Money()
|
|
48
|
+
pay_in.debited_funds.amount = 100
|
|
49
|
+
pay_in.debited_funds.currency = 'EUR'
|
|
50
|
+
pay_in.return_url = 'https://mangopay.com/'
|
|
51
|
+
|
|
52
|
+
result = AcquiringIdealPayIn(**pay_in.save())
|
|
53
|
+
fetched = AcquiringIdealPayIn.get(result.id)
|
|
54
|
+
|
|
55
|
+
self.assertIsNotNone(result)
|
|
56
|
+
self.assertEqual('CREATED', result.status)
|
|
57
|
+
self.assertEqual('WEB', result.execution_type)
|
|
58
|
+
self.assertEqual('IDEAL', result.payment_type)
|
|
59
|
+
self.assertEqual(result.id, fetched.id)
|
|
60
|
+
self.assertEqual(result.status, fetched.status)
|
|
61
|
+
|
|
62
|
+
@unittest.skip("no payment data")
|
|
63
|
+
def test_PayIns_ApplepayDirect_Create(self):
|
|
64
|
+
pay_in = AcquiringApplepayPayIn()
|
|
65
|
+
pay_in.debited_funds = Money()
|
|
66
|
+
pay_in.debited_funds.amount = 100
|
|
67
|
+
pay_in.debited_funds.currency = 'EUR'
|
|
68
|
+
payment_data = ApplepayPaymentData()
|
|
69
|
+
payment_data.transaction_id = '061EB32181A2D9CA42AD16031B476EEBAA62A9A095AD660E2759FBA52B51A61'
|
|
70
|
+
payment_data.network = 'VISA'
|
|
71
|
+
payment_data.token_data = "{\"version\":\"EC_v1\",\"data\":\"w4HMBVqNC9ghPP4zncTA\\/0oQAsduERfsx78oxgniynNjZLANTL6+0koEtkQnW\\/K38Zew8qV1GLp+fLHo+qCBpiKCIwlz3eoFBTbZU+8pYcjaeIYBX9SOxcwxXsNGrGLk+kBUqnpiSIPaAG1E+WPT8R1kjOCnGvtdombvricwRTQkGjtovPfzZo8LzD3ZQJnHMsWJ8QYDLyr\\/ZN9gtLAtsBAMvwManwiaG3pOIWpyeOQOb01YcEVO16EZBjaY4x4C\\/oyFLWDuKGvhbJwZqWh1d1o9JT29QVmvy3Oq2JEjq3c3NutYut4rwDEP4owqI40Nb7mP2ebmdNgnYyWfPmkRfDCRHIWtbMC35IPg5313B1dgXZ2BmyZRXD5p+mr67vAk7iFfjEpu3GieFqwZrTl3\\/pI5V8Sxe3SIYKgT5Hr7ow==\",\"signature\":\"MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCAMIID5jCCA4ugAwIBAgIIaGD2mdnMpw8wCgYIKoZIzj0EAwIwejEuMCwGA1UEAwwlQXBwbGUgQXBwbGljYXRpb24gSW50ZWdyYXRpb24gQ0EgLSBHMzEmMCQGA1UECwwdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTMB4XDTE2MDYwMzE4MTY0MFoXDTIxMDYwMjE4MTY0MFowYjEoMCYGA1UEAwwfZWNjLXNtcC1icm9rZXItc2lnbl9VQzQtU0FOREJPWDEUMBIGA1UECwwLaU9TIFN5c3RlbXMxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEgjD9q8Oc914gLFDZm0US5jfiqQHdbLPgsc1LUmeY+M9OvegaJajCHkwz3c6OKpbC9q+hkwNFxOh6RCbOlRsSlaOCAhEwggINMEUGCCsGAQUFBwEBBDkwNzA1BggrBgEFBQcwAYYpaHR0cDovL29jc3AuYXBwbGUuY29tL29jc3AwNC1hcHBsZWFpY2EzMDIwHQYDVR0OBBYEFAIkMAua7u1GMZekplopnkJxghxFMAwGA1UdEwEB\\/wQCMAAwHwYDVR0jBBgwFoAUI\\/JJxE+T5O8n5sT2KGw\\/orv9LkswggEdBgNVHSAEggEUMIIBEDCCAQwGCSqGSIb3Y2QFATCB\\/jCBwwYIKwYBBQUHAgIwgbYMgbNSZWxpYW5jZSBvbiB0aGlzIGNlcnRpZmljYXRlIGJ5IGFueSBwYXJ0eSBhc3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJsZSBzdGFuZGFyZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRlIHBvbGljeSBhbmQgY2VydGlmaWNhdGlvbiBwcmFjdGljZSBzdGF0ZW1lbnRzLjA2BggrBgEFBQcCARYqaHR0cDovL3d3dy5hcHBsZS5jb20vY2VydGlmaWNhdGVhdXRob3JpdHkvMDQGA1UdHwQtMCswKaAnoCWGI2h0dHA6Ly9jcmwuYXBwbGUuY29tL2FwcGxlYWljYTMuY3JsMA4GA1UdDwEB\\/wQEAwIHgDAPBgkqhkiG92NkBh0EAgUAMAoGCCqGSM49BAMCA0kAMEYCIQDaHGOui+X2T44R6GVpN7m2nEcr6T6sMjOhZ5NuSo1egwIhAL1a+\\/hp88DKJ0sv3eT3FxWcs71xmbLKD\\/QJ3mWagrJNMIIC7jCCAnWgAwIBAgIISW0vvzqY2pcwCgYIKoZIzj0EAwIwZzEbMBkGA1UEAwwSQXBwbGUgUm9vdCBDQSAtIEczMSYwJAYDVQQLDB1BcHBsZSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTETMBEGA1UECgwKQXBwbGUgSW5jLjELMAkGA1UEBhMCVVMwHhcNMTQwNTA2MjM0NjMwWhcNMjkwNTA2MjM0NjMwWjB6MS4wLAYDVQQDDCVBcHBsZSBBcHBsaWNhdGlvbiBJbnRlZ3JhdGlvbiBDQSAtIEczMSYwJAYDVQQLDB1BcHBsZSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTETMBEGA1UECgwKQXBwbGUgSW5jLjELMAkGA1UEBhMCVVMwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATwFxGEGddkhdUaXiWBB3bogKLv3nuuTeCN\\/EuT4TNW1WZbNa4i0Jd2DSJOe7oI\\/XYXzojLdrtmcL7I6CmE\\/1RFo4H3MIH0MEYGCCsGAQUFBwEBBDowODA2BggrBgEFBQcwAYYqaHR0cDovL29jc3AuYXBwbGUuY29tL29jc3AwNC1hcHBsZXJvb3RjYWczMB0GA1UdDgQWBBQj8knET5Pk7yfmxPYobD+iu\\/0uSzAPBgNVHRMBAf8EBTADAQH\\/MB8GA1UdIwQYMBaAFLuw3qFYM4iapIqZ3r6966\\/ayySrMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly9jcmwuYXBwbGUuY29tL2FwcGxlcm9vdGNhZzMuY3JsMA4GA1UdDwEB\\/wQEAwIBBjAQBgoqhkiG92NkBgIOBAIFADAKBggqhkjOPQQDAgNnADBkAjA6z3KDURaZsYb7NcNWymK\\/9Bft2Q91TaKOvvGcgV5Ct4n4mPebWZ+Y1UENj53pwv4CMDIt1UQhsKMFd2xd8zg7kGf9F3wsIW2WT8ZyaYISb1T4en0bmcubCYkhYQaZDwmSHQAAMYIBizCCAYcCAQEwgYYwejEuMCwGA1UEAwwlQXBwbGUgQXBwbGljYXRpb24gSW50ZWdyYXRpb24gQ0EgLSBHMzEmMCQGA1UECwwdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTAghoYPaZ2cynDzANBglghkgBZQMEAgEFAKCBlTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xOTA1MjMxMTA1MDdaMCoGCSqGSIb3DQEJNDEdMBswDQYJYIZIAWUDBAIBBQChCgYIKoZIzj0EAwIwLwYJKoZIhvcNAQkEMSIEIIvfGVQYBeOilcB7GNI8m8+FBVZ28QfA6BIXaggBja2PMAoGCCqGSM49BAMCBEYwRAIgU01yYfjlx9bvGeC5CU2RS5KBEG+15HH9tz\\/sg3qmQ14CID4F4ZJwAz+tXAUcAIzoMpYSnM8YBlnGJSTSp+LhspenAAAAAAAA\",\"header\":{\"ephemeralPublicKey\":\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE0rs3wRpirXjPbFDQfPRdfEzRIZDWm0qn7Y0HB0PNzV1DDKfpYrnhRb4GEhBF\\/oEXBOe452PxbCnN1qAlqcSUWw==\",\"publicKeyHash\":\"saPRAqS7TZ4bAYwzBj8ezDDC55ZolyH1FL+Xc8fd93o=\",\"transactionId\":\"b061eb32181a2d9ca42ad16031b476eebaa62a9a095ad660e2759fba52b51a61\"}}"
|
|
72
|
+
pay_in.payment_data = payment_data
|
|
73
|
+
|
|
74
|
+
result = AcquiringApplepayPayIn(**pay_in.save())
|
|
75
|
+
fetched = AcquiringApplepayPayIn.get(result.id)
|
|
76
|
+
|
|
77
|
+
self.assertIsNotNone(result)
|
|
78
|
+
self.assertEqual('SUCCEEDED', result.status)
|
|
79
|
+
self.assertEqual('DIRECT', result.execution_type)
|
|
80
|
+
self.assertEqual('APPLEPAY', result.payment_type)
|
|
81
|
+
self.assertEqual(result.id, fetched.id)
|
|
82
|
+
self.assertEqual(result.status, fetched.status)
|
|
83
|
+
|
|
84
|
+
@unittest.skip("no payment data")
|
|
85
|
+
def test_PayIns_GooglePayDirect_Create(self):
|
|
86
|
+
pay_in = AcquiringGooglePayDirectPayIn()
|
|
87
|
+
pay_in.debited_funds = Money()
|
|
88
|
+
pay_in.debited_funds.amount = 100
|
|
89
|
+
pay_in.debited_funds.currency = 'EUR'
|
|
90
|
+
pay_in.payment_data = 'placeholder'
|
|
91
|
+
pay_in.secure_mode_return_url = "http://www.example.com/"
|
|
92
|
+
pay_in.ip_address = "2001:0620:0000:0000:0211:24FF:FE80:C12C"
|
|
93
|
+
pay_in.browser_info = BaseTest.get_browser_info()
|
|
94
|
+
|
|
95
|
+
result = AcquiringGooglePayDirectPayIn(**pay_in.save())
|
|
96
|
+
fetched = AcquiringGooglePayDirectPayIn.get(result.id)
|
|
97
|
+
|
|
98
|
+
self.assertIsNotNone(result)
|
|
99
|
+
self.assertEqual('SUCCEEDED', result.status)
|
|
100
|
+
self.assertEqual('DIRECT', result.execution_type)
|
|
101
|
+
self.assertEqual('GOOGLE_PAY', result.payment_type)
|
|
102
|
+
self.assertEqual(result.id, fetched.id)
|
|
103
|
+
self.assertEqual(result.status, fetched.status)
|
|
104
|
+
|
|
105
|
+
def test_PayIns_PayPalWeb_Create(self):
|
|
106
|
+
pay_in = AcquiringPayPalWebPayIn()
|
|
107
|
+
pay_in.debited_funds = Money()
|
|
108
|
+
pay_in.debited_funds.amount = 100
|
|
109
|
+
pay_in.debited_funds.currency = 'EUR'
|
|
110
|
+
pay_in.return_url = "http://mangopay.com"
|
|
111
|
+
|
|
112
|
+
line_item = LineItem()
|
|
113
|
+
line_item.name = "test"
|
|
114
|
+
line_item.quantity = 1
|
|
115
|
+
line_item.unit_amount = 100
|
|
116
|
+
line_item.tax_amount = 0
|
|
117
|
+
line_item.description = "test"
|
|
118
|
+
line_item.category = "DIGITAL_GOODS"
|
|
119
|
+
pay_in.line_items = [line_item]
|
|
120
|
+
|
|
121
|
+
result = AcquiringPayPalWebPayIn(**pay_in.save())
|
|
122
|
+
fetched = AcquiringPayPalWebPayIn.get(result.id)
|
|
123
|
+
|
|
124
|
+
self.assertIsNotNone(result)
|
|
125
|
+
self.assertEqual('CREATED', result.status)
|
|
126
|
+
self.assertEqual('WEB', result.execution_type)
|
|
127
|
+
self.assertEqual('PAYPAL', result.payment_type)
|
|
128
|
+
self.assertEqual(result.id, fetched.id)
|
|
129
|
+
self.assertEqual(result.status, fetched.status)
|
|
130
|
+
|
|
131
|
+
@unittest.skip("can't be tested")
|
|
132
|
+
def test_paypal_data_collection(self):
|
|
133
|
+
data = {
|
|
134
|
+
"sender_account_id": "A12345N343",
|
|
135
|
+
"sender_first_name": "Jane",
|
|
136
|
+
"sender_last_name": "Doe",
|
|
137
|
+
"sender_email": "jane.doe@sample.com",
|
|
138
|
+
"sender_phone": "(042)11234567",
|
|
139
|
+
"sender_address_zip": "75009",
|
|
140
|
+
"sender_country_code": "FR",
|
|
141
|
+
"sender_create_date": "2012-12-09T19:14:55.277-0:00",
|
|
142
|
+
"sender_signup_ip": "10.220.90.20",
|
|
143
|
+
"sender_popularity_score": "high",
|
|
144
|
+
"receiver_account_id": "A12345N344",
|
|
145
|
+
"receiver_create_date": "2012-12-09T19:14:55.277-0:00",
|
|
146
|
+
"receiver_email": "jane@sample.com",
|
|
147
|
+
"receiver_address_country_code": "FR",
|
|
148
|
+
"business_name": "Jane Ltd",
|
|
149
|
+
"recipient_popularity_score": "high",
|
|
150
|
+
"first_interaction_date": "2012-12-09T19:14:55.277-0:00",
|
|
151
|
+
"txn_count_total": "34",
|
|
152
|
+
"vertical": "Household goods",
|
|
153
|
+
"transaction_is_tangible": "0"
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
created = AcquiringPayPalDataCollection.create(**data)
|
|
157
|
+
self.assertIsNotNone(created)
|
|
158
|
+
self.assertIsNotNone(created['dataCollectionId'])
|
|
159
|
+
|
|
160
|
+
fetched = AcquiringPayPalDataCollection.get(created['dataCollectionId'])
|
|
161
|
+
self.assertIsNotNone(fetched)
|
|
162
|
+
self.assertIsNotNone(fetched['dataCollectionId'])
|
|
163
|
+
self.assertEqual('Jane', fetched['sender_first_name'])
|
|
164
|
+
self.assertEqual('Doe', fetched['sender_last_name'])
|
|
165
|
+
|
|
166
|
+
def test_PayIns_Refund_Create(self):
|
|
167
|
+
pay_in = get_acquiring_pay_in_card_direct()
|
|
168
|
+
pay_in = AcquiringDirectPayIn(**pay_in.save())
|
|
169
|
+
|
|
170
|
+
refund = AcquiringPayInRefund()
|
|
171
|
+
refund.debited_funds = Money()
|
|
172
|
+
refund.debited_funds.amount = 100
|
|
173
|
+
refund.debited_funds.currency = 'EUR'
|
|
174
|
+
refund.payin = pay_in
|
|
175
|
+
|
|
176
|
+
result = AcquiringPayInRefund(**refund.save())
|
|
177
|
+
|
|
178
|
+
self.assertIsNotNone(result)
|
|
179
|
+
self.assertEqual('SUCCEEDED', result.status)
|
|
180
|
+
|
|
181
|
+
def test_CardValidation_Create(self):
|
|
182
|
+
card_validation = AcquiringCardValidation()
|
|
183
|
+
card_validation.secure_mode_return_url = "http://www.example.com/"
|
|
184
|
+
card_validation.ip_address = "2001:0620:0000:0000:0211:24FF:FE80:C12C"
|
|
185
|
+
card_validation.browser_info = BaseTest.get_browser_info()
|
|
186
|
+
|
|
187
|
+
response = AcquiringCardValidation(**card_validation.validate(card_id))
|
|
188
|
+
fetched = AcquiringCardValidation.get(response.id, card_id)
|
|
189
|
+
|
|
190
|
+
self.assertIsNotNone(response)
|
|
191
|
+
self.assertIsNotNone(response.id)
|
|
192
|
+
self.assertEqual('ECommerce', response.payment_category)
|
|
193
|
+
self.assertIsNotNone(response.authentication_result)
|
|
194
|
+
self.assertIsNotNone(fetched)
|
|
195
|
+
self.assertEqual(response.payment_category, fetched.payment_category)
|
|
196
|
+
|
|
197
|
+
def test_ReportCreate(self):
|
|
198
|
+
report = ReportV2()
|
|
199
|
+
report.report_type = 'ACQUIRING_SETTLEMENT'
|
|
200
|
+
report.download_format = 'CSV'
|
|
201
|
+
report.after_date = 1740787200
|
|
202
|
+
report.before_date = 1743544740
|
|
203
|
+
report.filters = ReportFilter()
|
|
204
|
+
report.filters.settlement_id = 'placeholder'
|
|
205
|
+
result = report.save()
|
|
206
|
+
|
|
207
|
+
self.assertIsNotNone(result)
|
|
208
|
+
self.assertTrue(result['id'])
|
|
209
|
+
self.assertEqual(result['report_type'], 'ACQUIRING_SETTLEMENT')
|
|
210
|
+
self.assertEqual(result['status'], 'PENDING')
|
|
211
|
+
|
|
212
|
+
def test_CardGet(self):
|
|
213
|
+
result = Card().get(card_id)
|
|
214
|
+
self.assertIsNotNone(result)
|
|
215
|
+
self.assertEqual('VALID', result.validity)
|
|
@@ -904,3 +904,7 @@ class BaseTestLive(unittest.TestCase):
|
|
|
904
904
|
|
|
905
905
|
self.assertEqual(api_url, non_sandbox_handler.api_url)
|
|
906
906
|
self.assertEqual(sandbox_url, sandbox_handler.api_url)
|
|
907
|
+
|
|
908
|
+
|
|
909
|
+
class AcquiringBaseTestLive(unittest.TestCase):
|
|
910
|
+
_oauth_manager = AuthorizationTokenManager(get_default_handler(), StaticStorageStrategy())
|
|
@@ -355,10 +355,15 @@ class CardsLiveTest(BaseTestLive):
|
|
|
355
355
|
get_card_validation.id = validation_response['id']
|
|
356
356
|
get_card_validation_response = get_card_validation.get_card_validation(card_id)
|
|
357
357
|
|
|
358
|
+
single_card = CardValidation.get(validation_response['id'], card_id)
|
|
359
|
+
|
|
358
360
|
self.assertIsNotNone(get_card_validation_response.data[0])
|
|
359
361
|
self.assertIsNotNone(get_card_validation_response.data[0].id)
|
|
360
362
|
self.assertEqual(get_card_validation_response.data[0].id, validation_response['id'])
|
|
361
363
|
|
|
364
|
+
self.assertIsNotNone(single_card)
|
|
365
|
+
self.assertEqual('ECommerce', single_card.payment_category)
|
|
366
|
+
|
|
362
367
|
def test_get_transactions_for_fingerprint(self):
|
|
363
368
|
card = BaseTestLive.get_johns_card()
|
|
364
369
|
time.sleep(2)
|
|
@@ -11,7 +11,7 @@ from mangopay.resources import DirectDebitDirectPayIn, Mandate, ApplepayPayIn, G
|
|
|
11
11
|
RecurringPayInRegistration, \
|
|
12
12
|
RecurringPayInCIT, PayInRefund, RecurringPayInMIT, CardPreAuthorizedDepositPayIn, MbwayPayIn, PayPalWebPayIn, \
|
|
13
13
|
GooglePayDirectPayIn, MultibancoPayIn, SatispayPayIn, BlikPayIn, KlarnaPayIn, IdealPayIn, GiropayPayIn, \
|
|
14
|
-
CardRegistration, BancontactPayIn, BizumPayIn, SwishPayIn,
|
|
14
|
+
CardRegistration, BancontactPayIn, BizumPayIn, SwishPayIn, TwintPayIn, PayByBankPayIn, \
|
|
15
15
|
RecurringPayPalPayInCIT, \
|
|
16
16
|
RecurringPayPalPayInMIT, PayInIntent, PayInIntentSplit, PayInIntentSplits, PayByBankSupportedBank, \
|
|
17
17
|
ClientBankWireDirectPayIn, PayPalDataCollection, ExtendedCardWebPayIn
|
|
@@ -20,7 +20,7 @@ from mangopay.utils import (Money, ShippingAddress, Shipping, Billing, Address,
|
|
|
20
20
|
PayInIntentLineItem, IntentSplit)
|
|
21
21
|
from tests import settings
|
|
22
22
|
from tests.resources import (Wallet, DirectPayIn, BankWirePayIn, PayPalPayIn,
|
|
23
|
-
|
|
23
|
+
CardWebPayIn, DirectDebitWebPayIn, constants, PaymentMethodMetadata)
|
|
24
24
|
from tests.test_base import BaseTest, BaseTestLive
|
|
25
25
|
|
|
26
26
|
|
|
@@ -461,82 +461,6 @@ class PayInsTest(BaseTest):
|
|
|
461
461
|
for key, value in paypal_payin_params.items():
|
|
462
462
|
self.assertEqual(getattr(paypal_payin, key), value)
|
|
463
463
|
|
|
464
|
-
@responses.activate
|
|
465
|
-
def test_create_payoniq_payin(self):
|
|
466
|
-
|
|
467
|
-
self.mock_natural_user()
|
|
468
|
-
self.mock_legal_user()
|
|
469
|
-
self.mock_user_wallet()
|
|
470
|
-
|
|
471
|
-
self.register_mock({
|
|
472
|
-
'method': responses.POST,
|
|
473
|
-
'url': settings.MANGOPAY_API_SANDBOX_URL + settings.MANGOPAY_CLIENT_ID + '/payins/payconiq/web',
|
|
474
|
-
'body': {
|
|
475
|
-
"Id": "119683174",
|
|
476
|
-
"Tag": "custom meta",
|
|
477
|
-
"CreationDate": 1632985748,
|
|
478
|
-
"ExpirationDate": 1632986949,
|
|
479
|
-
"AuthorId": "119683166",
|
|
480
|
-
"CreditedUserId": "119683166",
|
|
481
|
-
"DebitedFunds": {
|
|
482
|
-
"Currency": "EUR",
|
|
483
|
-
"Amount": 22
|
|
484
|
-
},
|
|
485
|
-
"CreditedFunds": {
|
|
486
|
-
"Currency": "EUR",
|
|
487
|
-
"Amount": 12
|
|
488
|
-
},
|
|
489
|
-
"Fees": {
|
|
490
|
-
"Currency": "EUR",
|
|
491
|
-
"Amount": 10
|
|
492
|
-
},
|
|
493
|
-
"Status": "CREATED",
|
|
494
|
-
"ResultCode": None,
|
|
495
|
-
"ResultMessage": None,
|
|
496
|
-
"ExecutionDate": None,
|
|
497
|
-
"Type": "PAYIN",
|
|
498
|
-
"Nature": "REGULAR",
|
|
499
|
-
"CreditedWalletId": "119683167",
|
|
500
|
-
"DebitedWalletId": None,
|
|
501
|
-
"PaymentType": "PAYCONIQ",
|
|
502
|
-
"ExecutionType": "WEB",
|
|
503
|
-
"RedirectURL": "https://portal.payconiq.com/qrcode?c=https%3A%2F%2Fpayconiq.com%2Fpay%2F2%2F52e501a43d878e8846470b8f",
|
|
504
|
-
"ReturnURL": "http://www.my-site.com/returnURL",
|
|
505
|
-
"DeepLinkURL": "HTTPS://PAYCONIQ.COM/PAY/2/52E501A43D878E8846470B8F"
|
|
506
|
-
},
|
|
507
|
-
'status': 200
|
|
508
|
-
})
|
|
509
|
-
|
|
510
|
-
payconiq_payin_params = {
|
|
511
|
-
"tag": "custom meta",
|
|
512
|
-
"author": self.natural_user,
|
|
513
|
-
"debited_funds": Money(amount=22, currency='EUR'),
|
|
514
|
-
"fees": Money(amount=10, currency="EUR"),
|
|
515
|
-
"return_url": "http://www.my-site.com/returnURL",
|
|
516
|
-
"credited_wallet": self.legal_user_wallet,
|
|
517
|
-
"country": "BE"
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
payconiq_payin = PayconiqPayIn(**payconiq_payin_params)
|
|
521
|
-
|
|
522
|
-
self.assertIsNone(payconiq_payin.get_pk())
|
|
523
|
-
payconiq_payin.save()
|
|
524
|
-
self.assertIsInstance(payconiq_payin, PayconiqPayIn)
|
|
525
|
-
self.assertEqual(payconiq_payin.status, 'CREATED')
|
|
526
|
-
self.assertEqual(payconiq_payin.type, 'PAYIN')
|
|
527
|
-
self.assertEqual(payconiq_payin.payment_type, 'PAYCONIQ')
|
|
528
|
-
self.assertIsNotNone(payconiq_payin.get_pk())
|
|
529
|
-
self.assertTrue(payconiq_payin.redirect_url.startswith(
|
|
530
|
-
'https://portal.payconiq.com/qrcode'))
|
|
531
|
-
|
|
532
|
-
self.assertTrue(payconiq_payin.return_url.startswith('http://www.my-site.com'))
|
|
533
|
-
|
|
534
|
-
self.assertTrue(payconiq_payin.deep_link_url.startswith('HTTPS://PAYCONIQ.COM/PAY'))
|
|
535
|
-
|
|
536
|
-
self.assertEqual(payconiq_payin.debited_funds.amount, 22)
|
|
537
|
-
|
|
538
|
-
self.assertEqual(payconiq_payin.fees.amount, 10)
|
|
539
|
-
|
|
540
464
|
@responses.activate
|
|
541
465
|
def test_create_card_via_web_interface_payin(self):
|
|
542
466
|
self.mock_natural_user()
|
|
@@ -1680,7 +1604,7 @@ class PayInsTestLive(BaseTestLive):
|
|
|
1680
1604
|
pay_in = KlarnaPayIn()
|
|
1681
1605
|
pay_in.author = user
|
|
1682
1606
|
pay_in.debited_funds = Money()
|
|
1683
|
-
pay_in.debited_funds.amount =
|
|
1607
|
+
pay_in.debited_funds.amount = 990
|
|
1684
1608
|
pay_in.debited_funds.currency = "EUR"
|
|
1685
1609
|
pay_in.fees = Money()
|
|
1686
1610
|
pay_in.fees.amount = 100
|
|
@@ -1693,6 +1617,7 @@ class PayInsTestLive(BaseTestLive):
|
|
|
1693
1617
|
line_item.quantity = 1
|
|
1694
1618
|
line_item.unit_amount = 1000
|
|
1695
1619
|
line_item.tax_amount = 0
|
|
1620
|
+
line_item.discount = 10
|
|
1696
1621
|
pay_in.line_items = [line_item]
|
|
1697
1622
|
|
|
1698
1623
|
pay_in.country = 'FR'
|
|
@@ -1730,6 +1655,7 @@ class PayInsTestLive(BaseTestLive):
|
|
|
1730
1655
|
self.assertEqual("WEB", result.execution_type)
|
|
1731
1656
|
self.assertEqual("KLARNA", result.payment_type)
|
|
1732
1657
|
self.assertEqual("PAYIN", result.type)
|
|
1658
|
+
self.assertEqual(10, result.line_items[0]['Discount'])
|
|
1733
1659
|
|
|
1734
1660
|
def test_PayIns_IdealWeb_Create(self):
|
|
1735
1661
|
user = BaseTestLive.get_john(True)
|
|
@@ -2228,34 +2154,6 @@ class PayInsTestLive(BaseTestLive):
|
|
|
2228
2154
|
self.assertIsNotNone(mit_card_info)
|
|
2229
2155
|
self.assertIsInstance(mit_card_info, CardInfo)
|
|
2230
2156
|
|
|
2231
|
-
@unittest.skip("Endpoint removed")
|
|
2232
|
-
def test_PayIns_Payconiq_Web_Create(self):
|
|
2233
|
-
user = BaseTestLive.get_john(True)
|
|
2234
|
-
|
|
2235
|
-
# create wallet
|
|
2236
|
-
credited_wallet = Wallet()
|
|
2237
|
-
credited_wallet.owners = (user,)
|
|
2238
|
-
credited_wallet.currency = 'EUR'
|
|
2239
|
-
credited_wallet.description = 'WALLET IN EUR'
|
|
2240
|
-
credited_wallet = Wallet(**credited_wallet.save())
|
|
2241
|
-
|
|
2242
|
-
payin = PayconiqV2PayIn()
|
|
2243
|
-
payin.credited_wallet = credited_wallet
|
|
2244
|
-
payin.author = user
|
|
2245
|
-
payin.debited_funds = Money(amount=10000, currency='EUR')
|
|
2246
|
-
payin.fees = Money(amount=0, currency='EUR')
|
|
2247
|
-
payin.return_url = 'https://test.com'
|
|
2248
|
-
payin.country = 'BE'
|
|
2249
|
-
result = PayconiqV2PayIn(**payin.save())
|
|
2250
|
-
|
|
2251
|
-
self.assertIsNotNone(result)
|
|
2252
|
-
self.assertEqual("CREATED", result.status)
|
|
2253
|
-
self.assertEqual("REGULAR", result.nature)
|
|
2254
|
-
self.assertEqual("WEB", result.execution_type)
|
|
2255
|
-
self.assertEqual("PAYCONIQ", result.payment_type)
|
|
2256
|
-
self.assertIsNotNone(result.deep_link_url)
|
|
2257
|
-
self.assertIsNotNone(result.qr_code_url)
|
|
2258
|
-
|
|
2259
2157
|
def test_PayIns_PayByBankWeb_Create(self):
|
|
2260
2158
|
user = BaseTestLive.get_john(True)
|
|
2261
2159
|
|
|
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.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/cardregistrations.json
RENAMED
|
File without changes
|
|
File without changes
|
{mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/declarative_user.json
RENAMED
|
File without changes
|
|
File without changes
|
{mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/legal_user_wallet.json
RENAMED
|
File without changes
|
{mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/legal_user_wallet_89.json
RENAMED
|
File without changes
|
{mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/legal_user_wallet_99.json
RENAMED
|
File without changes
|
|
File without changes
|
{mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/natural_user.json
RENAMED
|
File without changes
|
{mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/natural_user_wallet.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/ubo_declaration.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/user_list_2_per_page.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/user_list_full.json
RENAMED
|
File without changes
|
{mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/fixtures/user_list_page1.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/resources/TestKycPageFile.png
RENAMED
|
File without changes
|
{mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.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
|
{mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.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
|
{mangopay4_python_sdk-3.55.0 → mangopay4_python_sdk-3.56.0}/tests/test_identity_verification.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
|