mangopay 3.13.2 → 3.14.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: 33c2d6553dc8885b0fe21e619033297cf0b7101a34075ad1bc71ec9a17117707
4
- data.tar.gz: ec0af8fa883f54639840ff7fd47b26f3ac491509122ecb83a755919263d4e811
3
+ metadata.gz: beedb37b5e5b4381ee58a8ed47575aa8f4b1df22a033387fa3cdda2d2b65062a
4
+ data.tar.gz: df0350f49877a9c4121f1d2e37dcb4d015f57061622c3e915d1e1e99f28b27da
5
5
  SHA512:
6
- metadata.gz: 2be5f515afb4652ec2b18d8411dfcaff56ccde9e7c7a121dc6ce575392165ae1a86a0d245f4553e0a9b94e7d8cefe4acb00284c9946b47d1a3a05ce3a38ad030
7
- data.tar.gz: a67eab6dbb229a8a9d53f4839faa11650de723dda61bf208e8a10c44b7c7fcf47605a7af2620330d501b5a278b891cb57b15f6b58b21275b67de677f812d0d69
6
+ metadata.gz: 130b77d46dd296fa3434295c12c914783e1e9ce64f62f32ca8469eb78978c4be27f96d5d2c703c453ca22bad192a07cff32c80f68b5fc6c7c74bd4bab5ac2abd
7
+ data.tar.gz: ee23071676d425d0d50e719dc346349ff139eaec66fb5a0d59c166a3f547e4cb784cadb3e9b5a9cf64beb2b39814c41e149a1c1c6a040ff28167b72f2dcc2dea
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## [3.14.0] - 2023-06-21
2
+ ### Added
3
+
4
+ - MB WAY is now available as a payment method with Mangopay. This payment method is in private beta. Please contact support if you have any questions.
5
+
1
6
  ## [3.13.2] - 2023-05-18
2
7
  ### Fixes
3
8
 
@@ -141,6 +141,16 @@ module MangoPay
141
141
  end
142
142
  end
143
143
 
144
+ module Mbway
145
+ class Direct < Resource
146
+ include HTTPCalls::Create
147
+
148
+ def self.url(*)
149
+ "#{MangoPay.api_path}/payins/payment-methods/mbway"
150
+ end
151
+ end
152
+ end
153
+
144
154
  module RecurringPayments
145
155
  class Recurring < Resource
146
156
  include HTTPCalls::Create
@@ -1,3 +1,3 @@
1
1
  module MangoPay
2
- VERSION = '3.13.2'
2
+ VERSION = '3.14.0'
3
3
  end
@@ -0,0 +1,32 @@
1
+ describe MangoPay::PayIn::Mbway::Direct, 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['Nature']).to eq('REGULAR')
8
+ expect(payin['PaymentType']).to eq('MBWAY')
9
+ expect(payin['ExecutionType']).to eq('DIRECT')
10
+ expect(payin['Status']).to eq('CREATED')
11
+ end
12
+
13
+ describe 'CREATE' do
14
+ it 'creates a mbway direct payin' do
15
+ created = new_payin_mbway_direct
16
+ expect(created['Id']).not_to be_nil
17
+ expect(created['PhoneNumber']).not_to be_nil
18
+ check_type_and_status(created)
19
+ end
20
+ end
21
+
22
+ describe 'FETCH' do
23
+ it 'fetches a payin' do
24
+ created = new_payin_mbway_direct
25
+ fetched = MangoPay::PayIn.fetch(created['Id'])
26
+ expect(fetched['Id']).to eq(created['Id'])
27
+ check_type_and_status(created)
28
+ check_type_and_status(fetched)
29
+ end
30
+ end
31
+
32
+ end
@@ -417,6 +417,21 @@ shared_context 'payins' do
417
417
 
418
418
  let(:new_payin_card_direct) { create_new_payin_card_direct(new_wallet) }
419
419
 
420
+ ###############################################
421
+ # MBWAY/direct
422
+ ###############################################
423
+ let(:new_payin_mbway_direct) do
424
+ MangoPay::PayIn::Mbway::Direct.create(
425
+ AuthorId: new_natural_user['Id'],
426
+ CreditedWalletId: new_wallet['Id'],
427
+ DebitedFunds: {Currency: 'EUR', Amount: 199},
428
+ Fees: {Currency: 'EUR', Amount: 1},
429
+ StatementDescriptor: "ruby",
430
+ Tag: 'Test PayIn/Mbway/Direct',
431
+ PhoneNumber: '351#269458236'
432
+ )
433
+ end
434
+
420
435
  def create_new_payin_card_direct(to_wallet, amnt = 1000)
421
436
  cardreg = new_card_registration_completed
422
437
  MangoPay::PayIn::Card::Direct.create(
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.13.2
4
+ version: 3.14.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: 2023-05-18 00:00:00.000000000 Z
12
+ date: 2023-06-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json
@@ -134,6 +134,7 @@ files:
134
134
  - spec/mangopay/payin_card_web_spec.rb
135
135
  - spec/mangopay/payin_directdebit_direct_spec.rb
136
136
  - spec/mangopay/payin_directdebit_web_spec.rb
137
+ - spec/mangopay/payin_mbway_direct_spec.rb
137
138
  - spec/mangopay/payin_payconiq_web_spec.rb
138
139
  - spec/mangopay/payin_paypal_web_spec.rb
139
140
  - spec/mangopay/payin_preauthorized_direct_spec.rb
@@ -202,6 +203,7 @@ test_files:
202
203
  - spec/mangopay/payin_card_web_spec.rb
203
204
  - spec/mangopay/payin_directdebit_direct_spec.rb
204
205
  - spec/mangopay/payin_directdebit_web_spec.rb
206
+ - spec/mangopay/payin_mbway_direct_spec.rb
205
207
  - spec/mangopay/payin_payconiq_web_spec.rb
206
208
  - spec/mangopay/payin_paypal_web_spec.rb
207
209
  - spec/mangopay/payin_preauthorized_direct_spec.rb