swiss-crm-activemerchant 1.0.13 → 1.0.14

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: a7f92625b7a5f186ccab8e90cd667aeea08e5fc8a8d80ad7024b20f0a8dfa648
4
- data.tar.gz: 3e27b0968134032f402d3875ba037444fd703014675e96f1a259df0b499fe601
3
+ metadata.gz: 44cb245a478bd4babafafac6b137b4881ff2773739bf0940e61cb085380adac3
4
+ data.tar.gz: ad81db1097bdca4d69d31efb3f8391d2b762d83e427b6e758139c1e06b2c80ad
5
5
  SHA512:
6
- metadata.gz: 163d0185b9a65ebfbb0b0a8c024548c11c76cf1bd6dc89c5f39f2a16509db543a737e654e908e1c67e40e0f6aac5af6c65ad815ca7638e7971d76bd8b6e24b4e
7
- data.tar.gz: c8764b16df9bb9f6ab0f27ca2e416fc53b04e0c46a91a72b544c6d205d07c0fb401645c38cd4dbcda790833297c33ba0e19e47595e07d78178d725298308173d
6
+ metadata.gz: d906a4d5c2a697c847e7c913893e419c4c5144533a8929ae0b2eb76161900514be51a43be218ff433778d5016b26ef08e134a7e96bd89d9ab968fbe9cd31f7eb
7
+ data.tar.gz: ff13818e773f890fb742b6198cbbae3e29ddf14642ec3a4b72b4f54b0c810cef9276cb6efb6c04a080d4b40655e9235f768e0b44a05585f76f3ecbb077a271ee
data/README.md CHANGED
@@ -15,7 +15,7 @@ gem install swiss-activemerchant
15
15
  Or, if you're using Bundler, just add the following to your Gemfile:
16
16
 
17
17
  ```ruby
18
- gem 'swiss-activemerchant'
18
+ gem 'swiss-crm-activemerchant'
19
19
  ```
20
20
 
21
21
  ## Usage
@@ -234,13 +234,13 @@ gem build activemerchant.gemspec
234
234
  3. Push to RubyGems: Push the updated gem to RubyGems:
235
235
 
236
236
  ```console
237
- gem push swiss-activemerchant-x.x.x.gem
237
+ gem push swiss-crm-activemerchant-x.x.x.gem
238
238
  ```
239
239
 
240
240
  4. Yank Previous Version: If necessary, yank the previous version to prevent installations:
241
241
 
242
242
  ```console
243
- gem yank swiss-activemerchant -v x.x.x
243
+ gem yank swiss-crm-activemerchant -v x.x.x
244
244
  ```
245
245
 
246
246
  ## API stability policy
@@ -46,6 +46,7 @@ module ActiveMerchant #:nodoc:
46
46
  add_merchant_defined_fields(post, options)
47
47
  add_level3_fields(post, options)
48
48
  add_three_d_secure(post, options)
49
+ add_recurring_details(post, options)
49
50
 
50
51
  commit('sale', post)
51
52
  end
@@ -60,6 +61,7 @@ module ActiveMerchant #:nodoc:
60
61
  add_merchant_defined_fields(post, options)
61
62
  add_level3_fields(post, options)
62
63
  add_three_d_secure(post, options)
64
+ add_recurring_details(post, options)
63
65
  commit('auth', post)
64
66
  end
65
67
 
@@ -157,7 +159,6 @@ module ActiveMerchant #:nodoc:
157
159
  post[:orderid] = options[:order_id]
158
160
  post[:orderdescription] = options[:description]
159
161
  post[:currency] = options[:currency] || currency(money)
160
- post[:billing_method] = 'recurring' if options[:recurring]
161
162
  if (dup_seconds = (options[:dup_seconds] || self.class.duplicate_window))
162
163
  post[:dup_seconds] = dup_seconds
163
164
  end
@@ -283,6 +284,14 @@ module ActiveMerchant #:nodoc:
283
284
  post[:directory_server_id] = three_d_secure[:ds_transaction_id]
284
285
  end
285
286
 
287
+ def add_recurring_details(post, options)
288
+ return unless options[:recurring_reference_initial_transaction]
289
+
290
+ post[:billing_method] = 'recurring'
291
+ txn_id, = split_authorization(options[:nmi_initial_txn_id])
292
+ post[:initial_transaction_id] = txn_id
293
+ end
294
+
286
295
  def cardholder_auth(trans_status)
287
296
  return nil if trans_status.nil?
288
297
 
@@ -1,3 +1,3 @@
1
1
  module ActiveMerchant
2
- VERSION = '1.0.13'
2
+ VERSION = '1.0.14'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swiss-crm-activemerchant
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.13
4
+ version: 1.0.14
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-01-22 00:00:00.000000000 Z
11
+ date: 2025-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport