solidus_paypal_commerce_platform 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +56 -2
- data/app/controllers/solidus_paypal_commerce_platform/orders_controller.rb +2 -1
- data/app/decorators/models/solidus_paypal_commerce_platform/spree/address_decorator.rb +17 -0
- data/app/jobs/solidus_paypal_commerce_platform/webhook_job.rb +3 -3
- data/app/models/solidus_paypal_commerce_platform/payment_method.rb +2 -1
- data/app/models/solidus_paypal_commerce_platform/paypal_order.rb +3 -3
- data/app/models/solidus_paypal_commerce_platform/pricing_options.rb +1 -1
- data/app/models/solidus_paypal_commerce_platform/state_guesser.rb +1 -1
- data/lib/solidus_paypal_commerce_platform/version.rb +1 -1
- data/lib/views/frontend/solidus_paypal_commerce_platform/shared/_javascript_sdk_tag.html.erb +3 -1
- data/solidus_paypal_commerce_platform.gemspec +1 -1
- data/spec/features/frontend/cart_spec.rb +6 -0
- data/spec/features/frontend/checkout_spec.rb +6 -0
- data/spec/features/frontend/product_spec.rb +6 -0
- data/spec/lib/solidus_paypal_commerce_platform/client_spec.rb +1 -1
- data/spec/lib/solidus_paypal_commerce_platform/configuration_spec.rb +4 -4
- data/spec/requests/solidus_paypal_commerce_platform/shipping_rates_controller_spec.rb +3 -3
- metadata +13 -7
- data/app/decorators/solidus_paypal_commerce_platform/remove_required_phone_from_address.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 779847e688c91abf5ee4a98964d82b04023ffe9f76942e6496931b46400e5a01
|
4
|
+
data.tar.gz: d544f13ab4f42442259769e8fc2fac803404cc65a7bd12d63e7b0063aee949e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce32213a28c24dec07afd333855cc662364b8349e96c4438cec4e49842cfd08dc9c0714dc7de6b35a73f3dd3ea8afb92e19dfcd36e4f15f98af88cb5064d81c3
|
7
|
+
data.tar.gz: c6a4c2f4aae95fe12110c47fe16479e485835702e3f334f472458b7192268e6969fd515b1222408d8287c4af2c25014afaafdc61482811fd43dc96ea9a2fbaa6
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,31 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [
|
3
|
+
## [v0.2.1](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/tree/v0.2.1) (2020-11-09)
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/compare/v0.
|
5
|
+
[Full Changelog](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/compare/v0.2.0...v0.2.1)
|
6
|
+
|
7
|
+
**Closed issues:**
|
8
|
+
|
9
|
+
- There was a problem connecting with paypal. [\#107](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/107)
|
10
|
+
- Bad Request \(400\) when opening PayPal Payment Popup \(eg clicking Pay with PayPal during checkout\) [\#103](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/103)
|
11
|
+
|
12
|
+
**Merged pull requests:**
|
13
|
+
|
14
|
+
- Move and rename address decorator [\#111](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/pull/111) ([seand7565](https://github.com/seand7565))
|
15
|
+
- Constrain solidus\_support to 0.5.1 or greater [\#110](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/pull/110) ([seand7565](https://github.com/seand7565))
|
16
|
+
- Add currency to PayPal SDK URL [\#108](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/pull/108) ([seand7565](https://github.com/seand7565))
|
17
|
+
- Update specs to comply with new rubocop regulations [\#106](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/pull/106) ([seand7565](https://github.com/seand7565))
|
18
|
+
- Add address only to initial PayPal request [\#105](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/pull/105) ([seand7565](https://github.com/seand7565))
|
19
|
+
|
20
|
+
## [v0.2.0](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/tree/v0.2.0) (2020-10-13)
|
21
|
+
|
22
|
+
[Full Changelog](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/compare/v0.1.0...v0.2.0)
|
23
|
+
|
24
|
+
**Closed issues:**
|
25
|
+
|
26
|
+
- README lists two different types of PayPal credentials [\#97](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/97)
|
27
|
+
- `paypal\_email\_confirmed` is not an actual preference [\#96](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/96)
|
28
|
+
- Make this extension the default option for Solidus [\#88](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/88)
|
6
29
|
|
7
30
|
**Merged pull requests:**
|
8
31
|
|
@@ -31,6 +54,8 @@
|
|
31
54
|
|
32
55
|
**Implemented enhancements:**
|
33
56
|
|
57
|
+
- Frontend users should be able to check out using PayPal [\#6](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/6)
|
58
|
+
- Admin users should be able to style the PayPal buttons on the payment\_method show page [\#5](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/5)
|
34
59
|
- Webhooks [\#83](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/pull/83) ([elia](https://github.com/elia))
|
35
60
|
- Display paypal email to customer on confirmation [\#54](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/pull/54) ([seand7565](https://github.com/seand7565))
|
36
61
|
- Use an env accessor to control live/sandbox urls and classes [\#31](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/pull/31) ([elia](https://github.com/elia))
|
@@ -38,10 +63,39 @@
|
|
38
63
|
|
39
64
|
**Fixed bugs:**
|
40
65
|
|
66
|
+
- Users can check out with invalid payment [\#19](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/19)
|
41
67
|
- Have different nonce for every click of the wizard button [\#87](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/pull/87) ([elia](https://github.com/elia))
|
42
68
|
- Correctly communicate errors when updating shipping rates [\#86](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/pull/86) ([elia](https://github.com/elia))
|
43
69
|
- Add deface to deps [\#57](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/pull/57) ([elia](https://github.com/elia))
|
44
70
|
|
71
|
+
**Closed issues:**
|
72
|
+
|
73
|
+
- Add something to the README about backend payments [\#75](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/75)
|
74
|
+
- Explore enabling the payment method by default [\#71](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/71)
|
75
|
+
- Explore subscribing to webhooks [\#70](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/70)
|
76
|
+
- We're using the wrong ID for paypal\_order\_id [\#69](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/69)
|
77
|
+
- Handle instrument declined errors [\#68](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/68)
|
78
|
+
- Extend lightbox during customer payment [\#63](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/63)
|
79
|
+
- Add this extension to demo store for integration team walkthrough [\#49](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/49)
|
80
|
+
- Store PayPal Debug ID [\#48](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/48)
|
81
|
+
- PayPal email address needs to be included on the confirm step [\#47](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/47)
|
82
|
+
- Digital goods should be set as not requiring shipment [\#46](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/46)
|
83
|
+
- Allow checkout on product/cart page to complete the order [\#44](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/44)
|
84
|
+
- PayPal uses different states than Solidus for some countries [\#38](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/38)
|
85
|
+
- Validate amount charged with PayPal [\#37](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/37)
|
86
|
+
- Allow order simulator to be a configurable class [\#36](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/36)
|
87
|
+
- Admin users have the option to edit payment amount [\#29](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/29)
|
88
|
+
- Add PayPal button to product page [\#27](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/27)
|
89
|
+
- Add PayPal button to cart page [\#26](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/26)
|
90
|
+
- Add `commit=false` to javascript SDK URL [\#18](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/18)
|
91
|
+
- Explore using Rails secrets to encode and decrypt PayPal client id and secret [\#17](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/17)
|
92
|
+
- Backend users should be able to checkout & admin payments [\#15](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/15)
|
93
|
+
- Change static sandbox URL and objects to dynamic [\#14](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/14)
|
94
|
+
- PayPal response address change [\#13](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/13)
|
95
|
+
- Ensure the email is verified before activating the payment method [\#9](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/9)
|
96
|
+
- Add a URL generator for the PayPal JS SDK [\#8](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/8)
|
97
|
+
- Allow users to onboard with PayPal [\#1](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/issues/1)
|
98
|
+
|
45
99
|
**Merged pull requests:**
|
46
100
|
|
47
101
|
- Use live partner ids [\#85](https://github.com/solidusio-contrib/solidus_paypal_commerce_platform/pull/85) ([elia](https://github.com/elia))
|
@@ -11,7 +11,8 @@ module SolidusPaypalCommercePlatform
|
|
11
11
|
|
12
12
|
@order = ::Spree::Order.create!(
|
13
13
|
user: try_spree_current_user,
|
14
|
-
store: current_store
|
14
|
+
store: current_store,
|
15
|
+
currency: current_pricing_options.currency
|
15
16
|
)
|
16
17
|
|
17
18
|
if @order.contents.update_cart order_params
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SolidusPaypalCommercePlatform
|
4
|
+
module Spree
|
5
|
+
module AddressDecorator
|
6
|
+
# PayPal doesn't use the phone number, so in cases where the user checks out via
|
7
|
+
# PayPal, this field will be unpopulated. If you want to require phone numbers,
|
8
|
+
# you'll need to turn off cart & product page displays on the payment method edit
|
9
|
+
# page.
|
10
|
+
def require_phone?
|
11
|
+
super && false
|
12
|
+
end
|
13
|
+
|
14
|
+
::Spree::Address.prepend self
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -6,15 +6,15 @@ module SolidusPaypalCommercePlatform
|
|
6
6
|
case payload["resource_type"]
|
7
7
|
when "checkout-order"
|
8
8
|
payment_source = PaymentSource.find_by!(paypal_order_id: payload.dig("resource", "id"))
|
9
|
-
payment = Spree::Payment.where(source: payment_source).last!
|
9
|
+
payment = ::Spree::Payment.where(source: payment_source).last!
|
10
10
|
payment.log_entries.create!(details: payload.to_yaml)
|
11
11
|
when "capture"
|
12
12
|
payment_source = PaymentSource.find_by!(capture_id: payload.dig("resource", "id"))
|
13
|
-
payment = Spree::Payment.where(source: payment_source).last!
|
13
|
+
payment = ::Spree::Payment.where(source: payment_source).last!
|
14
14
|
payment.log_entries.create!(details: payload.to_yaml)
|
15
15
|
when "refund"
|
16
16
|
payment_source = PaymentSource.find_by!(refund_id: payload.dig("resource", "id"))
|
17
|
-
payment = Spree::Payment.where(source: payment_source).last!
|
17
|
+
payment = ::Spree::Payment.where(source: payment_source).last!
|
18
18
|
payment.log_entries.create!(details: payload.to_yaml)
|
19
19
|
end
|
20
20
|
end
|
@@ -58,7 +58,7 @@ module SolidusPaypalCommercePlatform
|
|
58
58
|
}
|
59
59
|
end
|
60
60
|
|
61
|
-
def javascript_sdk_url(order: nil)
|
61
|
+
def javascript_sdk_url(order: nil, currency: nil)
|
62
62
|
# Both instance and class respond to checkout_steps.
|
63
63
|
step_names = order ? order.checkout_steps : ::Spree::Order.checkout_steps.keys
|
64
64
|
|
@@ -69,6 +69,7 @@ module SolidusPaypalCommercePlatform
|
|
69
69
|
intent: auto_capture ? "capture" : "authorize",
|
70
70
|
commit: commit_immediately ? "false" : "true",
|
71
71
|
components: options[:display_credit_messaging] ? "buttons,messages" : "buttons",
|
72
|
+
currency: currency
|
72
73
|
}
|
73
74
|
|
74
75
|
"https://www.paypal.com/sdk/js?#{parameters.to_query}"
|
@@ -18,7 +18,7 @@ module SolidusPaypalCommercePlatform
|
|
18
18
|
{
|
19
19
|
op: 'replace',
|
20
20
|
path: '/purchase_units/@reference_id==\'default\'',
|
21
|
-
value: purchase_units[0]
|
21
|
+
value: purchase_units(include_shipping_address: false)[0]
|
22
22
|
}
|
23
23
|
end
|
24
24
|
|
@@ -50,12 +50,12 @@ module SolidusPaypalCommercePlatform
|
|
50
50
|
}
|
51
51
|
end
|
52
52
|
|
53
|
-
def purchase_units
|
53
|
+
def purchase_units(include_shipping_address: true)
|
54
54
|
[
|
55
55
|
{
|
56
56
|
amount: amount,
|
57
57
|
items: line_items,
|
58
|
-
shipping: (shipping_info if @order.ship_address)
|
58
|
+
shipping: (shipping_info if @order.ship_address && include_shipping_address)
|
59
59
|
}
|
60
60
|
]
|
61
61
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module SolidusPaypalCommercePlatform
|
4
|
-
class PricingOptions < Spree::Variant::PricingOptions
|
4
|
+
class PricingOptions < ::Spree::Variant::PricingOptions
|
5
5
|
def cache_key
|
6
6
|
SolidusPaypalCommercePlatform::PaymentMethod.active.map(&:cache_key_with_version).sort + [super]
|
7
7
|
end
|
data/lib/views/frontend/solidus_paypal_commerce_platform/shared/_javascript_sdk_tag.html.erb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
+
<% currency = @order ? @order.currency : current_pricing_options.currency %>
|
2
|
+
|
1
3
|
<script
|
2
|
-
src="<%= payment_method.javascript_sdk_url(order: @order) %>"
|
4
|
+
src="<%= payment_method.javascript_sdk_url(order: @order, currency: currency) %>"
|
3
5
|
data-partner-attribution-id="<%= SolidusPaypalCommercePlatform.config.partner_code %>">
|
4
6
|
</script>
|
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
|
31
31
|
spec.add_dependency 'deface', '~> 1.5'
|
32
32
|
spec.add_dependency 'solidus_core', ['>= 2.0.0', '< 3']
|
33
|
-
spec.add_dependency 'solidus_support',
|
33
|
+
spec.add_dependency 'solidus_support', [">= 0.5.1", "< 1"]
|
34
34
|
spec.add_dependency 'solidus_webhooks', '~> 0.2.0'
|
35
35
|
|
36
36
|
spec.add_dependency 'paypal-checkout-sdk'
|
@@ -27,6 +27,12 @@ RSpec.describe "Cart page" do
|
|
27
27
|
expect(js_sdk_script_partner_id).to eq("Solidus_PCP_SP")
|
28
28
|
end
|
29
29
|
|
30
|
+
it "generates a URL with the correct currency" do
|
31
|
+
allow(order).to receive(:currency).and_return "EUR"
|
32
|
+
visit '/cart'
|
33
|
+
expect(js_sdk_script_query).to include("currency=EUR")
|
34
|
+
end
|
35
|
+
|
30
36
|
context "when auto-capture is set to true" do
|
31
37
|
it "generates a url with intent capture" do
|
32
38
|
paypal_payment_method.update(auto_capture: true)
|
@@ -28,6 +28,12 @@ RSpec.describe "Checkout" do
|
|
28
28
|
expect(js_sdk_script_partner_id).to eq("Solidus_PCP_SP")
|
29
29
|
end
|
30
30
|
|
31
|
+
it "generates a URL with the correct currency" do
|
32
|
+
allow(order).to receive(:currency).and_return "EUR"
|
33
|
+
visit '/checkout/payment'
|
34
|
+
expect(js_sdk_script_query).to include("currency=EUR")
|
35
|
+
end
|
36
|
+
|
31
37
|
context "when auto-capture is set to true" do
|
32
38
|
it "generates a url with intent capture" do
|
33
39
|
paypal_payment_method.update(auto_capture: true)
|
@@ -23,6 +23,12 @@ RSpec.describe "Product page", js: true do
|
|
23
23
|
expect(js_sdk_script_partner_id).to eq("Solidus_PCP_SP")
|
24
24
|
end
|
25
25
|
|
26
|
+
it "generates a URL with the correct currency" do
|
27
|
+
allow_any_instance_of(SolidusPaypalCommercePlatform::PricingOptions).to receive(:currency).and_return "EUR"
|
28
|
+
visit "/products/#{product.slug}"
|
29
|
+
expect(js_sdk_script_query).to include("currency=EUR")
|
30
|
+
end
|
31
|
+
|
26
32
|
context "when auto-capture is set to true" do
|
27
33
|
it "generates a url with intent capture" do
|
28
34
|
paypal_payment_method.update(auto_capture: true)
|
@@ -10,7 +10,7 @@ RSpec.describe SolidusPaypalCommercePlatform::Client do
|
|
10
10
|
let(:status_code) { 201 }
|
11
11
|
|
12
12
|
it 'forwards to the upstream client adding i18n response messages' do
|
13
|
-
|
13
|
+
allow_any_instance_of(PayPal::PayPalHttpClient)
|
14
14
|
.to receive(:execute).with(paypal_request).and_return(paypal_response)
|
15
15
|
|
16
16
|
response = subject.execute_with_response(paypal_request)
|
@@ -12,16 +12,16 @@ RSpec.describe SolidusPaypalCommercePlatform::Configuration do
|
|
12
12
|
it "falls back to Rails.env if ENV['PAYPAL_ENV'] is not set" do
|
13
13
|
expect(ENV).to receive(:[]).with("PAYPAL_ENV").and_return(nil).at_least(:once)
|
14
14
|
|
15
|
-
|
15
|
+
allow(Rails).to receive(:env).and_return("development".inquiry)
|
16
16
|
expect(subject.default_env).to eq("sandbox")
|
17
17
|
|
18
|
-
|
18
|
+
allow(Rails).to receive(:env).and_return("test".inquiry)
|
19
19
|
expect(subject.default_env).to eq("sandbox")
|
20
20
|
|
21
|
-
|
21
|
+
allow(Rails).to receive(:env).and_return("production".inquiry)
|
22
22
|
expect(subject.default_env).to eq("live")
|
23
23
|
|
24
|
-
|
24
|
+
allow(Rails).to receive(:env).and_return("staging".inquiry)
|
25
25
|
expect{ subject.default_env }.to raise_error(described_class::InvalidEnvironment)
|
26
26
|
end
|
27
27
|
end
|
@@ -23,9 +23,9 @@ RSpec.describe SolidusPaypalCommercePlatform::ShippingRatesController, type: :re
|
|
23
23
|
}
|
24
24
|
end
|
25
25
|
|
26
|
-
it "returns a paypal_order
|
27
|
-
expect(response.body).
|
28
|
-
expect(response.body).not_to include order.ship_address.state.abbr
|
26
|
+
it "returns a paypal_order without the simulated address" do
|
27
|
+
expect(response.body).not_to include "admin_area_1\":\"#{new_address.state.abbr}\""
|
28
|
+
expect(response.body).not_to include "admin_area_1\":\"#{order.ship_address.state.abbr}\""
|
29
29
|
end
|
30
30
|
|
31
31
|
it "does not modify original address" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_paypal_commerce_platform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Denny
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-11-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: deface
|
@@ -49,16 +49,22 @@ dependencies:
|
|
49
49
|
name: solidus_support
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.5.1
|
55
|
+
- - "<"
|
53
56
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
57
|
+
version: '1'
|
55
58
|
type: :runtime
|
56
59
|
prerelease: false
|
57
60
|
version_requirements: !ruby/object:Gem::Requirement
|
58
61
|
requirements:
|
59
|
-
- - "
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 0.5.1
|
65
|
+
- - "<"
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
67
|
+
version: '1'
|
62
68
|
- !ruby/object:Gem::Dependency
|
63
69
|
name: solidus_webhooks
|
64
70
|
requirement: !ruby/object:Gem::Requirement
|
@@ -147,7 +153,7 @@ files:
|
|
147
153
|
- app/controllers/solidus_paypal_commerce_platform/paypal_orders_controller.rb
|
148
154
|
- app/controllers/solidus_paypal_commerce_platform/shipping_rates_controller.rb
|
149
155
|
- app/controllers/solidus_paypal_commerce_platform/wizard_controller.rb
|
150
|
-
- app/decorators/solidus_paypal_commerce_platform/
|
156
|
+
- app/decorators/models/solidus_paypal_commerce_platform/spree/address_decorator.rb
|
151
157
|
- app/helpers/solidus_paypal_commerce_platform/button_options_helper.rb
|
152
158
|
- app/jobs/solidus_paypal_commerce_platform/application_job.rb
|
153
159
|
- app/jobs/solidus_paypal_commerce_platform/webhook_job.rb
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module RemoveRequiredPhoneFromAddress
|
4
|
-
# PayPal doesn't use the phone number, so in cases where the user checks out via
|
5
|
-
# PayPal, this field will be unpopulated. If you want to require phone numbers,
|
6
|
-
# you'll need to turn off cart & product page displays on the payment method edit
|
7
|
-
# page.
|
8
|
-
def require_phone?
|
9
|
-
super && false
|
10
|
-
end
|
11
|
-
|
12
|
-
::Spree::Address.prepend self
|
13
|
-
end
|