caboose-cms 0.5.210 → 0.5.211

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NGFkYzFmNDk4NWRjNjlmYTM5OGQ0ZjA3NjJjODdiNGMzYjAwODA3NQ==
4
+ OGM4NTg5NTU1MDNjYjQ2NGMxN2Q0NTQ0YTkwMWJmNTljMjNhOGRiZQ==
5
5
  data.tar.gz: !binary |-
6
- NGQ4OGU0ZGVlMDYxODM2NTFjMTRkYTBiZWU4Y2E4NTIxZjRhYzc4Mw==
6
+ NjgzYzc5NTVmMjc0ZGQzZTZkMzY1OWYzZjE3ZDdkZWRhY2FlNjQ5Yg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MWE1YmRhOWUzODMyNDA3ODNmM2M4OTAzYmE5MzJkM2NmNjllNWQ3OTAwOGY1
10
- YTBjYWI2NDk3YzE3ZDhjMjcxZGM4NmNlYTk1ZmE1OGM0NjA1NjEyMmMzYzhh
11
- YmE0ZTE2NjU5ZDdkMzdlZWRmNDI5NDZmNDVmZmM0Mzc3NzIxODQ=
9
+ MTE0YmRiNTQzYjgwZGRjYmEzMjI5NWQwY2NkOGMzYTdiNDUwMTRmNmNlMGZk
10
+ NDEzYzQzNWM4ZmJkZmUyOTc4MjUwZTI5ZDJiZmNlYjg4MjQ2ZDU4OGYxNmEx
11
+ MDVkYmQ2ZWU0NzI4NmVlMmEzNjU1NmY1MjlkMjg0MDc2OGUzMDc=
12
12
  data.tar.gz: !binary |-
13
- MWRjODBlN2Y3ZjYzYTkxOGQ2ZmMwMTdiYjY4ODg5YzU2MjA4YzIzZjUzYzA1
14
- NzM1YTMwNDc4OGU5OGM5YWUwMzc3ZDc2YWVhZThkNjRhNjc5YTAzZjM4YzYx
15
- ODZmNTc0OTNjNGVjMmEwMzFhODMzMTQ1MDdlMTUzYmNhNWYwMWE=
13
+ NzBkZmY3NTU1YzBjYWZmYzA1NmQ5Y2M3OGExZWVlODdjMmY3MzUyNzZhZWVi
14
+ ZDEwZjVlMjZhMGEyMTBmMDE2N2MyMTZkZjIyNWJkNjM5YmQzNTU1MWRlZjI3
15
+ NTEzOTFlZThmYzhlZDBiMWU4OWMwNmQzZTg5YTdiZmVlMzg3YzU=
@@ -52,6 +52,7 @@ Caboose.Store.Modules.CheckoutPayment = (function() {
52
52
  {
53
53
  $('#message').html("<p class='loading'>Processing payment...</p>");
54
54
  $('form#payment').submit();
55
+ $('#checkout-continue button').hide();
55
56
  }
56
57
  };
57
58
 
@@ -98,5 +99,8 @@ function relay_handler(resp)
98
99
  else if (resp.error)
99
100
  $('#message').html("<p class='note error'>" + resp.error + "</p>");
100
101
  else
102
+ {
101
103
  $('#message').html("<p class='note error'>There was an error processing your payment.</p>");
104
+ $('#checkout-continue button').show();
105
+ }
102
106
  }
@@ -298,13 +298,19 @@ module Caboose
298
298
  def authnet_relay
299
299
  Caboose.log("Authorize.net relay, order #{params[:x_invoice_id]}")
300
300
 
301
- if params[:x_invoice_num].nil?
301
+ if params[:x_invoice_num].nil? || params[:x_invoice_num].strip.length == 0
302
302
  Caboose.log("Error: no x_invoice_id in given parameters.")
303
303
  render :json => { :error => "Invalid x_invoice_id." }
304
304
  return
305
305
  end
306
306
 
307
- order = Caboose::Order.find(params[:x_invoice_num])
307
+ order = Caboose::Order.where(:id => params[:x_invoice_num].to_i).first
308
+ if order.nil?
309
+ Caboose.log("Error: can't find order for x_invoice_num #{params[:x_invoice_num]}.")
310
+ render :json => { :error => "Invalid x_invoice_id." }
311
+ return
312
+ end
313
+
308
314
  ot = Caboose::OrderTransaction.new(
309
315
  :order_id => order.id,
310
316
  :date_processed => DateTime.now.utc,
@@ -1,5 +1,5 @@
1
1
  require 'active_shipping'
2
- #include ActiveMerchant::Shipping
2
+ #include ActiveShipping
3
3
 
4
4
  module Caboose
5
5
  class ShippingCalculator
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.210'
2
+ VERSION = '0.5.211'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.210
4
+ version: 0.5.211
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry