swiss-crm-activemerchant-v2 1.0.27 → 1.0.28
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 395642de699b76ea08960c76960c856dbc3c493e39c95a3755cb9503517ed980
|
4
|
+
data.tar.gz: 83f22a8df4ba195ecb8485fc857af605d6abae4505a5bdff13cd35806f83f38f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86734ccd901d11b2743de57dd7a7440ce4e716eb29528ec5388aeca631549293a1a796e8f4797649afb4f40ff31ffff6ebdd67b0c49f341b493efa701e3f2f74
|
7
|
+
data.tar.gz: 831f5049e863030c2e200d7fc03bb7fdf67d71c90ede532b5fa7a67b78667693660fddda1a62d12d54e1f687b3ff5b487bd066b9add0e4fc0fa825bbc9424390
|
@@ -37,6 +37,7 @@ module ActiveMerchant #:nodoc:
|
|
37
37
|
add_billing_address(post, payment_source, options['billing_address'])
|
38
38
|
add_merchant_data(post, options)
|
39
39
|
add_idempotency_key(post, options)
|
40
|
+
add_subscription_data(post, amount, options) if options[:flex_merchant_initiated]
|
40
41
|
|
41
42
|
evaluate_response = commit('evaluate', post, token_response.authorization, options)
|
42
43
|
handle_evaluate_response(evaluate_response, amount, options)
|
@@ -190,6 +191,18 @@ module ActiveMerchant #:nodoc:
|
|
190
191
|
}.compact
|
191
192
|
end
|
192
193
|
|
194
|
+
def add_subscription_data(post, amount, options)
|
195
|
+
post[:isRecurring] = true
|
196
|
+
post[:isMIT] = true
|
197
|
+
post[:expiryDateUtc] = 2.hours.from_now.utc.iso8601
|
198
|
+
post[:subscription] = {
|
199
|
+
subscriptionId: options['merchant_initiated_data']['subscriptionId'],
|
200
|
+
interval: "Monthly",
|
201
|
+
price: amount,
|
202
|
+
currency: options[:currency]
|
203
|
+
}
|
204
|
+
end
|
205
|
+
|
193
206
|
def add_merchant_data(post, options)
|
194
207
|
post[:orderId] = options[:order_id]
|
195
208
|
post[:mid] = @mid
|
@@ -358,8 +371,8 @@ module ActiveMerchant #:nodoc:
|
|
358
371
|
|
359
372
|
def response_type(status)
|
360
373
|
case status
|
361
|
-
when 'APPROVED', 'SUCCESS'
|
362
|
-
when 'CAPTUREREQUIRED', 'CHALLENGE'
|
374
|
+
when 'APPROVED', 'SUCCESS', 'SUBMITTED' then 0
|
375
|
+
when 'CAPTUREREQUIRED', 'CHALLENGE' then 1
|
363
376
|
when 'FAILED' then 2
|
364
377
|
else 1
|
365
378
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: swiss-crm-activemerchant-v2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Luetke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-08-
|
11
|
+
date: 2025-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|