viva_wallet 0.1.5 → 0.2.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/README.md +1 -0
- data/lib/viva_wallet/version.rb +1 -1
- data/lib/viva_wallet.rb +8 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 533ff6b37d93fac693b84a252202a8c6efc31d0b72270b090ad71edf0606ffe3
|
4
|
+
data.tar.gz: 294b8ce48c01c7d1ccea7d4c9fb2f00d034ab1b62b8ecc5fd1e7300958be9600
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23e7e836f4fc2b6f48cccb057e20d9694facd1ff46b507a1a12ecc81c901392d795818c5cf80c531acb5f6c79e5b458fad4ede2df9335c425126cbb46d593090
|
7
|
+
data.tar.gz: d3b7b8f89d33c643ca085e0682df724c9cb398b54b6df59540ab4b8d85572c1899ee2685e4cd389b5c1174e24662b3b0231c26a547fcd2695a8071e3df3e1822
|
data/README.md
CHANGED
@@ -23,6 +23,7 @@ Set up an initializer file with your Viva Wallet Smart Checkout client keys:
|
|
23
23
|
```ruby
|
24
24
|
VivaWallet.client_id = 'viva_client_id'
|
25
25
|
VivaWallet.client_secret = 'viva_client_secret'
|
26
|
+
VivaWallet.source_code = 'website_app_source_code'
|
26
27
|
VivaWallet.test_mode = true/false
|
27
28
|
```
|
28
29
|
e.g. *config/initializers/viva_wallet.rb*
|
data/lib/viva_wallet/version.rb
CHANGED
data/lib/viva_wallet.rb
CHANGED
@@ -14,7 +14,8 @@ module VivaWallet
|
|
14
14
|
class ConfigurationError < VivaWalletError; end
|
15
15
|
|
16
16
|
class << self
|
17
|
-
attr_writer :client_id, :client_secret, :
|
17
|
+
attr_writer :client_id, :client_secret, :source_code, :test_mode,
|
18
|
+
:api_base, :account_api_base, :client_base64
|
18
19
|
|
19
20
|
def client_id
|
20
21
|
defined? @client_id and @client_id or raise(
|
@@ -28,6 +29,12 @@ module VivaWallet
|
|
28
29
|
)
|
29
30
|
end
|
30
31
|
|
32
|
+
def source_code
|
33
|
+
defined? @source_code and @source_code or raise(
|
34
|
+
ConfigurationError, "VivaWallet source_code not configured"
|
35
|
+
)
|
36
|
+
end
|
37
|
+
|
31
38
|
def test_mode
|
32
39
|
@test_mode.nil? ? false : @test_mode
|
33
40
|
end
|