caboose-cms 0.7.74 → 0.7.75
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/caboose/checkout_controller.rb +3 -3
- data/app/controllers/caboose/my_account_orders_controller.rb +3 -3
- data/app/controllers/caboose/store_controller.rb +47 -47
- data/app/models/caboose/authnet.rb +7 -7
- data/app/models/caboose/order.rb +3 -3
- data/app/models/caboose/order_pdf.rb +8 -4
- data/app/models/caboose/payment_processors/authorizenet.rb +3 -3
- data/app/models/caboose/pending_orders_pdf.rb +1 -1
- data/app/models/caboose/schema.rb +50 -47
- data/app/models/caboose/store_config.rb +4 -4
- data/app/views/caboose/checkout/payment.html.erb +1 -1
- data/app/views/caboose/my_account_orders/payment_form.html.erb +1 -1
- data/app/views/caboose/orders_mailer/customer_new_order.html.erb +1 -1
- data/app/views/caboose/orders_mailer/fulfillment_new_order.html.erb +2 -2
- data/app/views/caboose/store/admin_edit_payment.html.erb +16 -8
- data/app/views/layouts/caboose/application.html.erb +1 -1
- data/lib/caboose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ae00466f87ad1c9bce32f257456d4c929f1ccca
|
4
|
+
data.tar.gz: 91dc91a638ee41575379f81af8587776281f6d60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
98
|
-
sc.
|
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.
|
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.
|
59
|
-
sc.
|
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.
|
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'
|
61
|
-
when 'pp_name'
|
62
|
-
when '
|
63
|
-
when '
|
64
|
-
when '
|
65
|
-
when '
|
66
|
-
when 'stripe_secret_key'
|
67
|
-
when 'stripe_publishable_key'
|
68
|
-
when 'ups_username'
|
69
|
-
when 'ups_password'
|
70
|
-
when 'ups_key'
|
71
|
-
when 'ups_origin_account'
|
72
|
-
when 'usps_username'
|
73
|
-
when 'usps_secret_key'
|
74
|
-
when 'usps_publishable_key'
|
75
|
-
when 'fedex_username'
|
76
|
-
when 'fedex_password'
|
77
|
-
when 'fedex_key'
|
78
|
-
when 'fedex_account'
|
79
|
-
when 'ups_min'
|
80
|
-
when 'ups_max'
|
81
|
-
when 'usps_min'
|
82
|
-
when 'usps_max'
|
83
|
-
when 'fedex_min'
|
84
|
-
when 'fedex_max'
|
85
|
-
when 'taxcloud_api_id'
|
86
|
-
when 'taxcloud_api_key'
|
87
|
-
when 'origin_address1'
|
88
|
-
when 'origin_address2'
|
89
|
-
when 'origin_state'
|
90
|
-
when 'origin_city'
|
91
|
-
when 'origin_zip'
|
92
|
-
when 'origin_country'
|
93
|
-
when 'fulfillment_email'
|
94
|
-
when 'shipping_email'
|
95
|
-
when 'handling_percentage'
|
96
|
-
when 'auto_calculate_packages'
|
97
|
-
when 'auto_calculate_shipping'
|
98
|
-
when 'auto_calculate_tax'
|
99
|
-
when 'custom_packages_function'
|
100
|
-
when 'custom_shipping_function'
|
101
|
-
when 'custom_tax_function'
|
102
|
-
when 'length_unit'
|
103
|
-
when 'weight_unit'
|
104
|
-
when 'download_instructions'
|
105
|
-
when 'download_url_expires_in'
|
106
|
-
when 'starting_order_number'
|
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.
|
26
|
-
"transactionKey" => '386TLme2j8yp4BQy', #store_config.
|
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.
|
64
|
-
"transactionKey" => '386TLme2j8yp4BQy', #store_config.
|
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.
|
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.
|
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.
|
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
|
data/app/models/caboose/order.rb
CHANGED
@@ -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.
|
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.
|
334
|
-
sc.
|
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.
|
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
|
-
|
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
|
-
|
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.
|
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.
|
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.
|
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.
|
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
|
733
|
-
[ :pp_name
|
734
|
-
[ :
|
735
|
-
[ :
|
736
|
-
[ :
|
737
|
-
[ :pp_relay_domain
|
738
|
-
[ :
|
739
|
-
[ :
|
740
|
-
[ :
|
741
|
-
[ :
|
742
|
-
[ :
|
743
|
-
[ :
|
744
|
-
[ :
|
745
|
-
[ :
|
746
|
-
[ :
|
747
|
-
[ :
|
748
|
-
[ :
|
749
|
-
[ :
|
750
|
-
[ :
|
751
|
-
[ :
|
752
|
-
[ :
|
753
|
-
[ :
|
754
|
-
[ :
|
755
|
-
[ :
|
756
|
-
[ :
|
757
|
-
[ :
|
758
|
-
[ :
|
759
|
-
[ :
|
760
|
-
[ :
|
761
|
-
[ :
|
762
|
-
[ :
|
763
|
-
[ :
|
764
|
-
[ :
|
765
|
-
[ :
|
766
|
-
[ :
|
767
|
-
[ :
|
768
|
-
[ :
|
769
|
-
[ :
|
770
|
-
[ :
|
771
|
-
[ :
|
772
|
-
[ :
|
773
|
-
[ :
|
774
|
-
[ :
|
775
|
-
[ :
|
776
|
-
[ :
|
777
|
-
[ :
|
778
|
-
[ :
|
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
|
-
:
|
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.
|
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.
|
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.
|
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.
|
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.
|
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'
|
26
|
-
{ name: '
|
27
|
-
{ name: '
|
28
|
-
{ name: '
|
29
|
-
{ name: '
|
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}")
|
data/lib/caboose/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2016-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|