paykassa 0.1.3 → 0.1.6

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: 75bdef9bd41f06f69a8b42fb4eb8e8388d3e87e64c5b7dad4f0e5a8127e93e39
4
- data.tar.gz: da37b4dcfd7afa660737654b72430359f10742ab11e695a35832314327eea9bb
3
+ metadata.gz: 709ef2738d1e012bfd5e99b0865251589916201699666502b5e41b71cdc2e14f
4
+ data.tar.gz: 30955e4b2a48aea5ef471d71e4d4cdeef13c547a259808f3c0f0b075a7e589b3
5
5
  SHA512:
6
- metadata.gz: 1c51aced00d07703379310bc6481d76ec24e67cc7f93dfde1763d5e0a13401ed4d46296d2d4c2c4e1e0b13c4dd42ea0a890dc38cdaba7a87ba3d87d62662706b
7
- data.tar.gz: 44106fd03bd254f4c3c4dcdcdea04be6ef780097a453a54547cd42a8c06f9b238dfbdfc8b2bdefb328949650c2db522949161ea74db83b3a3f27b0e25b1dfc6f
6
+ metadata.gz: a6e9a484f6e7bc6bb6a704814bf38fced3d0685a98b4351bd643a29374fdcac9b31f525098d22150e4624b004efd3dec69ced44a707b44d1c7157a55ed016435
7
+ data.tar.gz: f5b0cb8ef2e375ec8ef0705c233c4a1b84462a9f9df967b84538064a8390e442b7b2650cb75ca797aa2321dbd5eeaee35c5486894ec75332d1281b18937e2e18
data/lib/paykassa/pay.rb CHANGED
@@ -58,16 +58,20 @@ class PaykassaPay
58
58
  if !CURRENCIES.include? out
59
59
  raise "#{out} not include in currencies: #{CURRENCIES}"
60
60
  end
61
- make_request(
61
+ data = {
62
62
  currency_in: inn,
63
- currency_out: out,
63
+ currency_out: out
64
+ }
65
+ make_request(
66
+ nil,
67
+ data,
64
68
  false,
65
69
  RATE_URL
66
70
  )
67
71
  end
68
72
  private
69
73
  def make_request(func,data,merge_auth = true, url= nil)
70
- data = data.merge({func: func})
74
+ data = data.merge({func: func}) if func
71
75
  data = data.merge(@_auth) if merge_auth
72
76
  url = BASE_SCI_URI if url.nil?
73
77
  res = Net::HTTP.post_form(url, data)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Paykassa
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.6"
5
5
  end
data/lib/paykassa.rb CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative "paykassa/version"
4
4
  require_relative "paykassa/order"
5
+ require_relative "paykassa/pay"
5
6
  module Paykassa
6
7
  class Error < StandardError; end
7
8
  class Paykassa
@@ -11,9 +12,8 @@ module Paykassa
11
12
  @paykassa_pay = nil
12
13
  else
13
14
  @paykassa_pay = PaykassaPay.new(
14
- {
15
- domain: domain, api_id: api_id, api_key: api_key, test: test
16
- }
15
+ domain: domain, api_id: api_id,
16
+ api_key: api_key, test: test
17
17
  )
18
18
  end
19
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paykassa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - nottewae