mangopay4-ruby-sdk 3.44.0 → 3.45.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 621e8f8e16b09e561daa2599baee6d9fa62205029dcbb205ffe3a187246d0472
4
- data.tar.gz: 4578a9521296e546cd78cdf534702a172e9e755a11ebe9ea7d0ca71d85ef244c
3
+ metadata.gz: 34a20d61f0af4ebbb27b23462855b1e3245dea990232708c2cadf541388a1d3e
4
+ data.tar.gz: 0c60b1686a83da66bbc35eff7d79c2dc76669b433d30ade26005fbff5804d6d2
5
5
  SHA512:
6
- metadata.gz: 15ff1ead90a14f6917f1fa7b45050a1c88e2c145722981edc58afbcdac0c707d1c57e50b524d6f74ce34bb964752c7444cfb1cfadc4826488cdfba77f6e6acd3
7
- data.tar.gz: 8189aabd86122afac9360cf3d77733d73ac19e59b64d3e7e2df06c4be2bb0f28fd302df4e4da2f26230f0cee42855984d6416bcad416a45649a177144a0f1c2f
6
+ metadata.gz: 401e7578d63593838a3ddd30ccf4f51a7dc954d03a425eddbc3328e872692adf9fc2b16c3ab96310b31de856bdd6e000e63adee0fa5b0aaae8197f3ddd9258ee
7
+ data.tar.gz: 3f33993df417398540c62ed379f07b00a6a7fafd3115803b18f1fda163138ea7b431577bbcd933de503e45647a523983600cb29de7c7046b6897127254f4e884
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [3.45.0] - 2026-01-27
2
+ ### Added
3
+ - Support for new [GET View the SCA status of a User](https://docs.mangopay.com/api-reference/users/view-user-sca-status) endpoint ([API release note](https://docs.mangopay.com/release-notes/api/2026-01-15)) (#326)
4
+ - Support for Acquiring - Card Validation endpoint (#327)
5
+
6
+ Release PR: #328
7
+
1
8
  ## [3.44.0] - 2025-11-28
2
9
  ### Changed
3
10
  - Migrated to V4 naming convention
@@ -8,6 +8,13 @@ module MangoPay
8
8
  MangoPay.request(:post, "#{MangoPay.api_path}/acquiring/payins/card/direct", params, {}, idempotency_key)
9
9
  end
10
10
  end
11
+
12
+ class << self
13
+ def create_card_validation(card_id, params)
14
+ url = "#{MangoPay.api_path}/acquiring/cards/#{card_id}/validation"
15
+ MangoPay.request(:post, url, params)
16
+ end
17
+ end
11
18
  end
12
19
 
13
20
  module ApplePay
data/lib/mangopay/user.rb CHANGED
@@ -95,6 +95,10 @@ module MangoPay
95
95
  def validate_data_format(params, idempotency_key = nil)
96
96
  MangoPay.request(:post, "#{MangoPay.api_path}/users/data-formats/validation", params, {}, idempotency_key)
97
97
  end
98
+
99
+ def get_sca_status(user_id, filters = {})
100
+ MangoPay.request(:get, "#{MangoPay.api_path}/sca/users/#{user_id}/sca-status", {}, filters)
101
+ end
98
102
  end
99
103
  end
100
104
  end
@@ -1,3 +1,3 @@
1
1
  module MangoPay
2
- VERSION = '3.44.0'
2
+ VERSION = '3.45.0'
3
3
  end
@@ -1,8 +1,9 @@
1
- xdescribe MangoPay::Hook do
1
+ xdescribe MangoPay::Acquiring do
2
2
  include_context 'wallets'
3
3
  include_context 'payins'
4
4
 
5
5
  let(:card_id) { 'placeholder' }
6
+ let(:author_id) { 'placeholder' }
6
7
 
7
8
  describe 'PAY_IN CARD DIRECT' do
8
9
  it 'creates a Card Direct PayIn' do
@@ -141,6 +142,31 @@ xdescribe MangoPay::Hook do
141
142
  end
142
143
  end
143
144
 
145
+ describe 'CARD VALIDATION' do
146
+ it 'creates card validation' do
147
+ params = {
148
+ AuthorId: author_id,
149
+ SecureModeReturnURL: "https://mangopay.com",
150
+ IpAddress: "2001:0620:0000:0000:0211:24FF:FE80:C12C",
151
+ Tag: "custom meta",
152
+ BrowserInfo: {
153
+ AcceptHeader: "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8",
154
+ JavaEnabled: true,
155
+ Language: "FR-FR",
156
+ ColorDepth: 4,
157
+ ScreenHeight: 1800,
158
+ ScreenWidth: 400,
159
+ JavascriptEnabled: true,
160
+ TimeZoneOffset: "+60",
161
+ UserAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"
162
+ }
163
+ }
164
+ card_validation = MangoPay::Acquiring::PayIn::Card.create_card_validation(card_id, params)
165
+ expect(card_validation).not_to be_nil
166
+ expect("SUCCEEDED").to eq(card_validation['Status'])
167
+ end
168
+ end
169
+
144
170
  def create_new_pay_in_card_direct
145
171
  MangoPay::Acquiring::PayIn::Card::Direct.create(
146
172
  DebitedFunds: { Currency: 'EUR', Amount: 100 },
@@ -99,13 +99,8 @@ describe MangoPay::PayIn::PayInIntent, type: :feature do
99
99
  it 'reverses split' do
100
100
  intent = new_payin_intent_authorization
101
101
  split = create_new_splits(intent)['Splits'][0]
102
- expect {
103
- MangoPay::PayIn::PayInIntent::Split.reverse(intent['Id'], split['Id'])
104
- }.to raise_error { |err|
105
- expect(err).to be_a MangoPay::ResponseError
106
- expect(err.code).to eq '400'
107
- expect(err.details['Type']).to eq 'param_error'
108
- }
102
+ reversed = MangoPay::PayIn::PayInIntent::Split.reverse(intent['Id'], split['Id'])
103
+ expect(reversed['Status']).to eq('REVERSED')
109
104
  end
110
105
 
111
106
  it 'fetches split' do
@@ -21,7 +21,8 @@ describe MangoPay::PayIn::Payconiq::Web, type: :feature do
21
21
  check_type_and_status(created)
22
22
  end
23
23
 
24
- it 'creates a payconiq web payin using the old endpoint' do
24
+ # endpoint removed
25
+ xit 'creates a payconiq web payin using the old endpoint' do
25
26
  created = new_payin_payconiq_web_legacy
26
27
  expect(created['Id']).not_to be_nil
27
28
  check_type_and_status(created)
@@ -441,4 +441,15 @@ describe MangoPay::User do
441
441
  }
442
442
  end
443
443
  end
444
+
445
+ describe 'SCA STATUS' do
446
+ it 'fetches SCA status' do
447
+ sca_status = MangoPay::User.get_sca_status("user_m_01JKZW095BFB2TRQMCZ8GE7M8D")
448
+ expect(sca_status).not_to be_nil
449
+ expect(sca_status['LastEnrollmentDate']).not_to be_nil
450
+ expect(sca_status['ConsentScope']['ContactInformationUpdate']).not_to be_nil
451
+ expect(sca_status['UserStatus']).to eq('ACTIVE')
452
+ expect(sca_status['IsEnrolled']).to eq(true)
453
+ end
454
+ end
444
455
  end
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.44.0
4
+ version: 3.45.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-12-01 00:00:00.000000000 Z
12
+ date: 2026-01-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json