solidus_paypal_braintree 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +26 -0
- data/README.md +196 -0
- data/Rakefile +30 -0
- data/app/assets/javascripts/spree/backend/solidus_paypal_braintree.js +66 -0
- data/app/assets/javascripts/spree/braintree_hosted_form.js +98 -0
- data/app/assets/javascripts/spree/checkout/braintree.js +60 -0
- data/app/assets/javascripts/spree/frontend/paypal_button.js +182 -0
- data/app/assets/javascripts/spree/frontend/solidus_paypal_braintree.js +188 -0
- data/app/assets/stylesheets/spree/backend/solidus_paypal_braintree.scss +28 -0
- data/app/assets/stylesheets/spree/frontend/solidus_paypal_braintree.css +16 -0
- data/app/controllers/solidus_paypal_braintree/client_tokens_controller.rb +21 -0
- data/app/helpers/braintree_admin_helper.rb +18 -0
- data/app/models/application_record.rb +3 -0
- data/app/models/solidus_paypal_braintree/configuration.rb +5 -0
- data/app/models/solidus_paypal_braintree/customer.rb +4 -0
- data/app/models/solidus_paypal_braintree/gateway.rb +323 -0
- data/app/models/solidus_paypal_braintree/response.rb +52 -0
- data/app/models/solidus_paypal_braintree/source.rb +73 -0
- data/app/models/solidus_paypal_braintree/transaction.rb +30 -0
- data/app/models/solidus_paypal_braintree/transaction_address.rb +66 -0
- data/app/models/solidus_paypal_braintree/transaction_import.rb +92 -0
- data/app/models/spree/store_decorator.rb +11 -0
- data/app/overrides/admin_navigation_menu.rb +6 -0
- data/app/views/spree/shared/_braintree_hosted_fields.html.erb +26 -0
- data/config/initializers/braintree.rb +1 -0
- data/config/locales/en.yml +30 -0
- data/config/routes.rb +12 -0
- data/db/migrate/20160830061749_create_solidus_paypal_braintree_sources.rb +16 -0
- data/db/migrate/20160906201711_create_solidus_paypal_braintree_customers.rb +11 -0
- data/db/migrate/20161114231422_create_solidus_paypal_braintree_configurations.rb +11 -0
- data/db/migrate/20161125172005_add_braintree_configuration_to_stores.rb +9 -0
- data/db/migrate/20170203191030_add_credit_card_to_braintree_configuration.rb +6 -0
- data/db/migrate/20170505193712_add_null_constraint_to_sources.rb +30 -0
- data/db/migrate/20170508085402_add_not_null_constraint_to_sources_payment_type.rb +11 -0
- data/lib/controllers/backend/solidus_paypal_braintree/configurations_controller.rb +30 -0
- data/lib/controllers/frontend/solidus_paypal_braintree/checkouts_controller.rb +27 -0
- data/lib/controllers/frontend/solidus_paypal_braintree/transactions_controller.rb +61 -0
- data/lib/generators/solidus_paypal_braintree/install/install_generator.rb +37 -0
- data/lib/solidus_paypal_braintree.rb +10 -0
- data/lib/solidus_paypal_braintree/country_mapper.rb +35 -0
- data/lib/solidus_paypal_braintree/engine.rb +53 -0
- data/lib/solidus_paypal_braintree/factories.rb +18 -0
- data/lib/solidus_paypal_braintree/version.rb +3 -0
- data/lib/views/backend/solidus_paypal_braintree/configurations/_admin_tab.html.erb +3 -0
- data/lib/views/backend/solidus_paypal_braintree/configurations/list.html.erb +30 -0
- data/lib/views/backend/spree/admin/payments/source_forms/_paypal_braintree.html.erb +16 -0
- data/lib/views/backend/spree/admin/payments/source_views/_paypal_braintree.html.erb +34 -0
- data/lib/views/backend_v1.2/spree/admin/payments/source_forms/_paypal_braintree.html.erb +16 -0
- data/lib/views/frontend/spree/checkout/payment/_paypal_braintree.html.erb +52 -0
- metadata +350 -0
@@ -0,0 +1,61 @@
|
|
1
|
+
class SolidusPaypalBraintree::TransactionsController < Spree::StoreController
|
2
|
+
class InvalidImportError < StandardError; end
|
3
|
+
|
4
|
+
PERMITTED_BRAINTREE_TRANSACTION_PARAMS = [
|
5
|
+
:nonce,
|
6
|
+
:payment_type,
|
7
|
+
:phone,
|
8
|
+
:email,
|
9
|
+
address_attributes: [
|
10
|
+
:country_code, :country_name, :last_name, :first_name,
|
11
|
+
:city, :zip, :state_code, :address_line_1, :address_line_2
|
12
|
+
]
|
13
|
+
]
|
14
|
+
|
15
|
+
def create
|
16
|
+
transaction = SolidusPaypalBraintree::Transaction.new transaction_params
|
17
|
+
import = SolidusPaypalBraintree::TransactionImport.new(current_order, transaction)
|
18
|
+
|
19
|
+
respond_to do |format|
|
20
|
+
if import.valid?
|
21
|
+
import.import!(import_state)
|
22
|
+
|
23
|
+
format.html { redirect_to redirect_url(import) }
|
24
|
+
format.json { render json: { redirectUrl: redirect_url(import) } }
|
25
|
+
else
|
26
|
+
status = 422
|
27
|
+
format.html { import_error(import) }
|
28
|
+
format.json { render json: { errors: import.errors, status: status }, status: status }
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
def import_state
|
36
|
+
params[:state] || 'confirm'
|
37
|
+
end
|
38
|
+
|
39
|
+
def import_error(import)
|
40
|
+
raise InvalidImportError,
|
41
|
+
"Import invalid: #{import.errors.full_messages.join(', ')}"
|
42
|
+
end
|
43
|
+
|
44
|
+
def redirect_url(import)
|
45
|
+
if import.order.complete?
|
46
|
+
spree.order_url(import.order)
|
47
|
+
else
|
48
|
+
spree.checkout_state_url(import.order.state)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def transaction_params
|
53
|
+
params.require(:transaction)
|
54
|
+
.permit(PERMITTED_BRAINTREE_TRANSACTION_PARAMS)
|
55
|
+
.merge({ payment_method: payment_method })
|
56
|
+
end
|
57
|
+
|
58
|
+
def payment_method
|
59
|
+
SolidusPaypalBraintree::Gateway.find(params[:payment_method_id])
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module SolidusPaypalBraintree
|
2
|
+
module Generators
|
3
|
+
class InstallGenerator < Rails::Generators::Base
|
4
|
+
class_option :auto_run_migrations, type: :boolean, default: false
|
5
|
+
|
6
|
+
def add_javascripts
|
7
|
+
append_file 'vendor/assets/javascripts/spree/frontend/all.js', "//= require spree/frontend/solidus_paypal_braintree\n"
|
8
|
+
append_file 'vendor/assets/javascripts/spree/frontend/all.js', "//= require spree/frontend/paypal_button\n"
|
9
|
+
append_file 'vendor/assets/javascripts/spree/backend/all.js', "//= require spree/backend/solidus_paypal_braintree\n"
|
10
|
+
end
|
11
|
+
|
12
|
+
def add_stylesheets
|
13
|
+
inject_into_file 'vendor/assets/stylesheets/spree/frontend/all.css', " *= require spree/frontend/solidus_paypal_braintree\n", before: /\*\//, verbose: true
|
14
|
+
inject_into_file 'vendor/assets/stylesheets/spree/backend/all.css', " *= require spree/backend/solidus_paypal_braintree\n", before: /\*\//, verbose: true
|
15
|
+
end
|
16
|
+
|
17
|
+
def add_migrations
|
18
|
+
run 'bundle exec rake railties:install:migrations FROM=solidus_paypal_braintree'
|
19
|
+
end
|
20
|
+
|
21
|
+
def mount_engine
|
22
|
+
insert_into_file File.join('config', 'routes.rb'), after: "Rails.application.routes.draw do\n" do
|
23
|
+
"mount SolidusPaypalBraintree::Engine, at: '/solidus_paypal_braintree'\n"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def run_migrations
|
28
|
+
run_migrations = options[:auto_run_migrations] || ['', 'y', 'Y'].include?(ask('Would you like to run the migrations now? [Y/n]'))
|
29
|
+
if run_migrations
|
30
|
+
run 'bundle exec rake db:migrate'
|
31
|
+
else
|
32
|
+
puts 'Skipping rake db:migrate, don\'t forget to run it!'
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module SolidusPaypalBraintree
|
2
|
+
module CountryMapper
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
USA_VARIANTS = [
|
6
|
+
"the united states of america",
|
7
|
+
"united states of america",
|
8
|
+
"the united states",
|
9
|
+
"united states",
|
10
|
+
"us of a",
|
11
|
+
"u.s.a.",
|
12
|
+
"usa",
|
13
|
+
"u.s.",
|
14
|
+
"us"
|
15
|
+
]
|
16
|
+
|
17
|
+
CANADA_VARIANTS = [
|
18
|
+
"canada",
|
19
|
+
"ca"
|
20
|
+
]
|
21
|
+
|
22
|
+
# Generates a hash mapping each variant of the country name to the same ISO
|
23
|
+
# ie: { "usa" => "US", "united states" => "US", "canada" => "CA", ... }
|
24
|
+
COUNTRY_MAP = {
|
25
|
+
USA_VARIANTS => "US",
|
26
|
+
CANADA_VARIANTS => "CA"
|
27
|
+
}.flat_map { |variants, iso| variants.map { |v| [v, iso] } }.to_h
|
28
|
+
|
29
|
+
included do
|
30
|
+
def iso_from_name(country_name)
|
31
|
+
COUNTRY_MAP[country_name.downcase.strip]
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
module SolidusPaypalBraintree
|
2
|
+
class Engine < Rails::Engine
|
3
|
+
isolate_namespace SolidusPaypalBraintree
|
4
|
+
engine_name 'solidus_paypal_braintree'
|
5
|
+
|
6
|
+
# use rspec for tests
|
7
|
+
config.generators do |g|
|
8
|
+
g.test_framework :rspec
|
9
|
+
end
|
10
|
+
|
11
|
+
initializer "register_solidus_paypal_braintree_gateway", after: "spree.register.payment_methods" do |app|
|
12
|
+
app.config.spree.payment_methods << SolidusPaypalBraintree::Gateway
|
13
|
+
Spree::PermittedAttributes.source_attributes.concat [:nonce, :payment_type]
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.activate
|
17
|
+
Dir.glob(File.join(File.dirname(__FILE__), '../../app/**/*_decorator*.rb')) do |c|
|
18
|
+
Rails.configuration.cache_classes ? require(c) : load(c)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
config.to_prepare(&method(:activate).to_proc)
|
23
|
+
|
24
|
+
def self.frontend_available?
|
25
|
+
defined?(Spree::Frontend::Engine) == "constant"
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.backend_available?
|
29
|
+
defined?(Spree::Backend::Engine) == "constant"
|
30
|
+
end
|
31
|
+
|
32
|
+
if frontend_available?
|
33
|
+
config.assets.precompile += [
|
34
|
+
'spree/frontend/solidus_paypal_braintree.js',
|
35
|
+
'spree/frontend/paypal_button.js',
|
36
|
+
'spree/checkout/braintree.js'
|
37
|
+
]
|
38
|
+
paths["app/controllers"] << "lib/controllers/frontend"
|
39
|
+
paths["app/views"] << "lib/views/frontend"
|
40
|
+
end
|
41
|
+
|
42
|
+
if backend_available?
|
43
|
+
config.assets.precompile += ["spree/backend/solidus_paypal_braintree.js"]
|
44
|
+
paths["app/controllers"] << "lib/controllers/backend"
|
45
|
+
|
46
|
+
# We support Solidus v1.2, which requires some different markup in the
|
47
|
+
# source form partial. This will take precedence over lib/views/backend.
|
48
|
+
paths["app/views"] << "lib/views/backend_v1.2" if Gem::Version.new(Spree.solidus_version) < Gem::Version.new('1.3')
|
49
|
+
|
50
|
+
paths["app/views"] << "lib/views/backend"
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
FactoryGirl.define do
|
2
|
+
# Define your Spree extensions Factories within this file to enable applications, and other extensions to use and override them.
|
3
|
+
#
|
4
|
+
# Example adding this to your spec_helper will load these Factories for use:
|
5
|
+
# require 'solidus_paypal_braintree/factories'
|
6
|
+
end
|
7
|
+
|
8
|
+
FactoryGirl.modify do
|
9
|
+
# The Solidus address factory randomizes the zipcode.
|
10
|
+
# The OrderWalkThrough we use in the credit card checkout spec uses this factory for the user addresses.
|
11
|
+
# For credit card payments we transmit the billing address to braintree, for paypal payments the shipping address.
|
12
|
+
# As we match the body in our VCR settings VCR can not match the request anymore and therefore cannot replay existing cassettes.
|
13
|
+
#
|
14
|
+
factory :address do
|
15
|
+
zipcode '21088-0255'
|
16
|
+
lastname "Doe"
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<% content_for :page_title do %>
|
2
|
+
<%= t(:title, scope: 'solidus_paypal_braintree.configurations') %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<%= form_for :configurations, url: solidus_paypal_braintree.configurations_path do |f| %>
|
6
|
+
<% @configurations.each do |config| %>
|
7
|
+
<div class="row">
|
8
|
+
<fieldset>
|
9
|
+
<h1><%= config.store.name %></h1>
|
10
|
+
|
11
|
+
<%= f.fields_for 'configuration_fields[]', config do |c| %>
|
12
|
+
<div class="field">
|
13
|
+
<%= c.label :paypal %>
|
14
|
+
<%= c.check_box :paypal %>
|
15
|
+
</div>
|
16
|
+
<div class="field">
|
17
|
+
<%= c.label :apple_pay %>
|
18
|
+
<%= c.check_box :apple_pay %>
|
19
|
+
</div>
|
20
|
+
<div class="field">
|
21
|
+
<%= c.label :credit_card %>
|
22
|
+
<%= c.check_box :credit_card %>
|
23
|
+
</div>
|
24
|
+
<% end %>
|
25
|
+
</fieldset>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
28
|
+
|
29
|
+
<%= submit_tag %>
|
30
|
+
<% end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<% id = payment_method.id %>
|
2
|
+
|
3
|
+
<fieldset class="no-border-bottom braintree-hosted-fields" data-braintree-hosted-fields data-id="<%= id %>" data-payment-method-id="<%= id %>">
|
4
|
+
<div class="field" data-hook="previous_cards">
|
5
|
+
<% if previous_cards.any? %>
|
6
|
+
<% previous_cards.each do |card| %>
|
7
|
+
<label><%= radio_button_tag :card, card.id, card == previous_cards.first %> <%= card.display_number %><br /></label>
|
8
|
+
<% end %>
|
9
|
+
<label><%= radio_button_tag :card, "new", false, { id: "card_new#{id}" } %> <%= Spree.t(:use_new_cc) %></label>
|
10
|
+
<% end %>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div id="card_form<%= id %>" data-hook style="display: none;">
|
14
|
+
<%= render partial: "spree/shared/braintree_hosted_fields", locals: { id: id } %>
|
15
|
+
</div>
|
16
|
+
</fieldset>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<fieldset data-hook="credit_card">
|
2
|
+
<legend align="center"><%= SolidusPaypalBraintree::Gateway.model_name.human %></legend>
|
3
|
+
|
4
|
+
<div class="row">
|
5
|
+
<div class="alpha six columns">
|
6
|
+
<dl>
|
7
|
+
<dt><%= Spree.t(:identifier) %>:</dt>
|
8
|
+
<dd><%= payment.number %></dd>
|
9
|
+
|
10
|
+
<dt><%= Spree.t(:response_code) %>:</dt>
|
11
|
+
<dd><%= braintree_transaction_link(payment) %></dd>
|
12
|
+
|
13
|
+
<% if payment.source.token.present? %>
|
14
|
+
<dt><%= t('solidus_paypal_braintree.token') %>:</dt>
|
15
|
+
<dd><%= payment.source.token %></dd>
|
16
|
+
<% else %>
|
17
|
+
<dt><%= t('solidus_paypal_braintree.nonce') %>:</dt>
|
18
|
+
<dd><%= payment.source.nonce %></dd>
|
19
|
+
<% end %>
|
20
|
+
|
21
|
+
<dt><%= t('solidus_paypal_braintree.payment_type.label') %>:</dt>
|
22
|
+
<dd><%= payment.source.friendly_payment_type %></dd>
|
23
|
+
|
24
|
+
<% if payment.source.credit_card? %>
|
25
|
+
<dt><%= Spree::CreditCard.human_attribute_name(:card_type) %>:</dt>
|
26
|
+
<dd><%= payment.source.card_type %></dd>
|
27
|
+
|
28
|
+
<dt><%= Spree::CreditCard.human_attribute_name(:last_digits) %>:</dt>
|
29
|
+
<dd><%= payment.source.last_digits %></dd>
|
30
|
+
<% end %>
|
31
|
+
</dl>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</fieldset>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<% id = payment_method.id %>
|
2
|
+
|
3
|
+
<fieldset class="no-border-bottom braintree-hosted-fields" data-braintree-hosted-fields data-id="braintree" data-payment-method-id="<%= id %>">
|
4
|
+
<div class="field" data-hook="previous_cards">
|
5
|
+
<% if previous_cards.any? %>
|
6
|
+
<% previous_cards.each do |card| %>
|
7
|
+
<label><%= radio_button_tag :card, card.id, card == previous_cards.first %> <%= card.display_number %><br /></label>
|
8
|
+
<% end %>
|
9
|
+
<label><%= radio_button_tag :card, "new", false, { id: "card_new#{id}" } %> <%= Spree.t(:use_new_cc) %></label>
|
10
|
+
<% end %>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div id="card_form<%= id %>" data-hook style="display: none;">
|
14
|
+
<%= render partial: "spree/shared/braintree_hosted_fields", locals: { id: id } %>
|
15
|
+
</div>
|
16
|
+
</fieldset>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<% address = current_order.ship_address %>
|
2
|
+
<% id = payment_method.id %>
|
3
|
+
|
4
|
+
<% content_for :head do %>
|
5
|
+
<%= javascript_include_tag "spree/checkout/braintree" %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<% if current_store.braintree_configuration.paypal? %>
|
9
|
+
<script src="https://www.paypalobjects.com/api/button.js?"
|
10
|
+
data-merchant="braintree"
|
11
|
+
data-id="paypal-button"
|
12
|
+
data-button="checkout"
|
13
|
+
data-color="blue"
|
14
|
+
data-size="medium"
|
15
|
+
data-shape="pill"
|
16
|
+
data-button_type="button"
|
17
|
+
data-button_disabled="true"
|
18
|
+
></script>
|
19
|
+
|
20
|
+
<script>
|
21
|
+
var address = {
|
22
|
+
line1: '<%= address.address1 %>',
|
23
|
+
line2: '<%= address.address2 %>',
|
24
|
+
city: '<%= address.city %>',
|
25
|
+
state: '<%= address.state.name %>',
|
26
|
+
postalCode: '<%= address.zipcode %>',
|
27
|
+
countryCode: '<%= address.country.iso %>',
|
28
|
+
phone: '<%= address.phone %>',
|
29
|
+
recipientName: '<%= "#{address.firstname} #{address.lastname}" %>'
|
30
|
+
}
|
31
|
+
|
32
|
+
$.when(
|
33
|
+
$.getScript("https://js.braintreegateway.com/web/3.9.0/js/client.min.js"),
|
34
|
+
$.getScript("https://js.braintreegateway.com/web/3.9.0/js/paypal.min.js"),
|
35
|
+
$.getScript("https://js.braintreegateway.com/web/3.9.0/js/data-collector.min.js")
|
36
|
+
).done(function() {
|
37
|
+
var button = new PaypalButton(document.querySelector("#paypal-button"));
|
38
|
+
button.initialize({
|
39
|
+
flow: 'vault',
|
40
|
+
enableShippingAddress: true,
|
41
|
+
shippingAddressOverride: address,
|
42
|
+
shippingAddressEditable: false
|
43
|
+
});
|
44
|
+
});
|
45
|
+
</script>
|
46
|
+
<% end %>
|
47
|
+
|
48
|
+
<% if current_store.braintree_configuration.credit_card? %>
|
49
|
+
<fieldset class="braintree-hosted-fields" data-braintree-hosted-fields data-id="<%= id %>">
|
50
|
+
<%= render "spree/shared/braintree_hosted_fields", id: id %>
|
51
|
+
</fieldset>
|
52
|
+
<% end %>
|
metadata
ADDED
@@ -0,0 +1,350 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: solidus_paypal_braintree
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Stembolt
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-07-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: solidus
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '3'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.0'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '3'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: solidus_support
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: braintree
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '2.65'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '2.65'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: capybara
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: capybara-screenshot
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: launchy
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: poltergeist
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: coffee-rails
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: sass-rails
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
145
|
+
- !ruby/object:Gem::Dependency
|
146
|
+
name: database_cleaner
|
147
|
+
requirement: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0'
|
152
|
+
type: :development
|
153
|
+
prerelease: false
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: factory_girl
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '0'
|
173
|
+
- !ruby/object:Gem::Dependency
|
174
|
+
name: rspec-rails
|
175
|
+
requirement: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '0'
|
180
|
+
type: :development
|
181
|
+
prerelease: false
|
182
|
+
version_requirements: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
187
|
+
- !ruby/object:Gem::Dependency
|
188
|
+
name: rubocop
|
189
|
+
requirement: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - ">="
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: '0.47'
|
194
|
+
type: :development
|
195
|
+
prerelease: false
|
196
|
+
version_requirements: !ruby/object:Gem::Requirement
|
197
|
+
requirements:
|
198
|
+
- - ">="
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: '0.47'
|
201
|
+
- !ruby/object:Gem::Dependency
|
202
|
+
name: rubocop-rspec
|
203
|
+
requirement: !ruby/object:Gem::Requirement
|
204
|
+
requirements:
|
205
|
+
- - ">="
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
version: '0'
|
208
|
+
type: :development
|
209
|
+
prerelease: false
|
210
|
+
version_requirements: !ruby/object:Gem::Requirement
|
211
|
+
requirements:
|
212
|
+
- - ">="
|
213
|
+
- !ruby/object:Gem::Version
|
214
|
+
version: '0'
|
215
|
+
- !ruby/object:Gem::Dependency
|
216
|
+
name: simplecov
|
217
|
+
requirement: !ruby/object:Gem::Requirement
|
218
|
+
requirements:
|
219
|
+
- - ">="
|
220
|
+
- !ruby/object:Gem::Version
|
221
|
+
version: '0'
|
222
|
+
type: :development
|
223
|
+
prerelease: false
|
224
|
+
version_requirements: !ruby/object:Gem::Requirement
|
225
|
+
requirements:
|
226
|
+
- - ">="
|
227
|
+
- !ruby/object:Gem::Version
|
228
|
+
version: '0'
|
229
|
+
- !ruby/object:Gem::Dependency
|
230
|
+
name: sqlite3
|
231
|
+
requirement: !ruby/object:Gem::Requirement
|
232
|
+
requirements:
|
233
|
+
- - ">="
|
234
|
+
- !ruby/object:Gem::Version
|
235
|
+
version: '0'
|
236
|
+
type: :development
|
237
|
+
prerelease: false
|
238
|
+
version_requirements: !ruby/object:Gem::Requirement
|
239
|
+
requirements:
|
240
|
+
- - ">="
|
241
|
+
- !ruby/object:Gem::Version
|
242
|
+
version: '0'
|
243
|
+
- !ruby/object:Gem::Dependency
|
244
|
+
name: webmock
|
245
|
+
requirement: !ruby/object:Gem::Requirement
|
246
|
+
requirements:
|
247
|
+
- - ">="
|
248
|
+
- !ruby/object:Gem::Version
|
249
|
+
version: '0'
|
250
|
+
type: :development
|
251
|
+
prerelease: false
|
252
|
+
version_requirements: !ruby/object:Gem::Requirement
|
253
|
+
requirements:
|
254
|
+
- - ">="
|
255
|
+
- !ruby/object:Gem::Version
|
256
|
+
version: '0'
|
257
|
+
- !ruby/object:Gem::Dependency
|
258
|
+
name: vcr
|
259
|
+
requirement: !ruby/object:Gem::Requirement
|
260
|
+
requirements:
|
261
|
+
- - ">="
|
262
|
+
- !ruby/object:Gem::Version
|
263
|
+
version: '0'
|
264
|
+
type: :development
|
265
|
+
prerelease: false
|
266
|
+
version_requirements: !ruby/object:Gem::Requirement
|
267
|
+
requirements:
|
268
|
+
- - ">="
|
269
|
+
- !ruby/object:Gem::Version
|
270
|
+
version: '0'
|
271
|
+
description: Uses the javascript API for seamless braintree payments
|
272
|
+
email: braintree+gemfile@stembolt.com
|
273
|
+
executables: []
|
274
|
+
extensions: []
|
275
|
+
extra_rdoc_files: []
|
276
|
+
files:
|
277
|
+
- LICENSE
|
278
|
+
- README.md
|
279
|
+
- Rakefile
|
280
|
+
- app/assets/javascripts/spree/backend/solidus_paypal_braintree.js
|
281
|
+
- app/assets/javascripts/spree/braintree_hosted_form.js
|
282
|
+
- app/assets/javascripts/spree/checkout/braintree.js
|
283
|
+
- app/assets/javascripts/spree/frontend/paypal_button.js
|
284
|
+
- app/assets/javascripts/spree/frontend/solidus_paypal_braintree.js
|
285
|
+
- app/assets/stylesheets/spree/backend/solidus_paypal_braintree.scss
|
286
|
+
- app/assets/stylesheets/spree/frontend/solidus_paypal_braintree.css
|
287
|
+
- app/controllers/solidus_paypal_braintree/client_tokens_controller.rb
|
288
|
+
- app/helpers/braintree_admin_helper.rb
|
289
|
+
- app/models/application_record.rb
|
290
|
+
- app/models/solidus_paypal_braintree/configuration.rb
|
291
|
+
- app/models/solidus_paypal_braintree/customer.rb
|
292
|
+
- app/models/solidus_paypal_braintree/gateway.rb
|
293
|
+
- app/models/solidus_paypal_braintree/response.rb
|
294
|
+
- app/models/solidus_paypal_braintree/source.rb
|
295
|
+
- app/models/solidus_paypal_braintree/transaction.rb
|
296
|
+
- app/models/solidus_paypal_braintree/transaction_address.rb
|
297
|
+
- app/models/solidus_paypal_braintree/transaction_import.rb
|
298
|
+
- app/models/spree/store_decorator.rb
|
299
|
+
- app/overrides/admin_navigation_menu.rb
|
300
|
+
- app/views/spree/shared/_braintree_hosted_fields.html.erb
|
301
|
+
- config/initializers/braintree.rb
|
302
|
+
- config/locales/en.yml
|
303
|
+
- config/routes.rb
|
304
|
+
- db/migrate/20160830061749_create_solidus_paypal_braintree_sources.rb
|
305
|
+
- db/migrate/20160906201711_create_solidus_paypal_braintree_customers.rb
|
306
|
+
- db/migrate/20161114231422_create_solidus_paypal_braintree_configurations.rb
|
307
|
+
- db/migrate/20161125172005_add_braintree_configuration_to_stores.rb
|
308
|
+
- db/migrate/20170203191030_add_credit_card_to_braintree_configuration.rb
|
309
|
+
- db/migrate/20170505193712_add_null_constraint_to_sources.rb
|
310
|
+
- db/migrate/20170508085402_add_not_null_constraint_to_sources_payment_type.rb
|
311
|
+
- lib/controllers/backend/solidus_paypal_braintree/configurations_controller.rb
|
312
|
+
- lib/controllers/frontend/solidus_paypal_braintree/checkouts_controller.rb
|
313
|
+
- lib/controllers/frontend/solidus_paypal_braintree/transactions_controller.rb
|
314
|
+
- lib/generators/solidus_paypal_braintree/install/install_generator.rb
|
315
|
+
- lib/solidus_paypal_braintree.rb
|
316
|
+
- lib/solidus_paypal_braintree/country_mapper.rb
|
317
|
+
- lib/solidus_paypal_braintree/engine.rb
|
318
|
+
- lib/solidus_paypal_braintree/factories.rb
|
319
|
+
- lib/solidus_paypal_braintree/version.rb
|
320
|
+
- lib/views/backend/solidus_paypal_braintree/configurations/_admin_tab.html.erb
|
321
|
+
- lib/views/backend/solidus_paypal_braintree/configurations/list.html.erb
|
322
|
+
- lib/views/backend/spree/admin/payments/source_forms/_paypal_braintree.html.erb
|
323
|
+
- lib/views/backend/spree/admin/payments/source_views/_paypal_braintree.html.erb
|
324
|
+
- lib/views/backend_v1.2/spree/admin/payments/source_forms/_paypal_braintree.html.erb
|
325
|
+
- lib/views/frontend/spree/checkout/payment/_paypal_braintree.html.erb
|
326
|
+
homepage: https://stembolt.com
|
327
|
+
licenses:
|
328
|
+
- BSD-3-Clause
|
329
|
+
metadata: {}
|
330
|
+
post_install_message:
|
331
|
+
rdoc_options: []
|
332
|
+
require_paths:
|
333
|
+
- lib
|
334
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
335
|
+
requirements:
|
336
|
+
- - ">="
|
337
|
+
- !ruby/object:Gem::Version
|
338
|
+
version: '0'
|
339
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
340
|
+
requirements:
|
341
|
+
- - ">="
|
342
|
+
- !ruby/object:Gem::Version
|
343
|
+
version: '0'
|
344
|
+
requirements: []
|
345
|
+
rubyforge_project:
|
346
|
+
rubygems_version: 2.6.12
|
347
|
+
signing_key:
|
348
|
+
specification_version: 4
|
349
|
+
summary: Officially supported Paypal/Braintree extension
|
350
|
+
test_files: []
|