smartpay 0.2.2 → 0.2.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86faee4c994b67bdf3ff9d2454a85d09577b82475917e5048fdb3c373ba1fe30
4
- data.tar.gz: 64babfa347d6f484ec3aea689bf735a3aa294e182c95cf80840fcc0632dca043
3
+ metadata.gz: 0c6d6af18ab67f641631f6e67525ae39c64286ae716819fa2d96658b0571f83b
4
+ data.tar.gz: 64a89a61dd9cfec7fffad3735bea54ad22c5387e2b68bc8caa54148803aea394
5
5
  SHA512:
6
- metadata.gz: 1d4e5f3a352166fff345a6e6cc3b6e68125b74dae5d0913fc78e780aa37dbe754eb18274ceab76152a991dfd82a883b7d49f8ce93d0a26294d83590f9cb1deb1
7
- data.tar.gz: b18f1f1c5602dca17d548e29f525b9238e9490b0340ed6dc69c8b29e8b22c3e300cecad3a6e658ecf31b333d2c0c2dca660bc1ffd2190d7d55a54e500c99c575
6
+ metadata.gz: 7f2ca92bd0867e03a3f2ab3f2c964bfdb1ead71ade148ea753b28aec3ee57aed4d7ab394041620bba30a02055839b214f164e562ed6281e96bf53968a958e6b4
7
+ data.tar.gz: 1426c5205f369b614791c2b8277df030f8f693e31b1caf9ac36f8cfef017a95570599ee957c2f615401fb57a6b95f38720d9cdf4296b3cdf8563dc4a5110dde0
data/README.md CHANGED
@@ -64,7 +64,7 @@ bundle exec rails generate smartpay:install
64
64
 
65
65
  This introduces 4 changes for a pre-built Smartpay Checkout example:
66
66
 
67
- > 1. A new initializer - `config/initializers/smartpay.rb`. You will have to update the `config.public_key` and `config.secret_key` with your own credentials to make this work.
67
+ > 1. A new initializer - `config/initializers/smartpay.rb`. You will have to update the `config.public_api_key` and `config.private_api_key` with your own credentials to make this work.
68
68
  > 2. A new controller - `app/controllers/smartpays_controller.rb`. This is where you can see how a Checkout session is configured & created.
69
69
  > 3. A new view - `app/views/smartpays/index.html.erb`. The minimum frontend required.
70
70
  > 4. A new route in config/routes.rb.
@@ -75,8 +75,8 @@ Edit the keys with your own credentials in `config/initializers/smartpay.rb`.
75
75
 
76
76
  ```ruby
77
77
  ...
78
- config.public_key = '<YOUR_PUBLIC_KEY>' # the one starts with pk_test_
79
- config.secret_key = '<YOUR_API_SECRET>' # the one starts with sk_test_
78
+ config.public_api_key = '<YOUR_PUBLIC_API_KEY>' # the one starts with pk_test_
79
+ config.private_api_key = '<YOUR_PRIVATE_API_KEY>' # the one starts with sk_test_
80
80
  ...
81
81
  ```
82
82
 
@@ -3,6 +3,6 @@
3
3
  Smartpay.configure do |config|
4
4
  config.api_url = 'https://api.smartpay.co/smartpayments'
5
5
  config.checkout_url = 'https://checkout.smartpay.co'
6
- config.public_key = 'pk_test_'
7
- config.secret_key = 'sk_test_'
6
+ config.public_api_key = 'pk_test_'
7
+ config.private_api_key = 'sk_test_'
8
8
  end
@@ -24,12 +24,12 @@ module Smartpay
24
24
  {
25
25
  accept: :json,
26
26
  content_type: :json,
27
- Authorization: "Basic #{secret_key}"
27
+ Authorization: "Basic #{private_api_key}"
28
28
  }
29
29
  end
30
30
 
31
- def secret_key
32
- Smartpay.configuration.secret_key
31
+ def private_api_key
32
+ Smartpay.configuration.private_api_key
33
33
  end
34
34
  end
35
35
  end
@@ -3,7 +3,7 @@
3
3
  module Smartpay
4
4
  class Configuration
5
5
  attr_accessor :post_timeout
6
- attr_accessor :public_key, :secret_key, :api_url, :checkout_url
6
+ attr_accessor :public_api_key, :private_api_key, :api_url, :checkout_url
7
7
 
8
8
  DEFAULT_TIMEOUT_SETTING = 30
9
9
  DEFAULT_API_URL = 'https://api.smartpay.co'
@@ -10,7 +10,7 @@ module Smartpay
10
10
  end
11
11
 
12
12
  def redirect_url
13
- URI.escape("#{checkout_url}/login?session-id=#{response[:id]}&public-key=#{public_key}")
13
+ URI.escape("#{checkout_url}/login?session-id=#{response[:id]}&public-key=#{public_api_key}")
14
14
  end
15
15
 
16
16
  private
@@ -19,8 +19,8 @@ module Smartpay
19
19
  Smartpay.configuration.checkout_url
20
20
  end
21
21
 
22
- def public_key
23
- Smartpay.configuration.public_key
22
+ def public_api_key
23
+ Smartpay.configuration.public_api_key
24
24
  end
25
25
  end
26
26
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Smartpay
4
- VERSION = "0.2.2"
4
+ VERSION = "0.2.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartpay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Smartpay
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-20 00:00:00.000000000 Z
11
+ date: 2021-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client