mangopay 3.40.2 → 3.41.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 +5 -0
- data/lib/mangopay/pay_in.rb +11 -3
- data/lib/mangopay/version.rb +1 -1
- data/spec/mangopay/payin_intent_spec.rb +12 -12
- data/spec/mangopay/payin_paypal_web_spec.rb +39 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a6a2790b8825c18439678e219f170adab7aa2594ec350597f2165b56ea7f492
|
4
|
+
data.tar.gz: ecbcb907567f599cba9afb346ae9766e8ed6527b1e081d9a7c69116ef8deacd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 959771a5c33e931f588a1250260e353e9ff72e334ca2c1539b134023843561d07d5f867aa960ba3d902f0cf1066509eb227c6fad1f4cb76de27be3c1e5d2b37c
|
7
|
+
data.tar.gz: 5599d629801ebdb3e7369afa858ad4da785244a9eedc12734b96ecb47724baf1c59eff246989dac3d7598978e94c2e52d3bd8b060921daf935f90e18f489dd63
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## [3.41.0] - 2025-10-01
|
2
|
+
### Added
|
3
|
+
- Support for the [POST Cancel an Intent](https://docs.mangopay.com/api-reference/intents/cancel-intent) endpoint for [Echo](https://docs.mangopay.com/guides/echo), Mangopay's solution for platforms working with another third-party PSP for funds acquisition (#435)
|
4
|
+
- Support for [POST Submit data for a PayPal PayIn](https://docs.mangopay.com/api-reference/paypal/submit-data-paypal-payin) endpoint (#305)
|
5
|
+
|
1
6
|
## [3.40.2] - 2025-09-02
|
2
7
|
### Changed
|
3
8
|
- OAuth token refresh buffer before expiry updated to 30s #303
|
data/lib/mangopay/pay_in.rb
CHANGED
@@ -135,6 +135,14 @@ module MangoPay
|
|
135
135
|
def self.add_paypal_tracking_information(pay_in_id, params, idempotency_key = nil)
|
136
136
|
MangoPay.request(:put, "#{MangoPay.api_path}/payins/#{pay_in_id}/trackings", params, {}, idempotency_key)
|
137
137
|
end
|
138
|
+
|
139
|
+
def self.create_data_collection(params, idempotency_key = nil)
|
140
|
+
MangoPay.request(:post, "#{MangoPay.api_path}/payins/payment-methods/paypal/data-collection", params, {}, idempotency_key)
|
141
|
+
end
|
142
|
+
|
143
|
+
def self.get_data_collection(data_collection_id, idempotency_key = nil)
|
144
|
+
MangoPay.request(:get, "#{MangoPay.api_path}/payins/payment-methods/paypal/data-collection/#{data_collection_id}")
|
145
|
+
end
|
138
146
|
end
|
139
147
|
|
140
148
|
end
|
@@ -372,9 +380,9 @@ module MangoPay
|
|
372
380
|
MangoPay.request(:get, "#{MangoPay.api_path_v3}/payins/intents/#{intent_id}")
|
373
381
|
end
|
374
382
|
|
375
|
-
|
376
|
-
|
377
|
-
|
383
|
+
def cancel(intent_id, params, idempotency_key = nil)
|
384
|
+
MangoPay.request(:post, "#{MangoPay.api_path_v3}/payins/intents/#{intent_id}/cancel", params, {}, idempotency_key)
|
385
|
+
end
|
378
386
|
end
|
379
387
|
end
|
380
388
|
|
data/lib/mangopay/version.rb
CHANGED
@@ -62,18 +62,18 @@ describe MangoPay::PayIn::PayInIntent, type: :feature do
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
65
|
+
describe 'CANCEL' do
|
66
|
+
it 'cancels an intent' do
|
67
|
+
intent = new_payin_intent_authorization
|
68
|
+
canceled = MangoPay::PayIn::PayInIntent::Intent.cancel(intent['Id'], {
|
69
|
+
"ExternalData": {
|
70
|
+
"ExternalProcessingDate": 1728133765,
|
71
|
+
"ExternalProviderReference": SecureRandom.uuid,
|
72
|
+
}
|
73
|
+
})
|
74
|
+
expect(canceled['Status']).to eq('CANCELLED')
|
75
|
+
end
|
76
|
+
end
|
77
77
|
|
78
78
|
describe 'SPLITS' do
|
79
79
|
it 'creates a split' do
|
@@ -71,4 +71,43 @@ describe MangoPay::PayIn::PayPal::Web, type: :feature do
|
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
74
|
+
describe 'Data Collection' do
|
75
|
+
it 'creates data collection' do
|
76
|
+
created = MangoPay::PayIn::PayPal::Web.create_data_collection(get_data_collection_dto)
|
77
|
+
expect(created['dataCollectionId']).not_to be_nil
|
78
|
+
end
|
79
|
+
|
80
|
+
it 'fetches data collection' do
|
81
|
+
created = MangoPay::PayIn::PayPal::Web.create_data_collection(get_data_collection_dto)
|
82
|
+
fetched = MangoPay::PayIn::PayPal::Web.get_data_collection(created['dataCollectionId'])
|
83
|
+
expect(fetched['DataCollectionId']).to eq(created['dataCollectionId'])
|
84
|
+
expect(fetched['sender_first_name']).to eq('Jane')
|
85
|
+
expect(fetched['sender_last_name']).to eq('Doe')
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
def get_data_collection_dto
|
90
|
+
return {
|
91
|
+
"sender_account_id": "A12345N343",
|
92
|
+
"sender_first_name": "Jane",
|
93
|
+
"sender_last_name": "Doe",
|
94
|
+
"sender_email": "jane.doe@sample.com",
|
95
|
+
"sender_phone": "(042)11234567",
|
96
|
+
"sender_address_zip": "75009",
|
97
|
+
"sender_country_code": "FR",
|
98
|
+
"sender_create_date": "2012-12-09T19:14:55.277-0:00",
|
99
|
+
"sender_signup_ip": "10.220.90.20",
|
100
|
+
"sender_popularity_score": "high",
|
101
|
+
"receiver_account_id": "A12345N344",
|
102
|
+
"receiver_create_date": "2012-12-09T19:14:55.277-0:00",
|
103
|
+
"receiver_email": "jane@sample.com",
|
104
|
+
"receiver_address_country_code": "FR",
|
105
|
+
"business_name": "Jane Ltd",
|
106
|
+
"recipient_popularity_score": "high",
|
107
|
+
"first_interaction_date": "2012-12-09T19:14:55.277-0:00",
|
108
|
+
"txn_count_total": "34",
|
109
|
+
"vertical": "Household goods",
|
110
|
+
"transaction_is_tangible": "0"
|
111
|
+
}
|
112
|
+
end
|
74
113
|
end
|
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.41.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-10-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|