caboose-cms 0.7.74 → 0.7.75

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
  SHA1:
3
- metadata.gz: 048af239863225eb750f4fb8ead2fb16bc7114c1
4
- data.tar.gz: b615e192cab2bb1b28295dba157a73e8218dca1c
3
+ metadata.gz: 7ae00466f87ad1c9bce32f257456d4c929f1ccca
4
+ data.tar.gz: 91dc91a638ee41575379f81af8587776281f6d60
5
5
  SHA512:
6
- metadata.gz: bec71eda8e2e03c8edadac548a62dc6693fcb3550b92adc030e9d492967f90e2465250e0a4cc2c139f2c0c2fd84454e1271a83e0f0d29c90c5592cb5c3e1bdd0
7
- data.tar.gz: 622a90bda1f1ade01683e69a005b35f4ed674ad8573ea4b8f079fe8ed4bc6a728a4ea08117ca945d2ab4f1a2437f2240c8ddc18f5850cb3e28c15f0467c631db
6
+ metadata.gz: 7c6c6a3ea331d1745bb6ca6dc3909eb8bf99a156301f2ee86ff89072ba6b4a6b44667c6d79b3ad45af17d829ef8e0af0e798843349b827e0127e7bf3a0772c65
7
+ data.tar.gz: 00a89abd1f989d2bcdf6b1110577ce3857bba53d06d19344cd81a617abd07d7ddf5073590b84f6adfa0e7fba5db33c63647de1312046c2543d630d462d2c098f
@@ -94,13 +94,13 @@ module Caboose
94
94
 
95
95
  sc = @site.store_config
96
96
  @sim_transaction = AuthorizeNet::SIM::Transaction.new(
97
- sc.pp_username,
98
- sc.pp_password,
97
+ sc.authnet_api_login_id,
98
+ sc.authnet_api_transaction_key,
99
99
  @order.total,
100
100
  #:relay_url => "#{request.protocol}#{request.host_with_port}/checkout/authnet-relay/#{@order.id}",
101
101
  :relay_response => 'TRUE',
102
102
  #:relay_url => "#{request.protocol}#{request.host_with_port}/checkout/authnet-relay",
103
- :relay_url => "#{sc.pp_relay_domain}/checkout/authnet-relay",
103
+ :relay_url => "#{sc.authnet_relay_domain}/checkout/authnet-relay",
104
104
  :transaction_type => 'AUTH_ONLY',
105
105
  :test => sc.pp_testing
106
106
  )
@@ -55,11 +55,11 @@ module Caboose
55
55
  when 'authorize.net'
56
56
 
57
57
  @sim_transaction = AuthorizeNet::SIM::Transaction.new(
58
- sc.pp_username,
59
- sc.pp_password,
58
+ sc.authnet_api_login_id,
59
+ sc.authnet_api_transaction_key,
60
60
  @order.total,
61
61
  :relay_response => 'TRUE',
62
- :relay_url => "#{sc.pp_relay_domain}/my-account/orders/authnet-relay",
62
+ :relay_url => "#{sc.authnet_relay_domain}/my-account/orders/authnet-relay",
63
63
  :transaction_type => 'AUTH_ONLY',
64
64
  :test => sc.pp_testing
65
65
  )
@@ -57,53 +57,53 @@ module Caboose
57
57
  save = true
58
58
  params.each do |name,value|
59
59
  case name
