mangopay 3.28.2 → 3.29.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 +16 -0
- data/lib/mangopay/identity_verification.rb +16 -0
- data/lib/mangopay/version.rb +1 -1
- data/lib/mangopay.rb +1 -0
- data/spec/mangopay/identity_verification_spec.rb +51 -0
- data/spec/mangopay/virtual_account_spec.rb +0 -2
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6e546a3d999741a0f9b073f3d3897a70b7ccaad0ba4588e7d15523f36817936
|
4
|
+
data.tar.gz: 85f3c907add9c223f2d0905939386a671d56165ee9b274588933354464e8b272
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28178d15ccecbb8503e6e3c28fe202a4542d6b4bda077ff73146b6c63ac9c96792f29b29b330497acef3372699399a3b179adf222f7b6e518fb5c0f6b58da347
|
7
|
+
data.tar.gz: 22409f1f64387a5fdc8df32f75be99bf7412fdf4cb332b2022be34a26a4ca2e64a53b6398a8a374dffff007e0a32cec99903459315752675ef5dd9e73b5e9b83
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
## [3.29.0] - 2025-02-26
|
2
|
+
### Added
|
3
|
+
|
4
|
+
Endpoints and webhooks for [hosted KYC/B solution](https://docs.mangopay.com/guides/users/verification/hosted) (in beta)
|
5
|
+
|
6
|
+
- Endpoints
|
7
|
+
- [Create an IDV Session](https://docs.mangopay.com/api-reference/idv-sessions/create-idv-session)
|
8
|
+
- [View an IDV Session](https://docs.mangopay.com/api-reference/idv-sessions/view-idv-session)
|
9
|
+
- [View Checks for an IDV Session](https://mangopay-idv.mintlify.app/api-reference/idv-sessions/view-idv-session-checks)
|
10
|
+
|
11
|
+
- Event types
|
12
|
+
- `IDENTITY_VERIFICATION_VALIDATED`
|
13
|
+
- `IDENTITY_VERIFICATION_FAILED`
|
14
|
+
- `IDENTITY_VERIFICATION_INCONCLUSIVE`
|
15
|
+
- `IDENTITY_VERIFICATION_OUTDATED`
|
16
|
+
|
1
17
|
## [3.28.2] - 2025-02-13
|
2
18
|
### Updated
|
3
19
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module MangoPay
|
2
|
+
|
3
|
+
class IdentityVerification < Resource
|
4
|
+
def self.create(params, user_id, idempotency_key = nil)
|
5
|
+
MangoPay.request(:post, "#{MangoPay.api_path}/users/#{user_id}/identity-verifications", params, {}, idempotency_key)
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.get(identity_verification_id, filters = {})
|
9
|
+
MangoPay.request(:get, "#{MangoPay.api_path}/identity-verifications/#{identity_verification_id}", {}, filters)
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.get_checks(identity_verification_id, filters = {})
|
13
|
+
MangoPay.request(:get, "#{MangoPay.api_path}/identity-verifications/#{identity_verification_id}/checks", {}, filters)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/mangopay/version.rb
CHANGED
data/lib/mangopay.rb
CHANGED
@@ -48,6 +48,7 @@ module MangoPay
|
|
48
48
|
autoload :Conversion, 'mangopay/conversion'
|
49
49
|
autoload :PaymentMethodMetadata, 'mangopay/payment_method_metadata'
|
50
50
|
autoload :VirtualAccount, 'mangopay/virtual_account'
|
51
|
+
autoload :IdentityVerification, 'mangopay/identity_verification'
|
51
52
|
|
52
53
|
# temporary
|
53
54
|
autoload :Temp, 'mangopay/temp'
|
@@ -0,0 +1,51 @@
|
|
1
|
+
describe MangoPay::IdentityVerification do
|
2
|
+
include_context 'users'
|
3
|
+
|
4
|
+
describe 'CREATE' do
|
5
|
+
it 'creates a new identity verification' do
|
6
|
+
created = create_new_identity_verification
|
7
|
+
expect(created).not_to be_nil
|
8
|
+
expect(created['HostedUrl']).not_to be_nil
|
9
|
+
expect(created['ReturnUrl']).not_to be_nil
|
10
|
+
expect(created['Status']).to eq('PENDING')
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe 'GET' do
|
15
|
+
it 'fetches existing identity verification' do
|
16
|
+
created = create_new_identity_verification
|
17
|
+
fetched = MangoPay::IdentityVerification.get(created['Id'])
|
18
|
+
|
19
|
+
expect(fetched).not_to be_nil
|
20
|
+
expect(created['HostedUrl']).to eq(fetched['HostedUrl'])
|
21
|
+
expect(created['ReturnUrl']).to eq(fetched['ReturnUrl'])
|
22
|
+
expect(created['Status']).to eq(fetched['Status'])
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe 'GET CHECKS' do
|
27
|
+
it 'fetches checks for an existing identity verification' do
|
28
|
+
created = create_new_identity_verification
|
29
|
+
checks = MangoPay::IdentityVerification.get_checks(created['Id'])
|
30
|
+
|
31
|
+
expect(checks).not_to be_nil
|
32
|
+
expect(created['Id']).to eq(checks['SessionId'])
|
33
|
+
expect(checks['Status']).not_to be_nil
|
34
|
+
expect(checks['CreationDate']).not_to be_nil
|
35
|
+
expect(checks['LastUpdate']).not_to be_nil
|
36
|
+
expect(checks['Checks']).not_to be_nil
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def create_new_identity_verification
|
41
|
+
user = new_natural_user
|
42
|
+
return MangoPay::IdentityVerification.create(
|
43
|
+
{
|
44
|
+
ReturnUrl: 'http://example.com',
|
45
|
+
Tag: 'created by the Ruby SDK'
|
46
|
+
},
|
47
|
+
user['Id']
|
48
|
+
)
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
@@ -43,8 +43,6 @@ describe MangoPay::VirtualAccount do
|
|
43
43
|
|
44
44
|
describe 'FETCH AVAILABILITIES' do
|
45
45
|
it 'get availabilities' do
|
46
|
-
# TODO
|
47
|
-
pending("API issue. Re-enable when fixed.")
|
48
46
|
availabilities = MangoPay::VirtualAccount.fetch_availabilities
|
49
47
|
expect(availabilities).not_to be_nil
|
50
48
|
expect(availabilities['Collection']).not_to be_nil
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mangopay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.29.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: 2025-02-
|
12
|
+
date: 2025-02-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- lib/mangopay/filter_parameters.rb
|
91
91
|
- lib/mangopay/hook.rb
|
92
92
|
- lib/mangopay/http_calls.rb
|
93
|
+
- lib/mangopay/identity_verification.rb
|
93
94
|
- lib/mangopay/json.rb
|
94
95
|
- lib/mangopay/kyc_document.rb
|
95
96
|
- lib/mangopay/legal_user.rb
|
@@ -127,6 +128,7 @@ files:
|
|
127
128
|
- spec/mangopay/fetch_filters_spec.rb
|
128
129
|
- spec/mangopay/hook_spec.rb
|
129
130
|
- spec/mangopay/idempotency_spec.rb
|
131
|
+
- spec/mangopay/identity_verification_spec.rb
|
130
132
|
- spec/mangopay/kyc_document_spec.png
|
131
133
|
- spec/mangopay/kyc_document_spec.rb
|
132
134
|
- spec/mangopay/log_requests_filter_spec.rb
|
@@ -209,6 +211,7 @@ test_files:
|
|
209
211
|
- spec/mangopay/fetch_filters_spec.rb
|
210
212
|
- spec/mangopay/hook_spec.rb
|
211
213
|
- spec/mangopay/idempotency_spec.rb
|
214
|
+
- spec/mangopay/identity_verification_spec.rb
|
212
215
|
- spec/mangopay/kyc_document_spec.png
|
213
216
|
- spec/mangopay/kyc_document_spec.rb
|
214
217
|
- spec/mangopay/log_requests_filter_spec.rb
|