mangopay4-ruby-sdk 3.50.0 → 3.52.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/lib/mangopay/acquiring.rb +4 -0
- data/lib/mangopay/identity_verification.rb +6 -0
- data/lib/mangopay/pay_in.rb +4 -0
- data/lib/mangopay/version.rb +1 -1
- data/spec/mangopay/acquiring_spec.rb +5 -0
- data/spec/mangopay/identity_verification_spec.rb +44 -0
- data/spec/mangopay/payin_intent_spec.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aa5be31ede367e7321aaf3ce876a44f7ad4710f1c9018956090b05375c83c524
|
|
4
|
+
data.tar.gz: 0f54f26d8c657f517fd48b8b5e3c4f15686411703d3ff771cfd064dc1901c45c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1205f641ea430bd080449c56065fd461f11f2658e27f6f58e0d41a66759e059819dd38440ebf7c3d282f91be04ac74930db2d955240aca233dc456f4e47714ab
|
|
7
|
+
data.tar.gz: 657f0076c9a83d682d5773f31ff7e09cb5440243b5b4ecdab914decec90da5d9571d5b7f9992cc4ef67d6bffa61e079e85456dc0f4cd32f3bdc9086aff2a8768
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## [3.52.0] - 2026-09-01
|
|
2
|
+
### Added – Get PayPal Data Collection (Acquiring)
|
|
3
|
+
- Added `MangoPay::Acquiring::PayIn::PayPal::Web.get_data_collection` to fetch a PayPal data collection by id
|
|
4
|
+
|
|
5
|
+
## [3.51.0] - 2026-08-17
|
|
6
|
+
### Added – External providers list for PayIn Intents
|
|
7
|
+
#342
|
|
8
|
+
- Added `MangoPay::PayIn::PayInIntent::Intent.get_external_providers_list` to fetch the list of external providers available for pay-in intents
|
|
9
|
+
|
|
10
|
+
### Added – PSC retry for Identity Verifications
|
|
11
|
+
#343
|
|
12
|
+
- Added `MangoPay::IdentityVerification.retry_psc` to request the retry of a PSC session, optionally passing the values to update
|
|
13
|
+
|
|
1
14
|
## [3.50.0] - 2026-07-13
|
|
2
15
|
### Deprecated – Non-SCA users and deposit preauthorized complement pay-ins
|
|
3
16
|
- `MangoPay::LegalUser` create, get by id and update operations are deprecated. Use `MangoPay::LegalUserSca` instead.
|
data/lib/mangopay/acquiring.rb
CHANGED
|
@@ -50,6 +50,10 @@ module MangoPay
|
|
|
50
50
|
def self.create_data_collection(params, idempotency_key = nil)
|
|
51
51
|
MangoPay.request(:post, "#{MangoPay.api_path}/acquiring/payins/payment-methods/paypal/data-collection", params, {}, idempotency_key)
|
|
52
52
|
end
|
|
53
|
+
|
|
54
|
+
def self.get_data_collection(data_collection_id)
|
|
55
|
+
MangoPay.request(:get, "#{MangoPay.api_path}/acquiring/payins/payment-methods/paypal/data-collection/#{data_collection_id}")
|
|
56
|
+
end
|
|
53
57
|
end
|
|
54
58
|
end
|
|
55
59
|
end
|
|
@@ -12,5 +12,11 @@ module MangoPay
|
|
|
12
12
|
def self.get_all(user_id, filters = {})
|
|
13
13
|
MangoPay.request(:get, "#{MangoPay.api_path}/users/#{user_id}/identity-verifications", {}, filters)
|
|
14
14
|
end
|
|
15
|
+
|
|
16
|
+
# Request the retry of a PSC session.
|
|
17
|
+
# +params+ can be empty or contain the values to be updated.
|
|
18
|
+
def self.retry_psc(identity_verification_id, psc_id, params = {})
|
|
19
|
+
MangoPay.request(:put, "#{MangoPay.api_path}/identity-verifications/#{identity_verification_id}/pscs/#{psc_id}/retry", params)
|
|
20
|
+
end
|
|
15
21
|
end
|
|
16
22
|
end
|
data/lib/mangopay/pay_in.rb
CHANGED
|
@@ -428,6 +428,10 @@ module MangoPay
|
|
|
428
428
|
def cancel(intent_id, params, idempotency_key = nil)
|
|
429
429
|
MangoPay.request(:post, "#{MangoPay.api_path_v3}/payins/intents/#{intent_id}/cancel", params, {}, idempotency_key)
|
|
430
430
|
end
|
|
431
|
+
|
|
432
|
+
def get_external_providers_list
|
|
433
|
+
MangoPay.request(:get, "#{MangoPay.api_path_v3}/payins/intents/external-providers")
|
|
434
|
+
end
|
|
431
435
|
end
|
|
432
436
|
end
|
|
433
437
|
|
data/lib/mangopay/version.rb
CHANGED
|
@@ -140,6 +140,11 @@ xdescribe MangoPay::Acquiring do
|
|
|
140
140
|
)
|
|
141
141
|
expect(data_collection['dataCollectionId']).not_to be_nil
|
|
142
142
|
end
|
|
143
|
+
|
|
144
|
+
it 'fetches PayPal DataCollection' do
|
|
145
|
+
data_collection = MangoPay::Acquiring::PayIn::PayPal::Web.get_data_collection('123456789')
|
|
146
|
+
expect(data_collection['dataCollectionId']).not_to be_nil
|
|
147
|
+
end
|
|
143
148
|
end
|
|
144
149
|
|
|
145
150
|
describe 'CARD VALIDATION' do
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
describe MangoPay::IdentityVerification do
|
|
2
2
|
include_context 'users'
|
|
3
3
|
|
|
4
|
+
IDV_ID_WITH_PSCS = 'idnver_01KZXBHDH1DWC887PW6T46NVTV'
|
|
5
|
+
PSC_ID = 'psc_x_01KZXBT5F8FGGSK9JXGCYMNWRP'
|
|
6
|
+
|
|
4
7
|
describe 'CREATE' do
|
|
5
8
|
it 'creates a new identity verification' do
|
|
6
9
|
created = create_new_identity_verification
|
|
@@ -31,6 +34,47 @@ describe MangoPay::IdentityVerification do
|
|
|
31
34
|
expect(fetched).to be_kind_of(Array)
|
|
32
35
|
expect(fetched).not_to be_empty
|
|
33
36
|
end
|
|
37
|
+
|
|
38
|
+
it 'fetches an identity verification with PSCs' do
|
|
39
|
+
fetched = MangoPay::IdentityVerification.get(IDV_ID_WITH_PSCS)
|
|
40
|
+
|
|
41
|
+
expect(fetched).not_to be_nil
|
|
42
|
+
expect(fetched['PSCs']).not_to be_nil
|
|
43
|
+
expect(fetched['PSCs']).not_to be_empty
|
|
44
|
+
expect(fetched['PSCs'][0]['Data']).not_to be_empty
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'RETRY PSC' do
|
|
49
|
+
# skipped: the PSC must be manually invalidated before testing
|
|
50
|
+
xit 'retries a PSC without update params' do
|
|
51
|
+
psc = MangoPay::IdentityVerification.retry_psc(IDV_ID_WITH_PSCS, PSC_ID)
|
|
52
|
+
|
|
53
|
+
expect(psc).not_to be_nil
|
|
54
|
+
expect(psc['HostedUrl']).not_to be_nil
|
|
55
|
+
expect(psc['Status']).to eq('PENDING_VALIDATION')
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# skipped: the PSC must be manually invalidated before testing
|
|
59
|
+
xit 'retries a PSC with update params' do
|
|
60
|
+
first_name = SecureRandom.uuid
|
|
61
|
+
last_name = SecureRandom.uuid
|
|
62
|
+
|
|
63
|
+
psc = MangoPay::IdentityVerification.retry_psc(
|
|
64
|
+
IDV_ID_WITH_PSCS,
|
|
65
|
+
PSC_ID,
|
|
66
|
+
{
|
|
67
|
+
FirstName: first_name,
|
|
68
|
+
LastName: last_name
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
expect(psc).not_to be_nil
|
|
73
|
+
expect(psc['HostedUrl']).not_to be_nil
|
|
74
|
+
expect(psc['Status']).to eq('PENDING_VALIDATION')
|
|
75
|
+
expect(psc['FirstName']).to eq(first_name)
|
|
76
|
+
expect(psc['LastName']).to eq(last_name)
|
|
77
|
+
end
|
|
34
78
|
end
|
|
35
79
|
|
|
36
80
|
def create_new_identity_verification
|
|
@@ -49,6 +49,13 @@ describe MangoPay::PayIn::PayInIntent, type: :feature do
|
|
|
49
49
|
expect(intent['Id']).to eq(fetched['Id'])
|
|
50
50
|
expect(intent['Status']).to eq(fetched['Status'])
|
|
51
51
|
end
|
|
52
|
+
|
|
53
|
+
it 'fetches the external providers list' do
|
|
54
|
+
response = MangoPay::PayIn::PayInIntent::Intent.get_external_providers_list
|
|
55
|
+
expect(response).not_to be_nil
|
|
56
|
+
expect(response).not_to be_empty
|
|
57
|
+
expect(response).to include('Mangopay')
|
|
58
|
+
end
|
|
52
59
|
end
|
|
53
60
|
|
|
54
61
|
describe 'CANCEL' do
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mangopay4-ruby-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.52.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Geoffroy Lorieux
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-
|
|
12
|
+
date: 2026-09-01 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: multi_json
|