effective_orders 6.8.2 → 6.9.1

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: 3564d400d398b71b8799a81b8668ba35aee5e69e222d3849ff4903e94338de67
4
- data.tar.gz: 9905c4d6d0364f2b0b30e5752de9809fb2fd765124ac61d9f2f79e7c753e6bd6
3
+ metadata.gz: 2cbb964d1a84fdccf1075c56bb629b69cd3d2464cea2b20a1a7a303752dc7e92
4
+ data.tar.gz: 3d5ebe58a0f19189e4b80848f2fc4414709fa493e90b511d4797eb99c98d3def
5
5
  SHA512:
6
- metadata.gz: 6d7eba677128528f63a37143ada91e7c501aeb52a0a90715acf6615543e420309bfcf02df64e68cecdefe9847db022bdf2750cac8d4dcc2e046e61e78c6ee834
7
- data.tar.gz: 3fa0dad90dc8ea85190b1f234f5ba717ba14520e1956468cfafa94e182ae253213e9dc181a15d7124733b18ea642d5af0c80893ea6fdc097c865d9524c2ce1e5
6
+ metadata.gz: 044ece8abf7f3b72cfad1fdcb7edcdfb3b009cfa3b752d04bde791b39a9af23ccb1b2da9625791bef8a5e68eeca5a1ebe9bada59a8c1f0574a570dd184116bdc
7
+ data.tar.gz: 5aa59c53d18635278def1c75e9bc9db730127c12b033adda759cd90bede52980ac3cc07d6a3556c2dfd0158ea30b0cd258cfd6ef34b6c7f0f152dbddd185c87d
@@ -15,15 +15,15 @@ this.MonerisCheckoutForm ||= class MonerisCheckoutForm
15
15
  @form.addClass('initialized')
16
16
 
17
17
  mount: ->
18
+ @moneris.setMode(@data.environment)
18
19
  @moneris.setCheckoutDiv('monerisCheckout')
19
20
 
20
21
  @moneris.setCallback('page_loaded', @pageLoaded)
21
22
  @moneris.setCallback('cancel_transaction', @cancelTransaction)
22
- @moneris.setCallback('error_event', @errorEvent)
23
23
  @moneris.setCallback('payment_receipt', @paymentReceipt)
24
24
  @moneris.setCallback('payment_complete', @paymentComplete)
25
+ @moneris.setCallback('error_event', @errorEvent) # This one might be custom, no longer referenced in docs.
25
26
 
26
- @moneris.setMode(@data.environment)
27
27
  @moneris.startCheckout(@data.ticket)
28
28
 
29
29
  success: (payload) ->
@@ -51,7 +51,11 @@ this.MonerisCheckoutForm ||= class MonerisCheckoutForm
51
51
  when '902'
52
52
  @error('3-D secure failed on response')
53
53
  when '2001'
54
- @error('Invalid ticket/ticket re-use')
54
+ @error('Invalid ticket')
55
+ when '2002'
56
+ @error('Invalid ticket re-use')
57
+ when '2003'
58
+ @error('Invalid ticket expired')
55
59
  else
56
60
  @error('Unknown payment gateway preload status')
57
61
 
@@ -16,7 +16,7 @@ module EffectiveMonerisCheckoutHelper
16
16
  # Optional
17
17
  order_no: order.transaction_id, # Has to be unique. This is order number, billing name and Time.now
18
18
  cust_id: order.user_id,
19
- language: 'en',
19
+ language: :en,
20
20
 
21
21
  contact_details: {
22
22
  first_name: moneris_checkout_scrub(order.billing_first_name),
@@ -97,7 +97,11 @@ module Effective
97
97
  timestamps
98
98
  end
99
99
 
100
- serialize :payment, Hash
100
+ if EffectiveResources.serialize_with_coder?
101
+ serialize :payment, type: Hash, coder: YAML
102
+ else
103
+ serialize :payment, Hash
104
+ end
101
105
 
102
106
  scope :deep, -> { includes(:addresses, :user, :purchased_by, :organization, order_items: :purchasable) }
103
107
  scope :sorted, -> { order(:id) }
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '6.8.2'.freeze
2
+ VERSION = '6.9.1'.freeze
3
3
  end
@@ -278,16 +278,16 @@ module EffectiveOrders
278
278
 
279
279
  def self.moneris_checkout_script_url
280
280
  case EffectiveOrders.moneris_checkout.fetch(:environment)
281
- when 'prod' then 'https://gateway.moneris.com/chkt/js/chkt_v1.00.js'
282
- when 'qa' then 'https://gatewayt.moneris.com/chkt/js/chkt_v1.00.js'
281
+ when 'prod' then 'https://gateway.moneris.com/chktv2/js/chkt_v2.00.js'
282
+ when 'qa' then 'https://gatewayt.moneris.com/chktv2/js/chkt_v2.00.js'
283
283
  else raise('unexpected EffectiveOrders.moneris_checkout :environment key. Please check your config/initializers/effective_orders.rb file')
284
284
  end
285
285
  end
286
286
 
287
287
  def self.moneris_request_url
288
288
  case EffectiveOrders.moneris_checkout.fetch(:environment)
289
- when 'prod' then 'https://gateway.moneris.com/chkt/request/request.php'
290
- when 'qa' then 'https://gatewayt.moneris.com/chkt/request/request.php'
289
+ when 'prod' then 'https://gateway.moneris.com/chktv2/request/request.php'
290
+ when 'qa' then 'https://gatewayt.moneris.com/chktv2/request/request.php'
291
291
  else raise('unexpected EffectiveOrders.moneris_checkout :environment key. Please check your config/initializers/effective_orders.rb file')
292
292
  end
293
293
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_orders
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.8.2
4
+ version: 6.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-19 00:00:00.000000000 Z
11
+ date: 2023-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails