workarea-paypal 2.0.11 → 2.0.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb461fa4a26a3e893172087b72ef906458026cbfff783499835c16a68bb7b53d
4
- data.tar.gz: 125d2faf78909e21650b8f952b97bd2ad6e2d3571b86c9f15d0929d93b1ade8c
3
+ metadata.gz: 56a09d91218ed3f26af740d2452a11f318b20883b3d81232b0d6fc930f4eacdc
4
+ data.tar.gz: 55a0ee63c4306a9b5011c9415177173599bf0274910fd32ed7ee8a4e458871c0
5
5
  SHA512:
6
- metadata.gz: d1054d274b3657424751b7319fad84b9a387bfa71a3f9e1324dfa989207ee6bc34cf6d36d0ecb5d2204157171cedb5b8f70b8fbaaa760b3f4a926cb3bc45f29c
7
- data.tar.gz: 445f49f7c4bec4ac4ea712360325bffaeb6806ffd4a70fba55c6e1c391b7ab52071339a393e72a2e9d39dec688491e631b3f78bfec2dd0097b3cf44b03a64a75
6
+ metadata.gz: d5d7624bd975a7e4e88aa357a99358f35cc45ffdbab1e4331808992b704fbf754c62e7d2ee3280f6fc0424de29f77418d13ebdaeb1ecda2d8cf05562cd45ae0c
7
+ data.tar.gz: 9d6668de3ebfd54f9c315c0c3ee69af19dba5448062073c09940969620d0497c074ecb491d22638381eb238d9e2904aa4f74c01f3cd2f090512c1cb48296b8e1
@@ -1,3 +1,12 @@
1
+ Workarea Paypal 2.0.11 (2020-07-11)
2
+ --------------------------------------------------------------------------------
3
+
4
+ * Fix Paypal BN code not being sent
5
+
6
+
7
+ Matt Duffy
8
+
9
+
1
10
  Workarea Paypal 2.0.10 (2020-05-26)
2
11
  --------------------------------------------------------------------------------
3
12
 
@@ -1,6 +1,7 @@
1
1
  require 'workarea'
2
2
  require 'workarea/storefront'
3
3
  require 'workarea/admin'
4
+ require 'workarea/paypal/ext/active_merchant/paypal_express_gateway'
4
5
 
5
6
  module Workarea
6
7
  module Paypal
@@ -15,9 +16,7 @@ module Workarea
15
16
  def self.auto_configure_gateway
16
17
  if Rails.application.secrets.paypal.present?
17
18
  self.gateway = ActiveMerchant::Billing::PaypalExpressGateway.new(
18
- Rails.application.secrets.paypal.deep_symbolize_keys.merge(
19
- button_source: 'Workarea_SP'
20
- )
19
+ Rails.application.secrets.paypal.deep_symbolize_keys
21
20
  )
22
21
  elsif gateway.blank?
23
22
  self.gateway = ActiveMerchant::Billing::BogusGateway.new
@@ -0,0 +1,9 @@
1
+ module ActiveMerchant
2
+ module Billing
3
+ decorate PaypalExpressGateway, with: :workarea do
4
+ def add_button_source(xml)
5
+ xml.tag! 'n2:ButtonSource', 'Workarea_SP'
6
+ end
7
+ end
8
+ end
9
+ end
@@ -1,5 +1,5 @@
1
1
  module Workarea
2
2
  module Paypal
3
- VERSION = '2.0.11'.freeze
3
+ VERSION = '2.0.12'.freeze
4
4
  end
5
5
  end
@@ -0,0 +1,17 @@
1
+ require 'test_helper'
2
+
3
+ module ActiveMerchant
4
+ module Billing
5
+ class PaypalExpressGatewayTest < Workarea::TestCase
6
+ def test_add_button_source
7
+ xml = Builder::XmlMarkup.new
8
+ gateway = PaypalExpressGateway.new(login: 'w', password: 'a', signature: 'p')
9
+
10
+ assert_equal(
11
+ '<n2:ButtonSource>Workarea_SP</n2:ButtonSource>',
12
+ gateway.add_button_source(xml)
13
+ )
14
+ end
15
+ end
16
+ end
17
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workarea-paypal
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.11
4
+ version: 2.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - bcrouse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-07 00:00:00.000000000 Z
11
+ date: 2020-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: workarea
@@ -85,6 +85,7 @@ files:
85
85
  - config/routes.rb
86
86
  - lib/workarea/paypal.rb
87
87
  - lib/workarea/paypal/engine.rb
88
+ - lib/workarea/paypal/ext/active_merchant/paypal_express_gateway.rb
88
89
  - lib/workarea/paypal/version.rb
89
90
  - test/dummy/Rakefile
90
91
  - test/dummy/app/assets/config/manifest.js
@@ -147,6 +148,7 @@ files:
147
148
  - test/system/workarea/storefront/cart_system_test.decorator
148
149
  - test/system/workarea/storefront/logged_in_checkout_system_test.decorator
149
150
  - test/test_helper.rb
151
+ - test/workarea/paypal/ext/active_merchant/paypal_express_gateway_test.rb
150
152
  - workarea-paypal.gemspec
151
153
  homepage: https://github.com/workarea-commerce/workarea-paypal
152
154
  licenses: