solidus_gateway 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +1 -0
- data/.travis.yml +23 -0
- data/Gemfile +9 -0
- data/LICENSE.md +26 -0
- data/README.md +38 -0
- data/Rakefile +21 -0
- data/app/models/spree/billing_integration/skrill/quick_checkout.rb +48 -0
- data/app/models/spree/gateway/authorize_net.rb +31 -0
- data/app/models/spree/gateway/authorize_net_cim.rb +201 -0
- data/app/models/spree/gateway/balanced_gateway.rb +65 -0
- data/app/models/spree/gateway/banwire.rb +15 -0
- data/app/models/spree/gateway/beanstream.rb +193 -0
- data/app/models/spree/gateway/braintree_gateway.rb +184 -0
- data/app/models/spree/gateway/card_save.rb +10 -0
- data/app/models/spree/gateway/data_cash.rb +10 -0
- data/app/models/spree/gateway/eway.rb +20 -0
- data/app/models/spree/gateway/linkpoint.rb +28 -0
- data/app/models/spree/gateway/maxipago.rb +14 -0
- data/app/models/spree/gateway/migs.rb +11 -0
- data/app/models/spree/gateway/moneris.rb +10 -0
- data/app/models/spree/gateway/pay_junction.rb +16 -0
- data/app/models/spree/gateway/pay_pal_gateway.rb +12 -0
- data/app/models/spree/gateway/payflow_pro.rb +18 -0
- data/app/models/spree/gateway/paymill.rb +12 -0
- data/app/models/spree/gateway/pin_gateway.rb +60 -0
- data/app/models/spree/gateway/sage_pay.rb +11 -0
- data/app/models/spree/gateway/secure_pay_au.rb +10 -0
- data/app/models/spree/gateway/spreedly_core_gateway.rb +10 -0
- data/app/models/spree/gateway/stripe_gateway.rb +126 -0
- data/app/models/spree/gateway/usa_epay.rb +9 -0
- data/app/models/spree/gateway/worldpay.rb +91 -0
- data/app/models/spree/skrill_transaction.rb +19 -0
- data/bin/rails +7 -0
- data/circle.yml +6 -0
- data/config/locales/bg.yml +11 -0
- data/config/locales/de.yml +11 -0
- data/config/locales/en.yml +30 -0
- data/config/locales/sv.yml +11 -0
- data/config/routes.rb +12 -0
- data/db/migrate/20111118164631_create_skrill_transactions.rb +14 -0
- data/db/migrate/20121017004102_update_braintree_payment_method_type.rb +9 -0
- data/db/migrate/20130213222555_update_stripe_payment_method_type.rb +9 -0
- data/db/migrate/20130415222802_update_balanced_payment_method_type.rb +9 -0
- data/db/migrate/20131008221012_update_paypal_payment_method_type.rb +9 -0
- data/db/migrate/20131112133401_migrate_stripe_preferences.rb +8 -0
- data/lib/active_merchant/billing/skrill.rb +18 -0
- data/lib/assets/javascripts/spree/frontend/solidus_gateway.js +1 -0
- data/lib/assets/stylesheets/spree/frontend/solidus_gateway.css +3 -0
- data/lib/controllers/frontend/spree/checkout_controller_decorator.rb +51 -0
- data/lib/controllers/frontend/spree/skrill_status_controller.rb +39 -0
- data/lib/generators/solidus_gateway/install/install_generator.rb +28 -0
- data/lib/solidus_gateway.rb +4 -0
- data/lib/spree_gateway/engine.rb +67 -0
- data/lib/views/backend/spree/admin/log_entries/_braintree.html.erb +31 -0
- data/lib/views/backend/spree/admin/log_entries/_stripe.html.erb +28 -0
- data/lib/views/backend/spree/admin/payments/source_forms/_quickcheckout.html.erb +8 -0
- data/lib/views/backend/spree/admin/payments/source_forms/_stripe.html.erb +1 -0
- data/lib/views/backend/spree/admin/payments/source_views/_quickcheckout.html.erb +39 -0
- data/lib/views/backend/spree/admin/payments/source_views/_stripe.html.erb +1 -0
- data/lib/views/frontend/spree/checkout/payment/_quickcheckout.html.erb +26 -0
- data/lib/views/frontend/spree/checkout/payment/_stripe.html.erb +80 -0
- data/solidus_gateway.gemspec +33 -0
- data/spec/factories/skrill_factory.rb +6 -0
- data/spec/features/stripe_checkout_spec.rb +78 -0
- data/spec/lib/active_merchant/billing_skrill_spec.rb +18 -0
- data/spec/models/billing_integration/skrill_quick_checkout_spec.rb +11 -0
- data/spec/models/gateway/authorize_net_cim_spec.rb +29 -0
- data/spec/models/gateway/authorize_net_spec.rb +23 -0
- data/spec/models/gateway/balanced_gateway_spec.rb +17 -0
- data/spec/models/gateway/banwire_spec.rb +11 -0
- data/spec/models/gateway/beanstream_spec.rb +17 -0
- data/spec/models/gateway/braintree_gateway_spec.rb +437 -0
- data/spec/models/gateway/card_save_spec.rb +11 -0
- data/spec/models/gateway/data_cache_spec.rb +11 -0
- data/spec/models/gateway/eway_spec.rb +29 -0
- data/spec/models/gateway/linkpoint_spec.rb +62 -0
- data/spec/models/gateway/maxipago_spec.rb +17 -0
- data/spec/models/gateway/moneris_spec.rb +11 -0
- data/spec/models/gateway/pay_junction_spec.rb +23 -0
- data/spec/models/gateway/pay_pal_spec.rb +11 -0
- data/spec/models/gateway/payflow_pro_spec.rb +23 -0
- data/spec/models/gateway/paymill_spec.rb +11 -0
- data/spec/models/gateway/pin_gateway_spec.rb +55 -0
- data/spec/models/gateway/sage_pay_spec.rb +11 -0
- data/spec/models/gateway/secure_pay_au_spec.rb +11 -0
- data/spec/models/gateway/stripe_gateway_spec.rb +200 -0
- data/spec/models/gateway/usa_epay_spec.rb +49 -0
- data/spec/models/gateway/worldpay_spec.rb +11 -0
- data/spec/models/skrill_transaction_spec.rb +9 -0
- data/spec/spec_helper.rb +50 -0
- metadata +317 -0
data/bin/rails
ADDED
data/circle.yml
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
---
|
2
|
+
bg:
|
3
|
+
spree:
|
4
|
+
payment_has_been_cancelled: Плащането беше прекъснато.
|
5
|
+
complete_skrill_checkout: Моля довършете Вашето плащане със Skrill преди да продължите
|
6
|
+
skrill: Skrill
|
7
|
+
skrill_transaction: Транзакция
|
8
|
+
skrill_customer_id: Клиентски номер
|
9
|
+
skrill_transaction_id: Номер на транкцията
|
10
|
+
skrill_payment_type: Вид на плащане
|
11
|
+
skrill_payment_currency: Валута
|
@@ -0,0 +1,11 @@
|
|
1
|
+
---
|
2
|
+
de:
|
3
|
+
spree:
|
4
|
+
payment_has_been_cancelled: Die Zahlung wurde abgebrochen.
|
5
|
+
complete_skrill_checkout: Bitte schliessen Sie die Skrill-Zahlung ab
|
6
|
+
skrill: Skrill
|
7
|
+
skrill_transaction: Transaktion
|
8
|
+
skrill_customer_id: Kunden ID
|
9
|
+
skrill_transaction_id: Transaktions ID
|
10
|
+
skrill_payment_type: Bezahlart
|
11
|
+
skrill_payment_currency: Währung
|
@@ -0,0 +1,30 @@
|
|
1
|
+
---
|
2
|
+
en:
|
3
|
+
spree:
|
4
|
+
payment_has_been_cancelled: The payment has been cancelled.
|
5
|
+
complete_skrill_checkout: Please complete Skrill checkout before continuing
|
6
|
+
skrill: Skrill
|
7
|
+
skrill_transaction: Transaction
|
8
|
+
skrill_customer_id: Customer ID
|
9
|
+
skrill_transaction_id: Transaction ID
|
10
|
+
skrill_payment_type: Payment Type
|
11
|
+
skrill_payment_currency: Payment Currency
|
12
|
+
log_entry:
|
13
|
+
braintree:
|
14
|
+
message: Message
|
15
|
+
status: Status
|
16
|
+
cc_token: Braintree Credit Card Token
|
17
|
+
customer_id: Braintree Customer ID
|
18
|
+
cvv_result: CVV Result
|
19
|
+
avs_result_title: AVS result
|
20
|
+
avs_result:
|
21
|
+
message: Message
|
22
|
+
street_match: Street Match
|
23
|
+
postal_match: Postal Match
|
24
|
+
stripe:
|
25
|
+
message: Message
|
26
|
+
charge_id: Stripe Charge ID
|
27
|
+
card_id: Stripe Card ID
|
28
|
+
cvv_result: CVV Result
|
29
|
+
cvc_check: CVC Check
|
30
|
+
address_zip_check: Address ZIP check
|
@@ -0,0 +1,11 @@
|
|
1
|
+
---
|
2
|
+
sv:
|
3
|
+
spree:
|
4
|
+
payment_has_been_cancelled: Betalningen har avbrutits.
|
5
|
+
complete_skrill_checkout: Var god fyll i Skrill kassan innan du fortsätter
|
6
|
+
skrill: Skrill
|
7
|
+
skrill_transaction: Transaktion
|
8
|
+
skrill_customer_id: Kund ID
|
9
|
+
skrill_transaction_id: Transaktion ID
|
10
|
+
skrill_payment_type: Betalningstyp
|
11
|
+
skrill_payment_currency: Betalningsvaluta
|
data/config/routes.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateSkrillTransactions < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :spree_skrill_transactions do |t|
|
4
|
+
t.string :email
|
5
|
+
t.float :amount
|
6
|
+
t.string :currency
|
7
|
+
t.integer :transaction_id
|
8
|
+
t.integer :customer_id
|
9
|
+
t.string :payment_type
|
10
|
+
t.timestamps null: true
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class UpdateBraintreePaymentMethodType < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
Spree::PaymentMethod.where(:type => "Spree::Gateway::Braintree").update_all(:type => "Spree::Gateway::BraintreeGateway")
|
4
|
+
end
|
5
|
+
|
6
|
+
def down
|
7
|
+
Spree::PaymentMethod.where(:type => "Spree::Gateway::BraintreeGateway").update_all(:type => "Spree::Gateway::Braintree")
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class UpdateStripePaymentMethodType < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
Spree::PaymentMethod.where(:type => "Spree::Gateway::Stripe").update_all(:type => "Spree::Gateway::StripeGateway")
|
4
|
+
end
|
5
|
+
|
6
|
+
def down
|
7
|
+
Spree::PaymentMethod.where(:type => "Spree::Gateway::StripeGateway").update_all(:type => "Spree::Gateway::Stripe")
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class UpdateBalancedPaymentMethodType < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
Spree::PaymentMethod.where(:type => "Spree::Gateway::Balanced").update_all(:type => "Spree::Gateway::BalancedGateway")
|
4
|
+
end
|
5
|
+
|
6
|
+
def down
|
7
|
+
Spree::PaymentMethod.where(:type => "Spree::Gateway::BalancedGateway").update_all(:type => "Spree::Gateway::Balanced")
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class UpdatePaypalPaymentMethodType < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
Spree::PaymentMethod.where(:type => "Spree::Gateway::PayPal").update_all(:type => "Spree::Gateway::PayPalGateway")
|
4
|
+
end
|
5
|
+
|
6
|
+
def down
|
7
|
+
Spree::PaymentMethod.where(:type => "Spree::Gateway::PayPalGateway").update_all(:type => "Spree::Gateway::PayPal")
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
class MigrateStripePreferences < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
Spree::Preference.where("#{ActiveRecord::Base.connection.quote_column_name("key")} LIKE 'spree/gateway/stripe_gateway/login%'").each do |pref|
|
4
|
+
pref.key = pref.key.gsub('login', 'secret_key')
|
5
|
+
pref.save
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module ActiveMerchant #:nodoc:
|
2
|
+
module Billing #:nodoc:
|
3
|
+
class Skrill < Gateway
|
4
|
+
|
5
|
+
def service_url
|
6
|
+
"https://www.moneybookers.com/app/payment.pl"
|
7
|
+
end
|
8
|
+
|
9
|
+
def payment_url(opts)
|
10
|
+
post = PostData.new
|
11
|
+
post.merge! opts
|
12
|
+
|
13
|
+
"#{service_url}?#{post.to_s}"
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require spree/frontend
|
@@ -0,0 +1,51 @@
|
|
1
|
+
module Spree
|
2
|
+
CheckoutController.class_eval do
|
3
|
+
before_filter :confirm_skrill, :only => [:update]
|
4
|
+
|
5
|
+
def skrill_return
|
6
|
+
|
7
|
+
unless @order.payments.where(:source_type => 'Spree::SkrillTransaction').present?
|
8
|
+
payment_method = PaymentMethod.find(params[:payment_method_id])
|
9
|
+
skrill_transaction = SkrillTransaction.new
|
10
|
+
|
11
|
+
payment = @order.payments.create({:amount => @order.total,
|
12
|
+
:source => skrill_transaction,
|
13
|
+
:payment_method => payment_method},
|
14
|
+
:without_protection => true)
|
15
|
+
payment.started_processing!
|
16
|
+
payment.pend!
|
17
|
+
end
|
18
|
+
|
19
|
+
@order.update_attributes({:state => "complete", :completed_at => Time.now}, :without_protection => true)
|
20
|
+
|
21
|
+
until @order.state == "complete"
|
22
|
+
if @order.next!
|
23
|
+
@order.update!
|
24
|
+
state_callback(:after)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
@order.finalize!
|
29
|
+
|
30
|
+
flash.notice = Spree.t(:order_processed_successfully)
|
31
|
+
redirect_to completion_route
|
32
|
+
end
|
33
|
+
|
34
|
+
def skrill_cancel
|
35
|
+
flash[:error] = Spree.t(:payment_has_been_cancelled)
|
36
|
+
redirect_to edit_order_path(@order)
|
37
|
+
end
|
38
|
+
|
39
|
+
private
|
40
|
+
def confirm_skrill
|
41
|
+
return unless (params[:state] == "payment") && params[:order] && params[:order][:payments_attributes]
|
42
|
+
|
43
|
+
payment_method = PaymentMethod.find(params[:order][:payments_attributes].first[:payment_method_id])
|
44
|
+
if payment_method.kind_of?(BillingIntegration::Skrill::QuickCheckout)
|
45
|
+
#TODO confirming payment method
|
46
|
+
redirect_to edit_order_checkout_url(@order, :state => 'payment'),
|
47
|
+
:notice => Spree.t(:complete_skrill_checkout)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Spree
|
2
|
+
class SkrillStatusController < ApplicationController
|
3
|
+
def update
|
4
|
+
@order = Order.find_by_number!(params[:order_id])
|
5
|
+
payment_method = PaymentMethod.find(params[:payment_method_id])
|
6
|
+
skrill_transaction = SkrillTransaction.create_from_postback params
|
7
|
+
|
8
|
+
payment = @order.payments.where(:state => "pending",
|
9
|
+
:payment_method_id => payment_method).first
|
10
|
+
|
11
|
+
if payment
|
12
|
+
payment.source = skrill_transaction
|
13
|
+
payment.save
|
14
|
+
else
|
15
|
+
payment = @order.payments.create(:amount => @order.total,
|
16
|
+
:source => skrill_transaction,
|
17
|
+
:payment_method => payment_method)
|
18
|
+
end
|
19
|
+
|
20
|
+
payment.started_processing!
|
21
|
+
|
22
|
+
unless payment.completed?
|
23
|
+
case params[:status]
|
24
|
+
when "0"
|
25
|
+
payment.pend #may already be pending
|
26
|
+
when "2" #processed / captured
|
27
|
+
payment.complete!
|
28
|
+
when "-1", "-2"
|
29
|
+
payment.failure!
|
30
|
+
else
|
31
|
+
raise "Unexpected payment status"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
render :text => ""
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module SolidusGateway
|
2
|
+
module Generators
|
3
|
+
class InstallGenerator < Rails::Generators::Base
|
4
|
+
class_option :auto_run_migrations, type: :boolean, default: false
|
5
|
+
|
6
|
+
def add_migrations
|
7
|
+
run 'bundle exec rake railties:install:migrations FROM=solidus_gateway'
|
8
|
+
end
|
9
|
+
|
10
|
+
def run_migrations
|
11
|
+
if running_migrations?
|
12
|
+
run 'bundle exec rake db:migrate'
|
13
|
+
else
|
14
|
+
puts "Skiping rake db:migrate, don't forget to run it!"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def running_migrations?
|
21
|
+
options.auto_run_migrations? || begin
|
22
|
+
response = ask 'Would you like to run the migrations now? [Y/n]'
|
23
|
+
['', 'y'].include? response.downcase
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
module SpreeGateway
|
2
|
+
class Engine < Rails::Engine
|
3
|
+
engine_name 'solidus_gateway'
|
4
|
+
|
5
|
+
config.autoload_paths += %W(#{config.root}/lib)
|
6
|
+
|
7
|
+
initializer "spree.gateway.payment_methods", :after => "spree.register.payment_methods" do |app|
|
8
|
+
app.config.spree.payment_methods << Spree::Gateway::AuthorizeNetCim
|
9
|
+
app.config.spree.payment_methods << Spree::Gateway::AuthorizeNet
|
10
|
+
app.config.spree.payment_methods << Spree::Gateway::CardSave
|
11
|
+
app.config.spree.payment_methods << Spree::Gateway::Eway
|
12
|
+
app.config.spree.payment_methods << Spree::Gateway::Linkpoint
|
13
|
+
app.config.spree.payment_methods << Spree::Gateway::Moneris
|
14
|
+
app.config.spree.payment_methods << Spree::Gateway::PayJunction
|
15
|
+
app.config.spree.payment_methods << Spree::Gateway::PayPalGateway
|
16
|
+
app.config.spree.payment_methods << Spree::Gateway::SagePay
|
17
|
+
app.config.spree.payment_methods << Spree::Gateway::Beanstream
|
18
|
+
app.config.spree.payment_methods << Spree::Gateway::BraintreeGateway
|
19
|
+
app.config.spree.payment_methods << Spree::Gateway::StripeGateway
|
20
|
+
app.config.spree.payment_methods << Spree::Gateway::Worldpay
|
21
|
+
app.config.spree.payment_methods << Spree::Gateway::Banwire
|
22
|
+
app.config.spree.payment_methods << Spree::Gateway::UsaEpay
|
23
|
+
app.config.spree.payment_methods << Spree::BillingIntegration::Skrill::QuickCheckout
|
24
|
+
app.config.spree.payment_methods << Spree::Gateway::BalancedGateway
|
25
|
+
app.config.spree.payment_methods << Spree::Gateway::DataCash
|
26
|
+
app.config.spree.payment_methods << Spree::Gateway::UsaEpay
|
27
|
+
app.config.spree.payment_methods << Spree::Gateway::PinGateway
|
28
|
+
app.config.spree.payment_methods << Spree::Gateway::Paymill
|
29
|
+
app.config.spree.payment_methods << Spree::Gateway::PayflowPro
|
30
|
+
app.config.spree.payment_methods << Spree::Gateway::SecurePayAU
|
31
|
+
app.config.spree.payment_methods << Spree::Gateway::Maxipago
|
32
|
+
app.config.spree.payment_methods << Spree::Gateway::Migs
|
33
|
+
app.config.spree.payment_methods << Spree::Gateway::SpreedlyCoreGateway
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.activate
|
37
|
+
if SpreeGateway::Engine.frontend_available?
|
38
|
+
Rails.application.config.assets.precompile += [
|
39
|
+
'lib/assets/javascripts/spree/frontend/solidus_gateway.js',
|
40
|
+
'lib/assets/javascripts/spree/frontend/solidus_gateway.css',
|
41
|
+
]
|
42
|
+
Dir.glob(File.join(File.dirname(__FILE__), "../../controllers/frontend/*/*_decorator*.rb")) do |c|
|
43
|
+
Rails.configuration.cache_classes ? require(c) : load(c)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.backend_available?
|
49
|
+
@@backend_available ||= ::Rails::Engine.subclasses.map(&:instance).map{ |e| e.class.to_s }.include?('Spree::Backend::Engine')
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.frontend_available?
|
53
|
+
@@frontend_available ||= ::Rails::Engine.subclasses.map(&:instance).map{ |e| e.class.to_s }.include?('Spree::Frontend::Engine')
|
54
|
+
end
|
55
|
+
|
56
|
+
if self.backend_available?
|
57
|
+
paths["app/views"] << "lib/views/backend"
|
58
|
+
end
|
59
|
+
|
60
|
+
if self.frontend_available?
|
61
|
+
paths["app/controllers"] << "lib/controllers/frontend"
|
62
|
+
paths["app/views"] << "lib/views/frontend"
|
63
|
+
end
|
64
|
+
|
65
|
+
config.to_prepare &method(:activate).to_proc
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<% transaction = entry.parsed_details.params['braintree_transaction'] %>
|
2
|
+
<tr>
|
3
|
+
<td><%= Spree.t(:message, :scope => [:log_entry, :braintree]) %></td>
|
4
|
+
<td><%= entry.parsed_details.message %></td>
|
5
|
+
</tr>
|
6
|
+
<% if transaction %>
|
7
|
+
<tr>
|
8
|
+
<td><%= Spree.t(:status, :scope => [:log_entry, :braintree]) %></td>
|
9
|
+
<td><%= transaction['status'] %></td>
|
10
|
+
</tr>
|
11
|
+
<tr>
|
12
|
+
<td><%= Spree.t(:cc_token, :scope => [:log_entry, :braintree]) %></td>
|
13
|
+
<td><%= transaction['credit_card_details']['token'] %></td>
|
14
|
+
</tr>
|
15
|
+
<tr>
|
16
|
+
<td><%= Spree.t(:customer_id, :scope => [:log_entry, :braintree]) %></td>
|
17
|
+
<td><%= transaction['customer_details']['id'] %></td>
|
18
|
+
</tr>
|
19
|
+
<% end %>
|
20
|
+
<tr>
|
21
|
+
<td><%= Spree.t(:cvv_result, :scope => [:log_entry, :braintree]) %></td>
|
22
|
+
<td><%= entry.parsed_details.cvv_result['message'].to_s %></td>
|
23
|
+
</tr>
|
24
|
+
<tr>
|
25
|
+
<td><%= Spree.t(:avs_result_title, :scope => [:log_entry, :braintree]) %></td>
|
26
|
+
<td>
|
27
|
+
<%= Spree.t(:message, :scope => [:log_entry, :braintree, :avs_result]) %>: <%= entry.parsed_details.avs_result['message'] %><br>
|
28
|
+
<%= Spree.t(:street_match, :scope => [:log_entry, :braintree, :avs_result]) %>: <%= entry.parsed_details.avs_result['street_match'] %><br>
|
29
|
+
<%= Spree.t(:postal_match, :scope => [:log_entry, :braintree, :avs_result]) %>: <%= entry.parsed_details.avs_result['postal_match'] %>
|
30
|
+
</td>
|
31
|
+
</tr>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<tr>
|
2
|
+
<td><%= Spree.t(:message, :scope => [:log_entry, :stripe]) %></td>
|
3
|
+
<td><%= entry.parsed_details.message %></td>
|
4
|
+
</tr>
|
5
|
+
<tr>
|
6
|
+
<td><%= Spree.t(:charge_id, :scope => [:log_entry, :stripe]) %></td>
|
7
|
+
<td><%= entry.parsed_details.params['id'] %></td>
|
8
|
+
</tr>
|
9
|
+
<% if card = entry.parsed_details.params['card'] %>
|
10
|
+
<tr>
|
11
|
+
<td><%= Spree.t(:card_id, :scope => [:log_entry, :stripe]) %></td>
|
12
|
+
<td><%= card['id'] %></td>
|
13
|
+
</tr>
|
14
|
+
|
15
|
+
<tr>
|
16
|
+
<td><%= Spree.t(:cvc_check, :scope => [:log_entry, :stripe]) %></td>
|
17
|
+
<td><%= card['cvc_check'] %></td>
|
18
|
+
</tr>
|
19
|
+
|
20
|
+
<tr>
|
21
|
+
<td><%= Spree.t(:address_zip_check, :scope => [:log_entry, :stripe]) %></td>
|
22
|
+
<td><%= card['address_zip_check'] %></td>
|
23
|
+
</tr>
|
24
|
+
<% end %>
|
25
|
+
<tr>
|
26
|
+
<td><%= Spree.t(:cvv_result, :scope => [:log_entry, :stripe]) %></td>
|
27
|
+
<td><%= entry.parsed_details.cvv_result['message'].to_s %></td>
|
28
|
+
</tr>
|