60
- when 'site_id' then sc.site_id = value
61
- when 'pp_name' then sc.pp_name = value
62
- when 'pp_username' then sc.pp_username = value
63
- when 'pp_password' then sc.pp_password = value
64
- when 'pp_testing' then sc.pp_testing = value
65
- when 'pp_relay_domain' then sc.pp_relay_domain = value
66
- when 'stripe_secret_key' then sc.stripe_secret_key = value
67
- when 'stripe_publishable_key' then sc.stripe_publishable_key = value
68
- when 'ups_username' then sc.ups_username = value
69
- when 'ups_password' then sc.ups_password = value
70
- when 'ups_key' then sc.ups_key = value
71
- when 'ups_origin_account' then sc.ups_origin_account = value
72
- when 'usps_username' then sc.usps_username = value
73
- when 'usps_secret_key' then sc.usps_secret_key = value
74
- when 'usps_publishable_key' then sc.usps_publishable_key = value
75
- when 'fedex_username' then sc.fedex_username = value
76
- when 'fedex_password' then sc.fedex_password = value
77
- when 'fedex_key' then sc.fedex_key = value
78
- when 'fedex_account' then sc.fedex_account = value
79
- when 'ups_min' then sc.ups_min = value
80
- when 'ups_max' then sc.ups_max = value
81
- when 'usps_min' then sc.usps_min = value
82
- when 'usps_max' then sc.usps_max = value
83
- when 'fedex_min' then sc.fedex_min = value
84
- when 'fedex_max' then sc.fedex_max = value
85
- when 'taxcloud_api_id' then sc.taxcloud_api_id = value
86
- when 'taxcloud_api_key' then sc.taxcloud_api_key = value
87
- when 'origin_address1' then sc.origin_address1 = value
88
- when 'origin_address2' then sc.origin_address2 = value
89
- when 'origin_state' then sc.origin_state = value
90
- when 'origin_city' then sc.origin_city = value
91
- when 'origin_zip' then sc.origin_zip = value
92
- when 'origin_country' then sc.origin_country = value
93
- when 'fulfillment_email' then sc.fulfillment_email = value
94
- when 'shipping_email' then sc.shipping_email = value
95
- when 'handling_percentage' then sc.handling_percentage = value
96
- when 'auto_calculate_packages' then sc.auto_calculate_packages = value
97
- when 'auto_calculate_shipping' then sc.auto_calculate_shipping = value
98
- when 'auto_calculate_tax' then sc.auto_calculate_tax = value
99
- when 'custom_packages_function' then sc.custom_packages_function = value
100
- when 'custom_shipping_function' then sc.custom_shipping_function = value
101
- when 'custom_tax_function' then sc.custom_tax_function = value
102
- when 'length_unit' then sc.length_unit = value
103
- when 'weight_unit' then sc.weight_unit = value
104
- when 'download_instructions' then sc.download_instructions = value
105
- when 'download_url_expires_in' then sc.download_url_expires_in = value
106
- when 'starting_order_number' then sc.starting_order_number = value
60
+ when 'site_id' then sc.site_id = value
61
+ when 'pp_name' then sc.pp_name = value
62
+ when 'pp_testing' then sc.pp_testing = value
63
+ when 'authnet_api_login_id' then sc.authnet_api_login_id = value
64
+ when 'authnet_api_transaction_key' then sc.authnet_api_transaction_key = value
65
+ when 'authnet_relay_domain' then sc.authnet_relay_domain = value
66
+ when 'stripe_secret_key' then sc.stripe_secret_key = value
67
+ when 'stripe_publishable_key' then sc.stripe_publishable_key = value
68
+ when 'ups_username' then sc.ups_username = value
69
+ when 'ups_password' then sc.ups_password = value
70
+ when 'ups_key' then sc.ups_key = value
71
+ when 'ups_origin_account' then sc.ups_origin_account = value
72
+ when 'usps_username' then sc.usps_username = value
73
+ when 'usps_secret_key' then sc.usps_secret_key = value
74
+ when 'usps_publishable_key' then sc.usps_publishable_key = value
75
+ when 'fedex_username' then sc.fedex_username = value
76
+ when 'fedex_password' then sc.fedex_password = value
77
+ when 'fedex_key' then sc.fedex_key = value
78
+ when 'fedex_account' then sc.fedex_account = value
79
+ when 'ups_min' then sc.ups_min = value
80
+ when 'ups_max' then sc.ups_max = value
81
+ when 'usps_min' then sc.usps_min = value
82
+ when 'usps_max' then sc.usps_max = value
83
+ when 'fedex_min' then sc.fedex_min = value
84
+ when 'fedex_max' then sc.fedex_max = value
85
+ when 'taxcloud_api_id' then sc.taxcloud_api_id = value
86
+ when 'taxcloud_api_key' then sc.taxcloud_api_key = value
87
+ when 'origin_address1' then sc.origin_address1 = value
88
+ when 'origin_address2' then sc.origin_address2 = value
89
+ when 'origin_state' then sc.origin_state = value
90
+ when 'origin_city' then sc.origin_city = value
91
+ when 'origin_zip' then sc.origin_zip = value
92
+ when 'origin_country' then sc.origin_country = value
93
+ when 'fulfillment_email' then sc.fulfillment_email = value
94
+ when 'shipping_email' then sc.shipping_email = value
95
+ when 'handling_percentage' then sc.handling_percentage = value
96
+ when 'auto_calculate_packages' then sc.auto_calculate_packages = value
97
+ when 'auto_calculate_shipping' then sc.auto_calculate_shipping = value
98
+ when 'auto_calculate_tax' then sc.auto_calculate_tax = value
99
+ when 'custom_packages_function' then sc.custom_packages_function = value
100
+ when 'custom_shipping_function' then sc.custom_shipping_function = value
101
+ when 'custom_tax_function' then sc.custom_tax_function = value
102
+ when 'length_unit' then sc.length_unit = value
103
+ when 'weight_unit' then sc.weight_unit = value
104
+ when 'download_instructions' then sc.download_instructions = value
105
+ when 'download_url_expires_in' then sc.download_url_expires_in = value
106
+ when 'starting_order_number' then sc.starting_order_number = value
107
107
  end
