mangopay 3.37.0 → 3.38.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/pay_in.rb +10 -0
- data/lib/mangopay/version.rb +1 -1
- data/spec/mangopay/payin_bizum_web_spec.rb +54 -0
- data/spec/mangopay/shared_resources.rb +31 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 490bc4ee834e6c591f42456637a116b9e8c09af66be9eeec4198ef95b2db1ae1
|
4
|
+
data.tar.gz: b310faa226c9d22cb6d6c44cc89913b6cec3906d2027dfb81ed9c7bc7143ac09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bff895c1dfee2e2901bc3876e7a008c72777ae6aba76525f88e1467112062b2ac765aed93cc42c65338cfcbfbf9c5c0235526e070187862b70ec6d47352c072a
|
7
|
+
data.tar.gz: 1a3e2417f3f0295c90c2dc4d24a95570ae134a12b6307cc43228a9f6fb1f8538dabe651de790fa222a40dad540896c00fed857946e07985fe4274f8632aac166
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
## [3.38.0] - 2025-07-02
|
2
|
+
### Added
|
3
|
+
- New endpoint [POST Create a Bizum PayIn](https://docs.mangopay.com/api-reference/bizum/create-bizum-payin)
|
4
|
+
- New webhook event types for SCA enrollment ([API release note](https://docs.mangopay.com/release-notes/api/2025-06-23)), note that these are triggered on enrollment not authentication:
|
5
|
+
- `SCA_ENROLLMENT_SUCCEEDED`
|
6
|
+
- `SCA_ENROLLMENT_FAILED`
|
7
|
+
- `SCA_ENROLLMENT_EXPIRED`
|
8
|
+
- New webhook event types for `UserCategory` change ([API release note](https://docs.mangopay.com/release-notes/api/2025-06-23) ):
|
9
|
+
- `USER_CATEGORY_UPDATED_TO_OWNER`
|
10
|
+
- `USER_CATEGORY_UPDATED_TO_PAYER`
|
11
|
+
- `USER_CATEGORY_UPDATED_TO_PLATFORM`
|
12
|
+
- Support for `PLATFORM` value to `UserCategory` enum
|
13
|
+
|
1
14
|
## [3.37.0] - 2025-06-24
|
2
15
|
### Changed
|
3
16
|
- `multi_json` library version updated to 1.15.0 (latest, release 2020) to enable compatibility with later versions of Ruby
|
data/lib/mangopay/pay_in.rb
CHANGED
@@ -255,6 +255,16 @@ module MangoPay
|
|
255
255
|
end
|
256
256
|
end
|
257
257
|
|
258
|
+
module Bizum
|
259
|
+
class Web < Resource
|
260
|
+
include HTTPCalls::Create
|
261
|
+
|
262
|
+
def self.url(*)
|
263
|
+
"#{MangoPay.api_path}/payins/payment-methods/bizum"
|
264
|
+
end
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
258
268
|
module Twint
|
259
269
|
class Web < Resource
|
260
270
|
include HTTPCalls::Create
|
data/lib/mangopay/version.rb
CHANGED
@@ -0,0 +1,54 @@
|
|
1
|
+
describe MangoPay::PayIn::Bizum::Web, type: :feature do
|
2
|
+
include_context 'wallets'
|
3
|
+
include_context 'payins'
|
4
|
+
|
5
|
+
def check_type_and_status(payin)
|
6
|
+
expect(payin['Type']).to eq('PAYIN')
|
7
|
+
expect(payin['PaymentType']).to eq('BIZUM')
|
8
|
+
expect(payin['ExecutionType']).to eq('WEB')
|
9
|
+
expect(payin['Status']).to eq('CREATED')
|
10
|
+
end
|
11
|
+
|
12
|
+
describe 'CREATE' do
|
13
|
+
it 'creates a bizum web payin with phone' do
|
14
|
+
created = new_payin_bizum_web_with_phone
|
15
|
+
expect(created['Id']).not_to be_nil
|
16
|
+
expect(created['Phone']).not_to be_nil
|
17
|
+
expect(created['ReturnURL']).to be_nil
|
18
|
+
check_type_and_status(created)
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'creates a bizum web payin with return url' do
|
22
|
+
created = new_payin_bizum_web_with_return_url
|
23
|
+
expect(created['Id']).not_to be_nil
|
24
|
+
expect(created['Phone']).to be_nil
|
25
|
+
expect(created['ReturnURL']).not_to be_nil
|
26
|
+
check_type_and_status(created)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'FETCH' do
|
31
|
+
it 'fetches a bizum payin with phone' do
|
32
|
+
created = new_payin_bizum_web_with_phone
|
33
|
+
fetched = MangoPay::PayIn.fetch(created['Id'])
|
34
|
+
expect(fetched['Id']).to eq(created['Id'])
|
35
|
+
expect(fetched['Phone']).not_to be_nil
|
36
|
+
expect(fetched['Phone']).to eq(created['Phone'])
|
37
|
+
expect(fetched['ReturnURL']).to be_nil
|
38
|
+
expect(fetched['ReturnURL']).to eq(created['ReturnURL'])
|
39
|
+
check_type_and_status(created)
|
40
|
+
check_type_and_status(fetched)
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'fetches a bizum payin with return url' do
|
44
|
+
created = new_payin_bizum_web_with_return_url
|
45
|
+
fetched = MangoPay::PayIn.fetch(created['Id'])
|
46
|
+
expect(fetched['Id']).to eq(created['Id'])
|
47
|
+
expect(fetched['ReturnURL']).not_to be_nil
|
48
|
+
expect(fetched['Phone']).to be_nil
|
49
|
+
expect(fetched['ReturnURL']).to eq(created['ReturnURL'])
|
50
|
+
check_type_and_status(created)
|
51
|
+
check_type_and_status(fetched)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -752,6 +752,37 @@ shared_context 'payins' do
|
|
752
752
|
)
|
753
753
|
end
|
754
754
|
|
755
|
+
###############################################
|
756
|
+
# Bizum/web
|
757
|
+
###############################################
|
758
|
+
let(:new_payin_bizum_web_with_phone) do
|
759
|
+
user = new_natural_user
|
760
|
+
wallet = new_wallet
|
761
|
+
bizum = define_new_bizum(user, wallet, '+34700000000', nil)
|
762
|
+
MangoPay::PayIn::Bizum::Web.create(bizum)
|
763
|
+
end
|
764
|
+
|
765
|
+
let(:new_payin_bizum_web_with_return_url) do
|
766
|
+
user = new_natural_user
|
767
|
+
wallet = new_wallet
|
768
|
+
bizum = define_new_bizum(user, wallet, nil, 'https://docs.mangopay.com/please-ignore')
|
769
|
+
MangoPay::PayIn::Bizum::Web.create(bizum)
|
770
|
+
end
|
771
|
+
|
772
|
+
def define_new_bizum(user, wallet, phone, return_url)
|
773
|
+
{
|
774
|
+
AuthorId: user['Id'],
|
775
|
+
CreditedWalletId: wallet['Id'],
|
776
|
+
DebitedFunds: { Currency: 'EUR', Amount: 400 },
|
777
|
+
Fees: { Currency: 'EUR', Amount: 1 },
|
778
|
+
StatementDescriptor: "test bizum",
|
779
|
+
Phone: phone,
|
780
|
+
ReturnUrl: return_url,
|
781
|
+
Tag: 'Test PayIn/Bizum/Web',
|
782
|
+
ProfilingAttemptReference: nil
|
783
|
+
}
|
784
|
+
end
|
785
|
+
|
755
786
|
###############################################
|
756
787
|
# Twint/web
|
757
788
|
###############################################
|
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.38.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
|
+
date: 2025-07-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -141,6 +141,7 @@ files:
|
|
141
141
|
- spec/mangopay/payin_bancontact_web_spec.rb
|
142
142
|
- spec/mangopay/payin_bankwire_direct_spec.rb
|
143
143
|
- spec/mangopay/payin_bankwire_external_instruction_spec.rb
|
144
|
+
- spec/mangopay/payin_bizum_web_spec.rb
|
144
145
|
- spec/mangopay/payin_blik_web_spec.rb
|
145
146
|
- spec/mangopay/payin_card_direct_spec.rb
|
146
147
|
- spec/mangopay/payin_card_web_spec.rb
|
@@ -227,6 +228,7 @@ test_files:
|
|
227
228
|
- spec/mangopay/payin_bancontact_web_spec.rb
|
228
229
|
- spec/mangopay/payin_bankwire_direct_spec.rb
|
229
230
|
- spec/mangopay/payin_bankwire_external_instruction_spec.rb
|
231
|
+
- spec/mangopay/payin_bizum_web_spec.rb
|
230
232
|
- spec/mangopay/payin_blik_web_spec.rb
|
231
233
|
- spec/mangopay/payin_card_direct_spec.rb
|
232
234
|
- spec/mangopay/payin_card_web_spec.rb
|