pay 11.6.2 → 11.7.0
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 +4 -4
- data/lib/pay/stripe.rb +17 -0
- data/lib/pay/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d601b9570c286a5518fad5444be12f07069b6d0b8afe8a879089040f77c7f7be
|
|
4
|
+
data.tar.gz: 1b81304fce9611e742d5cc2c8638a51634f174b9f68a319c47956329c8e7e183
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: de12f02fef6df24c30a05bf5e42b8905cac6ecdd258015d63e9b58e1985c930c5deae3f6992d92d3efd7b3cdae0f37a7ec8309c4fb85bb5956685c9f84374abe
|
|
7
|
+
data.tar.gz: f81848b21ebb2b75511aa6ed8fdd7df9f68449a8ac497669690de7310e2c3a3a5a4b795fce6017e11494dc2138b12b7829675ae5f9e8533a3cf63ce9d6f7358c
|
data/lib/pay/stripe.rb
CHANGED
|
@@ -43,6 +43,15 @@ module Pay
|
|
|
43
43
|
def self.setup
|
|
44
44
|
::Stripe.api_key = private_key
|
|
45
45
|
|
|
46
|
+
# When private_key is a Stripe Organizations API key (sk_org_...),
|
|
47
|
+
# every request must identify the target account with the
|
|
48
|
+
# Stripe-Context header. stripe-ruby applies this configuration to all
|
|
49
|
+
# requests automatically. Regular account keys set no context and are
|
|
50
|
+
# unaffected. https://docs.stripe.com/keys/organization-api-keys
|
|
51
|
+
# (Assigned through Stripe.config: the Stripe module delegates
|
|
52
|
+
# stripe_account but not stripe_context.)
|
|
53
|
+
::Stripe.config.stripe_context = context if context
|
|
54
|
+
|
|
46
55
|
# Used by Stripe to identify Pay for support
|
|
47
56
|
::Stripe.set_app_info("PayRails", partner_id: "pp_partner_IqhY0UExnJYLxg", version: Pay::VERSION, url: "https://github.com/pay-rails/pay")
|
|
48
57
|
|
|
@@ -60,6 +69,14 @@ module Pay
|
|
|
60
69
|
find_value_by_name(:stripe, :private_key)
|
|
61
70
|
end
|
|
62
71
|
|
|
72
|
+
# Optional. The account (acct_...) that API requests should act on when
|
|
73
|
+
# using a Stripe Organizations API key. Resolved like every other Stripe
|
|
74
|
+
# credential: ENV["STRIPE_CONTEXT"], then env-scoped, then unscoped
|
|
75
|
+
# Rails credentials.
|
|
76
|
+
def self.context
|
|
77
|
+
find_value_by_name(:stripe, :context)
|
|
78
|
+
end
|
|
79
|
+
|
|
63
80
|
def self.signing_secret
|
|
64
81
|
find_value_by_name(:stripe, :signing_secret)
|
|
65
82
|
end
|
data/lib/pay/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pay
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 11.
|
|
4
|
+
version: 11.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jason Charnes
|
|
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
189
189
|
- !ruby/object:Gem::Version
|
|
190
190
|
version: '0'
|
|
191
191
|
requirements: []
|
|
192
|
-
rubygems_version: 4.0.
|
|
192
|
+
rubygems_version: 4.0.17
|
|
193
193
|
specification_version: 4
|
|
194
194
|
summary: Payments engine for Ruby on Rails
|
|
195
195
|
test_files: []
|