108
108
  end
109
109
 
@@ -22,8 +22,8 @@ module Caboose
22
22
  params = {
23
23
  "createCustomerProfileRequest" => {
24
24
  "merchantAuthentication" => {
25
- "name" => '9qR2qa4ZWn', #store_config.pp_username,
26
- "transactionKey" => '386TLme2j8yp4BQy', #store_config.pp_password
25
+ "name" => '9qR2qa4ZWn' , # store_config.authnet_api_login_id,
26
+ "transactionKey" => '386TLme2j8yp4BQy' , # store_config.authnet_api_transaction_key
27
27
  },
28
28
  "profile" => {
29
29
  "merchantCustomerId" => user.id,
@@ -60,8 +60,8 @@ module Caboose
60
60
  params = {
61
61
  "getHostedProfilePageRequest" => {
62
62
  "merchantAuthentication" => {
63
- "name" => '9qR2qa4ZWn', #store_config.pp_username,
64
- "transactionKey" => '386TLme2j8yp4BQy', #store_config.pp_password
63
+ "name" => '9qR2qa4ZWn' , # store_config.authnet_api_login_id
64
+ "transactionKey" => '386TLme2j8yp4BQy' , # store_config.authnet_api_transaction_key
65
65
  },
66
66
  "customerProfileId" => user.customer_profile_id,
67
67
  "hostedProfileSettings" => {
@@ -142,7 +142,7 @@ module Caboose
142
142
  sc = site.store_config
143
143
 
144
144
  # Get all the batches in the date period
145
- rt = AuthorizeNet::Reporting::Transaction.new(sc.pp_username, sc.pp_password)
145
+ rt = AuthorizeNet::Reporting::Transaction.new(sc.authnet_api_login_id, sc.authnet_api_transaction_key)
146
146
  resp = rt.get_settled_batch_list(d1, d2, true)
147
147
  return false if !resp.success?
148
148
  batch_ids = []
@@ -153,7 +153,7 @@ module Caboose
153
153
 
154
154
  # Settled transactions
155
155
  batch_ids.each do |batch_id|
156
- rt = AuthorizeNet::Reporting::Transaction.new(sc.pp_username, sc.pp_password)
156
+ rt = AuthorizeNet::Reporting::Transaction.new(sc.authnet_api_login_id, sc.authnet_api_transaction_key)
157
157
  resp = rt.get_transaction_list(batch_id)
158
158
  next if !resp.success?
159
159
 
@@ -166,7 +166,7 @@ module Caboose
166
166
  end
167
167
 
168
168
  # Unsettled transactions
169
- rt = AuthorizeNet::Reporting::Transaction.new(sc.pp_username, sc.pp_password)
169
+ rt = AuthorizeNet::Reporting::Transaction.new(sc.authnet_api_login_id, sc.authnet_api_transaction_key)
170
170
  resp = rt.get_unsettled_transaction_list
171
171
  if resp.success?
172
172
  transactions = resp.transactions
@@ -277,7 +277,7 @@ module Caboose
277
277
 
278
278
  case sc.pp_name
279
279
  when 'authorize.net'
280
- transaction = AuthorizeNet::AIM::Transaction.new(sc.pp_username, sc.pp_password)
280
+ transaction = AuthorizeNet::AIM::Transaction.new(sc.authnet_api_login_id, sc.authnet_api_transaction_key)
281
281
  response = transaction.prior_auth_capture(t.transaction_id, self.total)
282
282
 
283
283
  ot.success = response.response_code && response.response_code == '1'
@@ -330,8 +330,8 @@ module Caboose
330
330
  case sc.pp_name
331
331
  when 'authorize.net'
332
332
  response = AuthorizeNet::SIM::Transaction.new(
333
- sc.pp_username,
334
- sc.pp_password,
333
+ sc.authnet_api_login_id,
334
+ sc.authnet_api_transaction_key,
335
335
  self.total,
336
336
  :transaction_type => OrderTransaction::TYPE_VOID,
337
337
  :transaction_id => t.transaction_id,
@@ -46,7 +46,7 @@ module Caboose
46
46
  when 'authorize.net'
47
47
 
48
48
  if ot
49
- t = AuthorizeNet::Reporting::Transaction.new(sc.pp_username, sc.pp_password)
49
+ t = AuthorizeNet::Reporting::Transaction.new(sc.authnet_api_login_id, sc.authnet_api_transaction_key)
50
50
  resp = t.get_transaction_details(ot.transaction_id)
51
51
  t2 = resp.transaction
52
52
  if t2
@@ -143,7 +143,9 @@ module Caboose
143
143
  if li.variant.product.option2 && li.variant.option2 then options += li.variant.product.option2 + ": " + li.variant.option2 + "\n" end
144
144
  if li.variant.product.option3 && li.variant.option3 then options += li.variant.product.option3 + ": " + li.variant.option3 + "\n" end
145
145
  if li.variant.product.product_images.count > 0 && li.variant.product.product_images.first.url(:tiny)
146
- image = open("#{li.variant.product.product_images.first.url(:tiny)}")
146
+ url = li.variant.product.product_images.first.url(:tiny)
147
+ url = "http:#{url}" if url.starts_with?('//')
148
+ image = open(url)
147
149
  else
148
150
  image = ""
149
151
  end
@@ -176,8 +178,10 @@ module Caboose
176
178
  if li.variant.product.option1 && li.variant.option1 then options += li.variant.product.option1 + ": " + li.variant.option1 + "\n" end
177
179
  if li.variant.product.option2 && li.variant.option2 then options += li.variant.product.option2 + ": " + li.variant.option2 + "\n" end
178
180
  if li.variant.product.option3 && li.variant.option3 then options += li.variant.product.option3 + ": " + li.variant.option3 + "\n" end
179
- if li.variant.product.product_images.count > 0 && li.variant.product.product_images.first.url(:tiny)
180
- image = open("#{li.variant.product.product_images.first.url(:tiny)}")
181
+ if li.variant.product.product_images.count > 0 && li.variant.product.product_images.first.url(:tiny)
182
+ url = li.variant.product.product_images.first.url(:tiny)
183
+ url = "http:#{url}" if url.starts_with?('//')
184
+ image = open(url)
181
185
  else
182
186
  image = ""
183
187
  end
@@ -19,7 +19,7 @@ class Caboose::PaymentProcessors::Authorizenet < Caboose::PaymentProcessors::Bas
19
19
  def self.void(order)
20
20
  sc = order.site.store_config
21
21
  response = AuthorizeNet::SIM::Transaction.new(
22
- sc.pp_username, sc.pp_password, order.total,
22
+ sc.authnet_api_login_id, sc.authnet_api_transaction_key, order.total,
23
23
  :transaction_type => 'VOID',
24
24
  :transaction_id => order.transaction_id
25
25
  )
@@ -29,7 +29,7 @@ class Caboose::PaymentProcessors::Authorizenet < Caboose::PaymentProcessors::Bas
29
29
  def self.capture(order)
30
30
  sc = order.site.store_config
31
31
  response = AuthorizeNet::SIM::Transaction.new(
32
- sc.pp_username, sc.pp_password, order.total,
32
+ sc.authnet_api_login_id, sc.authnet_api_transaction_key, order.total,
33
33
  :transaction_type => 'CAPTURE_ONLY',
34
34
  :transaction_id => order.transaction_id
35
35
  )
@@ -39,7 +39,7 @@ class Caboose::PaymentProcessors::Authorizenet < Caboose::PaymentProcessors::Bas
39
39
  def self.refund(order)
40
40
  sc = order.site.store_config
41
41
  response = AuthorizeNet::SIM::Transaction.new(
42
- sc.pp_username, sc.pp_password, order.total,
42
+ sc.authnet_api_login_id, sc.authnet_api_transaction_key, order.total,
43
43
  :transaction_type => 'CREDIT',
44
44
  :transaction_id => order.transaction_id
45
45
  )
@@ -43,7 +43,7 @@ module Caboose
43
43
  return if ot.nil?
44
44
  case sc.pp_name
45
45
  when 'authorize.net'
46
- t = AuthorizeNet::Reporting::Transaction.new(sc.pp_username, sc.pp_password)
46
+ t = AuthorizeNet::Reporting::Transaction.new(sc.authnet_api_login_id, sc.authnet_api_transaction_key)
47
47
  resp = t.get_transaction_details(ot.transaction_id)
48
48
  t2 = resp.transaction
49
49
  if t2
@@ -729,53 +729,56 @@ class Caboose::Schema < Caboose::Utilities::Schema
729
729
  [ :max_height , :decimal ]
730
730
  ],
731
731
  Caboose::StoreConfig => [
732
- [ :site_id , :integer ],
733
- [ :pp_name , :string ],
734
- [ :pp_username , :string ],
735
- [ :pp_password , :string ],
736
- [ :pp_testing , :boolean , { :default => true }],
737
- [ :pp_relay_domain , :string ],
738
- [ :stripe_secret_key , :string ],
739
- [ :stripe_publishable_key , :string ],
740
- [ :ups_username , :string ],
741
- [ :ups_password , :string ],
742
- [ :ups_key , :string ],
743
- [ :ups_origin_account , :string ],
744
- [ :usps_username , :string ],
745
- [ :usps_secret_key , :string ],
746
- [ :usps_publishable_key , :string ],
747
- [ :fedex_username , :string ],
748
- [ :fedex_password , :string ],
749
- [ :fedex_key , :string ],
750
- [ :fedex_account , :string ],
751
- [ :ups_min , :decimal , { :precision => 8, :scale => 2 }],
752
- [ :ups_max , :decimal , { :precision => 8, :scale => 2 }],
753
- [ :usps_min , :decimal , { :precision => 8, :scale => 2 }],
754
- [ :usps_max , :decimal , { :precision => 8, :scale => 2 }],
755
- [ :fedex_min , :decimal , { :precision => 8, :scale => 2 }],
756
- [ :fedex_max , :decimal , { :precision => 8, :scale => 2 }],
757
- [ :taxcloud_api_id , :string ],
758
- [ :taxcloud_api_key , :string ],
759
- [ :origin_address1 , :string ],
760
- [ :origin_address2 , :string ],
761
- [ :origin_state , :string ],
762
- [ :origin_city , :string ],
763
- [ :origin_zip , :string ],
764
- [ :origin_country , :string ],
765
- [ :fulfillment_email , :string ],
766
- [ :shipping_email , :string ],
767
- [ :handling_percentage , :string ],
768
- [ :auto_calculate_packages , :boolean , { :default => true }],
769
- [ :auto_calculate_shipping , :boolean , { :default => true }],
770
- [ :auto_calculate_tax , :boolean , { :default => true }],
771
- [ :custom_packages_function , :text ],
772
- [ :custom_shipping_function , :text ],
773
- [ :custom_tax_function , :text ],
774
- [ :download_instructions , :text ],
775
- [ :length_unit , :string , { :default => 'in' }],
776
- [ :weight_unit , :string , { :default => 'oz' }],
777
- [ :download_url_expires_in , :string , { :default => 5 }],
778
- [ :starting_order_number , :integer , { :default => 1000 }]
732
+ [ :site_id , :integer ],
733
+ [ :pp_name , :string ],
734
+ [ :pp_testing , :boolean , { :default => true }],
735
+ #[ :pp_username , :string ],
736
+ #[ :pp_password , :string ],
737
+ #[ :pp_relay_domain , :string ],
738
+ [ :authnet_api_login_id , :string ], # pp_username
739
+ [ :authnet_api_transaction_key , :string ], # pp_password
740
+ [ :authnet_relay_domain , :string ], # pp_relay_domain
741
+ [ :stripe_secret_key , :string ],
742
+ [ :stripe_publishable_key , :string ],
743
+ [ :ups_username , :string ],
744
+ [ :ups_password , :string ],
745
+ [ :ups_key , :string ],
746
+ [ :ups_origin_account , :string ],
747
+ [ :usps_username , :string ],
748
+ [ :usps_secret_key , :string ],
749
+ [ :usps_publishable_key , :string ],
750
+ [ :fedex_username , :string ],
751
+ [ :fedex_password , :string ],
752
+ [ :fedex_key , :string ],
753
+ [ :fedex_account , :string ],
754
+ [ :ups_min , :decimal , { :precision => 8, :scale => 2 }],
755
+ [ :ups_max , :decimal , { :precision => 8, :scale => 2 }],
756
+ [ :usps_min , :decimal , { :precision => 8, :scale => 2 }],
757
+ [ :usps_max , :decimal , { :precision => 8, :scale => 2 }],
758
+ [ :fedex_min , :decimal , { :precision => 8, :scale => 2 }],
759
+ [ :fedex_max , :decimal , { :precision => 8, :scale => 2 }],
760
+ [ :taxcloud_api_id , :string ],
761
+ [ :taxcloud_api_key , :string ],
762
+ [ :origin_address1 , :string ],
763
+ [ :origin_address2 , :string ],
764
+ [ :origin_state , :string ],
765
+ [ :origin_city , :string ],
766
+ [ :origin_zip , :string ],
767
+ [ :origin_country , :string ],
768
+ [ :fulfillment_email , :string ],
769
+ [ :shipping_email , :string ],
770
+ [ :handling_percentage , :string ],
771
+ [ :auto_calculate_packages , :boolean , { :default => true }],
772
+ [ :auto_calculate_shipping , :boolean , { :default => true }],
773
+ [ :auto_calculate_tax , :boolean , { :default => true }],
774
+ [ :custom_packages_function , :text ],
775
+ [ :custom_shipping_function , :text ],
776
+ [ :custom_tax_function , :text ],
777
+ [ :download_instructions , :text ],
778
+ [ :length_unit , :string , { :default => 'in' }],
779
+ [ :weight_unit , :string , { :default => 'oz' }],
780
+ [ :download_url_expires_in , :string , { :default => 5 }],
781
+ [ :starting_order_number , :integer , { :default => 1000 }]
779
782
  ],
780
783
  Caboose::User => [
781
784
  [ :site_id , :integer ],
@@ -5,11 +5,11 @@ module Caboose
5
5
  belongs_to :site
6
6
  attr_accessible :id,
7
7
  :site_id,
8
- :pp_name,
9
- :pp_username,
10
- :pp_password,
8
+ :pp_name,
11
9
  :pp_testing,
12
- :pp_relay_url,
10
+ :authnet_api_login_id, # pp_username
11
+ :authnet_api_transaction_key, # pp_password
12
+ :authnet_relay_url, # pp_relay_url
13
13
  :stripe_secret_key,
14
14
  :stripe_publishable_key,
15
15
  :ups_username,
@@ -8,7 +8,7 @@ store_config = @site.store_config
8
8
  <form id="payment" target="relay" action="https://secure.authorize.net/gateway/transact.dll" method="post">
9
9
  <%= sim_fields(@sim_transaction) %>
10
10
  <input type="hidden" id="x_invoice_num" name="x_invoice_num" value="<%= @order.id %>" />
11
- <input type="hidden" id="x_description" name="x_after_relay" value="<%= raw store_config.pp_relay_domain %>/checkout/authnet-response/<%= @order.id %>" />
11
+ <input type="hidden" id="x_description" name="x_after_relay" value="<%= raw store_config.authnet_relay_domain %>/checkout/authnet-response/<%= @order.id %>" />
12
12
  <input type="hidden" id="x_first_name" name="x_first_name" value="<%= raw @order.billing_address.first_name %>" />
13
13
  <input type="hidden" id="x_last_name" name="x_last_name" value="<%= raw @order.billing_address.last_name %>" />
14
14
  <input type="hidden" id="x_address" name="x_address" value="<%= raw @order.billing_address.address1 %>" />
@@ -16,7 +16,7 @@ valid_address = ba &&
16
16
  <form id="payment" target="relay" action="https://secure.authorize.net/gateway/transact.dll" method="post">
17
17
  <%= sim_fields(@sim_transaction) %>
18
18
  <input type="hidden" id="x_invoice_num" name="x_invoice_num" value="<%= @order.id %>" />
19
- <input type="hidden" id="x_description" name="x_after_relay" value="<%= raw store_config.pp_relay_domain %>/my-account/orders/<%= @order.id %>/authnet-response" />
19
+ <input type="hidden" id="x_description" name="x_after_relay" value="<%= raw store_config.authnet_relay_domain %>/my-account/orders/<%= @order.id %>/authnet-response" />
20
20
  <input type="hidden" id="x_first_name" name="x_first_name" value="<%= raw @order.billing_address.first_name %>" />
21
21
  <input type="hidden" id="x_last_name" name="x_last_name" value="<%= raw @order.billing_address.last_name %>" />
22
22
  <input type="hidden" id="x_address" name="x_address" value="<%= raw @order.billing_address.address1 %>" />
@@ -51,7 +51,7 @@
51
51
  <td>
52
52
  <% if v.downloadable %>
53
53
  <p>This item is downloadable.</p>
54
- <p><a href='<%= @order.site.store_config.pp_relay_domain %>/my-account/orders/<%= @order.id %>/line-items/<%= li.id %>/download' target="_blank">Download</a></li>
54
+ <p><a href='<%= @order.site.store_config.authnet_relay_domain %>/my-account/orders/<%= @order.id %>/line-items/<%= li.id %>/download' target="_blank">Download</a></li>
55
55
  <% else %>
56
56
  Not assigned to a package
57
57
  <% end %>
@@ -3,7 +3,7 @@
3
3
  <!-- <h1>Thank you for your order!</h1> -->
4
4
  <h1>New Order Received</h1>
5
5
 
6
- <h4><a href="<%= @order.site.store_config.pp_relay_domain %>/admin/orders/<%= @order.id %>" target="_blank" title="View Order">View Order</a></h4>
6
+ <h4><a href="<%= @order.site.store_config.authnet_relay_domain %>/admin/orders/<%= @order.id %>" target="_blank" title="View Order">View Order</a></h4>
7
7
 
8
8
  <h2>Order Details</h2>
9
9
 
@@ -54,7 +54,7 @@
54
54
  <td>
55
55
  <% if v.downloadable %>
56
56
  <p>This item is downloadable.</p>
57
- <p><a href='<%= @order.site.store_config.pp_relay_domain %>/my-account/orders/<%= @order.id %>/line-items/<%= li.id %>/download' target="_blank">Download</a></li>
57
+ <p><a href='<%= @order.site.store_config.authnet_relay_domain %>/my-account/orders/<%= @order.id %>/line-items/<%= li.id %>/download' target="_blank">Download</a></li>
58
58
  <% else %>
59
59
  Not assigned to a package
60
60
  <% end %>
@@ -4,11 +4,17 @@ sc = @store_config
4
4
  <%= render :partial => 'caboose/store/admin_header' %>
5
5
 
6
6
  <p><div id='storeconfig_<%= sc.id %>_pp_name' ></div></p>
7
- <p><div id='storeconfig_<%= sc.id %>_pp_username' ></div></p>
8
- <p><div id='storeconfig_<%= sc.id %>_pp_password' ></div></p>
9
- <p><div id='storeconfig_<%= sc.id %>_pp_relay_domain' ></div></p>
10
7
  <p><div id='storeconfig_<%= sc.id %>_pp_testing' ></div></p>
11
8
 
9
+ <h2>Authorize.net</h2>
10
+ <p><div id='storeconfig_<%= sc.id %>_authnet_api_login_id' ></div></p>
11
+ <p><div id='storeconfig_<%= sc.id %>_authnet_api_transaction_key' ></div></p>
12
+ <p><div id='storeconfig_<%= sc.id %>_authnet_relay_domain' ></div></p>
13
+
14
+ <h2>Stripe</h2>
15
+ <p><div id='storeconfig_<%= sc.id %>_stripe_secret_key' ></div></p>
16
+ <p><div id='storeconfig_<%= sc.id %>_stripe_publishable_key' ></div></p>
17
+
12
18
  <%= render :partial => 'caboose/store/admin_footer' %>
13
19
 
14
20
  <% content_for :caboose_js do %>
@@ -22,11 +28,13 @@ $(document).ready(function() {
22
28
  update_url: '/admin/store',
23
29
  authenticity_token: '<%= form_authenticity_token %>',
24
30
  attributes: [
25
- { name: 'pp_name' , nice_name: 'Type' , type: 'select' , value: <%= raw Caboose.json(sc.pp_name ) %>, width: 400 , options_url: '/admin/store/payment-processor-options' },
26
- { name: 'pp_username' , nice_name: 'Username' , type: 'text' , value: <%= raw Caboose.json(sc.pp_username ) %>, width: 400 },
27
- { name: 'pp_password' , nice_name: 'Password' , type: 'text' , value: <%= raw Caboose.json(sc.pp_password ) %>, width: 400 },
28
- { name: 'pp_relay_domain' , nice_name: 'Relay Domain' , type: 'text' , value: <%= raw Caboose.json(sc.pp_relay_domain ) %>, width: 400 },
29
- { name: 'pp_testing' , nice_name: 'Test Mode' , type: 'checkbox' , value: <%= raw Caboose.json(sc.pp_testing ? 1 : 0 ) %>, width: 400 }
31
+ { name: 'pp_name' , nice_name: 'Type' , type: 'select' , value: <%= raw Caboose.json(sc.pp_name ) %>, width: 400 , options_url: '/admin/store/payment-processor-options' },
32
+ { name: 'pp_testing' , nice_name: 'Test Mode' , type: 'checkbox' , value: <%= raw Caboose.json(sc.pp_testing ? 1 : 0 ) %>, width: 400 },
33
+ { name: 'authnet_api_login_id' , nice_name: 'API Login ID' , type: 'text' , value: <%= raw Caboose.json(sc.authnet_api_login_id ) %>, width: 400 },
34
+ { name: 'authnet_api_transaction_key' , nice_name: 'API Transaction Key' , type: 'text' , value: <%= raw Caboose.json(sc.authnet_api_transaction_key ) %>, width: 400 },
35
+ { name: 'authnet_relay_domain' , nice_name: 'Relay Domain' , type: 'text' , value: <%= raw Caboose.json(sc.authnet_relay_domain ) %>, width: 400 },
36
+ { name: 'stripe_secret_key' , nice_name: 'Secret Key' , type: 'text' , value: <%= raw Caboose.json(sc.stripe_secret_key ) %>, width: 400 },
37
+ { name: 'stripe_publishable_key' , nice_name: 'Publishable Key' , type: 'text' , value: <%= raw Caboose.json(sc.stripe_publishable_key ) %>, width: 400 }
30
38
  ]
31
39
  });
32
40
 
@@ -81,7 +81,7 @@
81
81
  str = b.render(b, options) if str.nil?
82
82
 
83
83
  protocol = request.protocol
84
- protocol = Caboose.plugin_hook('request_protocol', protocol, request)
84
+ #protocol = Caboose.plugin_hook('request_protocol', protocol, request)
85
85
 
86
86
  css = yield(:css)
87
87
  css.gsub!("<link href=\"//", "<link href=\"#{protocol}")
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.7.74'
2
+ VERSION = '0.7.75'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.74
4
+ version: 0.7.75
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-08 00:00:00.000000000 Z
11
+ date: 2016-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg