heartcheck-paypal 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/README.md +11 -1
- data/lib/heartcheck/checks/paypal.rb +5 -1
- data/lib/heartcheck/paypal/version.rb +1 -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: 4182589aa3da85b593b3f926bde4f0992cbb52719a56df4bd3b189b4aa09d07c
|
4
|
+
data.tar.gz: e21c7b3d793345488a762c17ca81085c9067eb36bc91c0b08592af1293f7fdd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 383736b65eedf9d6b123e1bed64ec99852059242e56f663f80f48a69007f33065c5dad5f1cd940670aaed7516b1234a08940e0ba53a05add53eb7d886b15fe3e
|
7
|
+
data.tar.gz: d8bd3a6982de296556ebd4556666d343164549da0e8211376b5403b2382e031e9c688c30aeed1b9fe57623c39afb5156bcc75207e5dcf276af620d9ee99e32a6
|
data/CHANGELOG.md
CHANGED
@@ -10,4 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
10
10
|
- README
|
11
11
|
- CHANGELOG
|
12
12
|
- Support for multiple Paypal accounts
|
13
|
-
- Support for different orders type
|
13
|
+
- Support for different orders type
|
14
|
+
|
15
|
+
## [0.1.0] - 2019-09-19
|
16
|
+
### Added
|
17
|
+
- Optional config paypal credentials
|
data/README.md
CHANGED
@@ -22,7 +22,17 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
With this basic setup, the gem will use your app default paypal credentials:
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
Heartcheck.setup do |monitor|
|
29
|
+
monitor.add :paypal do |config|
|
30
|
+
config.add_service(name: :paypal)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
```
|
34
|
+
|
35
|
+
Or you can add desired paypal account to monitoring if you want to use another account.
|
26
36
|
|
27
37
|
```ruby
|
28
38
|
Heartcheck.setup do |monitor|
|
@@ -7,7 +7,7 @@ module Heartcheck
|
|
7
7
|
|
8
8
|
def validate
|
9
9
|
services.each do |service|
|
10
|
-
configure_paypal_api(service)
|
10
|
+
configure_paypal_api(service) if change_configs?(service)
|
11
11
|
|
12
12
|
unless create_payment(service)
|
13
13
|
@errors << @payment.error
|
@@ -36,6 +36,10 @@ module Heartcheck
|
|
36
36
|
)
|
37
37
|
end
|
38
38
|
|
39
|
+
def change_configs?(service)
|
40
|
+
service[:client_id] && service[:client_secret] && service[:mode]
|
41
|
+
end
|
42
|
+
|
39
43
|
def dumb_order
|
40
44
|
{
|
41
45
|
intent: 'sale',
|