trado_paypal_module 0.9.2 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6994774797490f1c9b8064484ee5444a0dfae26a
4
- data.tar.gz: 18dbe00e0388f77f3d43a1086f155a2768b54830
3
+ metadata.gz: 876a5834632bb269a5ef0ecbc5af43e29d53fb63
4
+ data.tar.gz: b7b60282b1feac30e91df0d949d8e13d0bf6f19c
5
5
  SHA512:
6
- metadata.gz: dc3ec614aca3b71b01e0440f084c3a2cac826c4e9acd243b9ed47accba382127193752c5b550bfb79401ea5de6a6e3fae74525561d83191987ae708e9a7f0950
7
- data.tar.gz: fc1d1fef97b3392225be31224e53dd6d31e430faeaf777b504579ef72d5f8b59159b81ab883f58b9677277d0838100beec4f09ee6df867a43b2141312d740600
6
+ metadata.gz: 35e5e3d7db442b429e7e4e399b2382f47b9c98a3761b3f70a87bdcefdcdb9867984d474b87a57fdfb855d4673663a4cd06942adfa8b6660936da6288b5910563
7
+ data.tar.gz: 27b7965a1ed04f114f4268511a7ecfff4b6250c4d574a4452f0aedfc996616c237e98a2c466cd1ee36ef0e4881bf768d4b762a59ad3b24cae0147d43e96f7810
data/README.md CHANGED
@@ -19,7 +19,7 @@ Then run bundle to install the Gem:
19
19
  bundle install
20
20
  ```
21
21
 
22
- Now generate migrations, create helpers, set up environment configurations and assign model concerns:
22
+ Now generate migrations, set up environment configurations and assign model concerns:
23
23
 
24
24
  ```sh
25
25
  rails generate trado_paypal_module:install
@@ -44,6 +44,12 @@ production:
44
44
  ```
45
45
  *(You can sign up for a PayPal developer account at the [developer dashboard](https://developer.paypal.com))*
46
46
 
47
+ You can also customise the HTML for the PayPal fields in your checkout:
48
+
49
+ ```sh
50
+ rails generate trado_stripe_module:views
51
+ ```
52
+
47
53
  Restart the main application server:
48
54
 
49
55
  ```sh
@@ -0,0 +1,8 @@
1
+ module PaypalHelper
2
+
3
+ def paypal_checkout_fields f
4
+ render "themes/#{Store.settings.theme.name}/carts/paypal_checkout_fields", format: [:html], f: f
5
+ rescue ActionView::MissingTemplate
6
+ render 'carts/paypal_checkout_fields', format: [:html], f: f
7
+ end
8
+ end
@@ -0,0 +1,4 @@
1
+ <div class='paypal-form-wrapper'>
2
+ <%= f.radio_button(:payment_type, 'paypal', checked: true) %>
3
+ <%= image_tag('paypal-icon.png') %>
4
+ </div>
@@ -10,10 +10,6 @@ module TradoPaypalModule
10
10
  end
11
11
  end
12
12
 
13
- def copy_helper
14
- template "helper.rb", "app/helpers/paypal_helper.rb"
15
- end
16
-
17
13
  def copy_controller
18
14
  template "controller.rb", "app/controllers/carts/paypal_controller.rb"
19
15
  end
@@ -0,0 +1,12 @@
1
+ module TradoPaypalModule
2
+ module Generators
3
+ class ViewsGenerator < Rails::Generators::Base
4
+ source_root File.expand_path("../../../../app/views", __FILE__)
5
+
6
+ def copy_views
7
+ copy_file 'carts/_paypal_checkout_fields.html.erb', "app/views/themes/#{Store.settings.theme.name}/carts/_paypal_checkout_fields.html.erb"
8
+ puts "Copied to your #{Store.settings.theme.name} theme!"
9
+ end
10
+ end
11
+ end
12
+ end
@@ -1,3 +1,3 @@
1
1
  module TradoPaypalModule
2
- VERSION = "0.9.2"
2
+ VERSION = "0.12.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trado_paypal_module
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Dallimore
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-02 00:00:00.000000000 Z
11
+ date: 2016-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -64,11 +64,14 @@ files:
64
64
  - Rakefile
65
65
  - app/controllers/trado_paypal_module/ipn_controller.rb
66
66
  - app/controllers/trado_paypal_module/paypal_controller.rb
67
+ - app/helpers/paypal_helper.rb
68
+ - app/views/carts/_paypal_checkout_fields.html.erb
67
69
  - config/routes.rb
68
70
  - lib/generators/templates/controller.rb
69
71
  - lib/generators/templates/helper.rb
70
72
  - lib/generators/templates/migration.rb
71
73
  - lib/generators/trado_paypal_module/install_generator.rb
74
+ - lib/generators/trado_paypal_module/views_generator.rb
72
75
  - lib/tasks/trado_paypal_module_tasks.rake
73
76
  - lib/trado_paypal_module.rb
74
77
  - lib/trado_paypal_module/active_record.rb