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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13d6063f1227875b27c4eb23c8312579ba6d46e93c34b05c176239e127e90660
4
- data.tar.gz: a7a501dc99e75d0d3b64f2ace08036125ccab58dd1f74c319c764b2d92014dea
3
+ metadata.gz: 4182589aa3da85b593b3f926bde4f0992cbb52719a56df4bd3b189b4aa09d07c
4
+ data.tar.gz: e21c7b3d793345488a762c17ca81085c9067eb36bc91c0b08592af1293f7fdd8
5
5
  SHA512:
6
- metadata.gz: 6d40210648ab260ca397db4ec504f97afcace0614584cfcd791c3a9cbaebd5309e7a755897359625235b8caa7e121ce7d6768b01a1f986a494effe201f9e8644
7
- data.tar.gz: f6d7107bbfd7d8fac1c09e2a2392c8452aa93f8dd657e0049e7d97a4b898d2f7019dc1a35c00d369d00414b82844404f2c68dad6e523ccaa6e543090d98acb8c
6
+ metadata.gz: 383736b65eedf9d6b123e1bed64ec99852059242e56f663f80f48a69007f33065c5dad5f1cd940670aaed7516b1234a08940e0ba53a05add53eb7d886b15fe3e
7
+ data.tar.gz: d8bd3a6982de296556ebd4556666d343164549da0e8211376b5403b2382e031e9c688c30aeed1b9fe57623c39afb5156bcc75207e5dcf276af620d9ee99e32a6
@@ -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
- You can add desired paypal accounts to monitoring.
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',
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Heartcheck
4
4
  module Paypal
5
- VERSION = '0.0.1'
5
+ VERSION = '0.1.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heartcheck-paypal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Oléa