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: 52a3a0245542e5d05468d5564d9bb9f25c2c8de6e480e312049ee3296a39fa0b
4
- data.tar.gz: 61b9cc3da8c809c990d3e4fe591fe36ec654833a3a1b28a4629946c25b160600
3
+ metadata.gz: 395642de699b76ea08960c76960c856dbc3c493e39c95a3755cb9503517ed980
4
+ data.tar.gz: 83f22a8df4ba195ecb8485fc857af605d6abae4505a5bdff13cd35806f83f38f
5
5
  SHA512:
6
- metadata.gz: 3778575a3d6c5da62bbbbd46b3971da766e9207d05d126dbff9df650656297da9ff84d79b5a2b5288c73e41ac9a9c15fa4070bf8dcbb71c69261000497a6e464
7
- data.tar.gz: 23809570d3c7203e57e31957ef7c6867c65ac81d81a29c3495c29da1435cce3098d75897033b90f2b453b292029fe396d1636e376cc75362054c6634352f082a
6
+ metadata.gz: 86734ccd901d11b2743de57dd7a7440ce4e716eb29528ec5388aeca631549293a1a796e8f4797649afb4f40ff31ffff6ebdd67b0c49f341b493efa701e3f2f74
7
+ data.tar.gz: 831f5049e863030c2e200d7fc03bb7fdf67d71c90ede532b5fa7a67b78667693660fddda1a62d12d54e1f687b3ff5b487bd066b9add0e4fc0fa825bbc9424390
@@ -355,4 +355,3 @@ module ActiveMerchant #:nodoc:
355
355
  end
356
356
  end
357
357
  end
358
-
@@ -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' then 0
362
- when 'CAPTUREREQUIRED', 'CHALLENGE', 'SUBMITTED' then 1
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
@@ -3,7 +3,7 @@ module ActiveMerchant #:nodoc:
3
3
  class MollieGateway < Gateway
4
4
  include Empty
5
5
 
6
- SOFT_DECLINE_CODES = %w[
6
+ SOFT_DECLINE_REASONS = %w[
7
7
  insufficient_funds
8
8
  card_expired
9
9
  card_declined
@@ -1,3 +1,3 @@
1
1
  module ActiveMerchant
2
- VERSION = '1.0.27'
2
+ VERSION = '1.0.28'
3
3
  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.27
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-04 00:00:00.000000000 Z
11
+ date: 2025-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport