spree_gateway 2.1.1 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. metadata +185 -116
  3. data/.gitignore +0 -14
  4. data/.rspec +0 -1
  5. data/.travis.yml +0 -22
  6. data/Gemfile +0 -21
  7. data/LICENSE +0 -26
  8. data/README.md +0 -68
  9. data/Rakefile +0 -14
  10. data/Versionfile +0 -12
  11. data/app/assets/javascripts/store/gateway/stripe.js.coffee +0 -58
  12. data/app/assets/javascripts/store/spree_gateway.js +0 -2
  13. data/app/assets/stylesheets/store/spree_gateway.css +0 -8
  14. data/app/controllers/spree/checkout_controller_decorator.rb +0 -51
  15. data/app/controllers/spree/skrill_status_controller.rb +0 -39
  16. data/app/models/spree/billing_integration/skrill/quick_checkout.rb +0 -48
  17. data/app/models/spree/gateway/authorize_net.rb +0 -16
  18. data/app/models/spree/gateway/authorize_net_cim.rb +0 -132
  19. data/app/models/spree/gateway/balanced_gateway.rb +0 -65
  20. data/app/models/spree/gateway/banwire.rb +0 -15
  21. data/app/models/spree/gateway/beanstream.rb +0 -193
  22. data/app/models/spree/gateway/braintree_gateway.rb +0 -147
  23. data/app/models/spree/gateway/card_save.rb +0 -10
  24. data/app/models/spree/gateway/data_cash.rb +0 -10
  25. data/app/models/spree/gateway/eway.rb +0 -20
  26. data/app/models/spree/gateway/fatzebra.rb +0 -15
  27. data/app/models/spree/gateway/linkpoint.rb +0 -28
  28. data/app/models/spree/gateway/maxipago.rb +0 -14
  29. data/app/models/spree/gateway/moneris.rb +0 -11
  30. data/app/models/spree/gateway/pay_junction.rb +0 -16
  31. data/app/models/spree/gateway/pay_pal_gateway.rb +0 -12
  32. data/app/models/spree/gateway/payflow_pro.rb +0 -17
  33. data/app/models/spree/gateway/paymill.rb +0 -12
  34. data/app/models/spree/gateway/pin_gateway.rb +0 -15
  35. data/app/models/spree/gateway/sage_pay.rb +0 -11
  36. data/app/models/spree/gateway/samurai.rb +0 -63
  37. data/app/models/spree/gateway/secure_pay_au.rb +0 -10
  38. data/app/models/spree/gateway/stripe_gateway.rb +0 -103
  39. data/app/models/spree/gateway/usa_epay.rb +0 -9
  40. data/app/models/spree/gateway/worldpay.rb +0 -91
  41. data/app/models/spree/skrill_transaction.rb +0 -19
  42. data/app/views/spree/admin/log_entries/_braintree.html.erb +0 -31
  43. data/app/views/spree/admin/log_entries/_stripe.html.erb +0 -28
  44. data/app/views/spree/admin/payments/source_forms/_quickcheckout.html.erb +0 -8
  45. data/app/views/spree/admin/payments/source_forms/_stripe.html.erb +0 -1
  46. data/app/views/spree/admin/payments/source_views/_quickcheckout.html.erb +0 -39
  47. data/app/views/spree/admin/payments/source_views/_stripe.html.erb +0 -1
  48. data/app/views/spree/checkout/payment/_quickcheckout.html.erb +0 -26
  49. data/app/views/spree/checkout/payment/_stripe.html.erb +0 -21
  50. data/config/initializers/savon.rb +0 -3
  51. data/config/locales/bg.yml +0 -11
  52. data/config/locales/de.yml +0 -11
  53. data/config/locales/en.yml +0 -30
  54. data/config/locales/sv.yml +0 -11
  55. data/config/routes.rb +0 -20
  56. data/db/migrate/20111118164631_create_skrill_transactions.rb +0 -14
  57. data/db/migrate/20121017004102_update_braintree_payment_method_type.rb +0 -9
  58. data/db/migrate/20130213222555_update_stripe_payment_method_type.rb +0 -9
  59. data/db/migrate/20130415222802_update_balanced_payment_method_type.rb +0 -9
  60. data/db/migrate/20131008221012_update_paypal_payment_method_type.rb +0 -9
  61. data/db/migrate/20131112133401_migrate_stripe_preferences.rb +0 -8
  62. data/lib/active_merchant/billing/skrill.rb +0 -18
  63. data/lib/generators/spree_gateway/install/install_generator.rb +0 -28
  64. data/lib/spree_gateway.rb +0 -3
  65. data/lib/spree_gateway/engine.rb +0 -42
  66. data/script/rails +0 -5
  67. data/spec/factories/payment_method_factory.rb +0 -4
  68. data/spec/features/stripe_checkout_spec.rb +0 -82
  69. data/spec/models/gateway/authorize_net_cim_spec.rb +0 -17
  70. data/spec/models/gateway/authorize_net_spec.rb +0 -17
  71. data/spec/models/gateway/balanced_gateway_spec.rb +0 -9
  72. data/spec/models/gateway/banwire_spec.rb +0 -9
  73. data/spec/models/gateway/braintree_gateway_spec.rb +0 -289
  74. data/spec/models/gateway/eway_spec.rb +0 -17
  75. data/spec/models/gateway/fatzebra_spec.rb +0 -47
  76. data/spec/models/gateway/linkpoint_spec.rb +0 -60
  77. data/spec/models/gateway/pay_junction_spec.rb +0 -17
  78. data/spec/models/gateway/payflow_pro_spec.rb +0 -17
  79. data/spec/models/gateway/pin_gateway_spec.rb +0 -57
  80. data/spec/models/gateway/stripe_gateway_spec.rb +0 -122
  81. data/spec/models/gateway/usa_epay_spec.rb +0 -38
  82. data/spec/models/savon_spec.rb +0 -9
  83. data/spec/spec_helper.rb +0 -56
  84. data/spree_gateway.gemspec +0 -28
@@ -1,19 +0,0 @@
1
- module Spree
2
- class SkrillTransaction < ActiveRecord::Base
3
- has_many :payments, :as => :source
4
-
5
- def actions
6
- []
7
- end
8
-
9
- def self.create_from_postback(params)
10
- SkrillTransaction.create(:email => params[:pay_from_email],
11
- :amount => params[:mb_amount],
12
- :currency => params[:mb_currency],
13
- :transaction_id => params[:mb_transaction_id],
14
- :customer_id => params[:customer_id],
15
- :payment_type => params[:payment_type])
16
- end
17
-
18
- end
19
- end
@@ -1,31 +0,0 @@
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>
@@ -1,28 +0,0 @@
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>
@@ -1,8 +0,0 @@
1
- <% content_for :head do %>
2
- <script type="text/javascript">
3
- jQuery(document).ready(function(){
4
- $("label:contains('<%= payment_method.name %>')").hide();
5
- $("label:contains('<%= payment_method.name %>') input").disable();
6
- });
7
- </script>
8
- <% end %>
@@ -1 +0,0 @@
1
- <%= render "spree/admin/payments/source_forms/gateway", payment_method: payment_method %>
@@ -1,39 +0,0 @@
1
- <fieldset>
2
- <legend><%= Spree.t(:skrill) %></legend>
3
-
4
- <table class="index">
5
- <tr>
6
- <th colspan="6"><%= Spree.t(:skrill_transaction) %></th>
7
- </tr>
8
- <tr>
9
- <td><label><%= Spree.t(:email) %>:</label></td>
10
- <td>
11
- <%= payment.source.email %>
12
- </td>
13
- </tr>
14
- <tr>
15
- <td><label><%= Spree.t(:skrill_customer_id) %>:</label></td>
16
- <td>
17
- <%= payment.source.customer_id %>
18
- </td>
19
- </tr>
20
- <tr>
21
- <td><label><%= Spree.t(:skrill_transaction_id) %>:</label></td>
22
- <td>
23
- <%= payment.source.transaction_id %>
24
- </td>
25
- </tr>
26
- <tr>
27
- <td><label><%= Spree.t(:skrill_payment_type) %>:</label></td>
28
- <td>
29
- <%= payment.source.payment_type %>
30
- </td>
31
- </tr>
32
- <tr>
33
- <td><label><%= Spree.t(:skrill_payment_currency) %>:</label></td>
34
- <td>
35
- <%= payment.source.currency %>
36
- </td>
37
- </tr>
38
- </table>
39
- </fieldset>
@@ -1 +0,0 @@
1
- <%= render "spree/admin/payments/source_views/gateway", payment: payment %>
@@ -1,26 +0,0 @@
1
- <p data-hook="skrill_quick_checkout"></p>
2
-
3
- <%
4
- opts = {}
5
- opts[:transaction_id] = "#{@order.number}"
6
- opts[:amount] = @order.total
7
- opts[:return_url] = skrill_return_order_checkout_url(@order, :token => @order.token,
8
- :payment_method_id => payment_method.id)
9
- opts[:cancel_url] = skrill_cancel_order_checkout_url(@order, :token => @order.token)
10
- opts[:status_url] = skrill_url
11
- opts[:payment_method_id] = payment_method.id
12
- %>
13
-
14
- <style>
15
- iframe.skrill_frame{
16
- border: 0px;
17
- width: 500px;
18
- height: 500px;
19
- }
20
- </style>
21
-
22
- <fieldset id="skrill_payment__<%= payment_method.id %>" data-hook>
23
- <legend><%= Spree.t(:payment_information) %></legend>
24
- <iframe id="skrill_frame_<%= payment_method.id %>"
25
- class="skrill_frame" src="<%= payment_method.redirect_url @order, opts %>"></iframe>
26
- </fieldset>
@@ -1,21 +0,0 @@
1
- <%= render "spree/checkout/payment/gateway", :payment_method => payment_method %>
2
-
3
- <script type="text/javascript" src="https://js.stripe.com/v2/"></script>
4
- <script type="text/javascript">
5
- Stripe.setPublishableKey("<%= payment_method.preferred_publishable_key %>");
6
- </script>
7
- <script>
8
- Spree.stripePaymentMethod = $('#payment_method_' + <%= payment_method.id %>)
9
- </script>
10
- <%= javascript_include_tag "store/gateway/stripe" %>
11
- <script>
12
- Spree.stripeAdditionalInfo = {
13
- name: "<%= @order.bill_address.full_name %>",
14
- address_line_1: "<%= @order.bill_address.address1 %>",
15
- address_line_2: "<%= @order.bill_address.address2 %>",
16
- address_city: "<%= @order.bill_address.city %>",
17
- address_state: "<%= @order.bill_address.state_text %>",
18
- address_zip: "<%= @order.bill_address.zipcode %>",
19
- address_country: "<%= @order.bill_address.country %>"
20
- }
21
- </script>
@@ -1,3 +0,0 @@
1
- # Disable the Savon log so SOAP data (eg. credit-card numbers) will not be captured
2
-
3
- Savon.config.log = false
@@ -1,11 +0,0 @@
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: Валута
@@ -1,11 +0,0 @@
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
@@ -1,30 +0,0 @@
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
@@ -1,11 +0,0 @@
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
@@ -1,20 +0,0 @@
1
- routes = lambda do
2
- # Add your extension routes here
3
- resources :orders do
4
- resource :checkout, :controller => 'checkout' do
5
- member do
6
- get :skrill_cancel
7
- get :skrill_return
8
- end
9
- end
10
- end
11
-
12
- post '/skrill' => 'skrill_status#update'
13
- end
14
-
15
-
16
- if Spree::Core::Engine.respond_to?(:add_routes)
17
- Spree::Core::Engine.add_routes(&routes)
18
- else
19
- Spree::Core::Engine.routes.prepend(&routes)
20
- end
@@ -1,14 +0,0 @@
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
11
- end
12
- end
13
- end
14
-
@@ -1,9 +0,0 @@
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
@@ -1,9 +0,0 @@
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
@@ -1,9 +0,0 @@
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
@@ -1,9 +0,0 @@
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
@@ -1,8 +0,0 @@
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
@@ -1,18 +0,0 @@
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
@@ -1,28 +0,0 @@
1
- module SpreeGateway
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=spree_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
@@ -1,3 +0,0 @@
1
- require 'spree_core'
2
- require 'spree_gateway/engine'
3
- require 'savon'
@@ -1,42 +0,0 @@
1
- module SpreeGateway
2
- class Engine < Rails::Engine
3
- engine_name 'spree_gateway'
4
-
5
- config.autoload_paths += %W(#{config.root}/lib)
6
-
7
- # use rspec for tests
8
- config.generators do |g|
9
- g.test_framework :rspec
10
- end
11
-
12
- initializer "spree.gateway.payment_methods", :after => "spree.register.payment_methods" do |app|
13
- app.config.spree.payment_methods << Spree::Gateway::AuthorizeNetCim
14
- app.config.spree.payment_methods << Spree::Gateway::AuthorizeNet
15
- app.config.spree.payment_methods << Spree::Gateway::CardSave
16
- app.config.spree.payment_methods << Spree::Gateway::Eway
17
- app.config.spree.payment_methods << Spree::Gateway::Fatzebra
18
- app.config.spree.payment_methods << Spree::Gateway::Linkpoint
19
- app.config.spree.payment_methods << Spree::Gateway::Moneris
20
- app.config.spree.payment_methods << Spree::Gateway::PayJunction
21
- app.config.spree.payment_methods << Spree::Gateway::PayPalGateway
22
- app.config.spree.payment_methods << Spree::Gateway::SagePay
23
- app.config.spree.payment_methods << Spree::Gateway::Beanstream
24
- app.config.spree.payment_methods << Spree::Gateway::BraintreeGateway
25
- app.config.spree.payment_methods << Spree::Gateway::StripeGateway
26
- app.config.spree.payment_methods << Spree::Gateway::Samurai
27
- app.config.spree.payment_methods << Spree::Gateway::Worldpay
28
- app.config.spree.payment_methods << Spree::Gateway::Banwire
29
- app.config.spree.payment_methods << Spree::Gateway::UsaEpay
30
- app.config.spree.payment_methods << Spree::BillingIntegration::Skrill::QuickCheckout
31
- app.config.spree.payment_methods << Spree::Gateway::BalancedGateway
32
- app.config.spree.payment_methods << Spree::Gateway::DataCash
33
- app.config.spree.payment_methods << Spree::Gateway::UsaEpay
34
- app.config.spree.payment_methods << Spree::Gateway::PinGateway
35
- app.config.spree.payment_methods << Spree::Gateway::Paymill
36
- app.config.spree.payment_methods << Spree::Gateway::PayflowPro
37
- app.config.spree.payment_methods << Spree::Gateway::SecurePayAU
38
- app.config.spree.payment_methods << Spree::Gateway::Maxipago
39
- end
40
- end
41
-
42
- end