mangopay 3.13.2 → 3.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/mangopay/pay_in.rb +10 -0
- data/lib/mangopay/version.rb +1 -1
- data/spec/mangopay/payin_mbway_direct_spec.rb +32 -0
- data/spec/mangopay/shared_resources.rb +15 -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: beedb37b5e5b4381ee58a8ed47575aa8f4b1df22a033387fa3cdda2d2b65062a
|
4
|
+
data.tar.gz: df0350f49877a9c4121f1d2e37dcb4d015f57061622c3e915d1e1e99f28b27da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 130b77d46dd296fa3434295c12c914783e1e9ce64f62f32ca8469eb78978c4be27f96d5d2c703c453ca22bad192a07cff32c80f68b5fc6c7c74bd4bab5ac2abd
|
7
|
+
data.tar.gz: ee23071676d425d0d50e719dc346349ff139eaec66fb5a0d59c166a3f547e4cb784cadb3e9b5a9cf64beb2b39814c41e149a1c1c6a040ff28167b72f2dcc2dea
|
data/CHANGELOG.md
CHANGED
data/lib/mangopay/pay_in.rb
CHANGED
@@ -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
|
data/lib/mangopay/version.rb
CHANGED
@@ -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.
|
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-
|
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
|