cloud_payments 0.0.2 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +12 -6
  3. data/Gemfile +2 -2
  4. data/README.md +88 -5
  5. data/Rakefile +1 -0
  6. data/cloud_payments.gemspec +8 -8
  7. data/config.ru +1 -0
  8. data/lib/cloud_payments.rb +6 -1
  9. data/lib/cloud_payments/client.rb +3 -2
  10. data/lib/cloud_payments/client/errors.rb +1 -0
  11. data/lib/cloud_payments/client/gateway_errors.rb +3 -1
  12. data/lib/cloud_payments/client/response.rb +2 -1
  13. data/lib/cloud_payments/client/serializer.rb +1 -0
  14. data/lib/cloud_payments/client/serializer/base.rb +9 -1
  15. data/lib/cloud_payments/client/serializer/multi_json.rb +1 -0
  16. data/lib/cloud_payments/config.rb +4 -0
  17. data/lib/cloud_payments/models.rb +8 -0
  18. data/lib/cloud_payments/models/like_subscription.rb +30 -0
  19. data/lib/cloud_payments/models/model.rb +9 -0
  20. data/lib/cloud_payments/models/on_fail.rb +31 -0
  21. data/lib/cloud_payments/models/on_kassa_receipt.rb +23 -0
  22. data/lib/cloud_payments/models/on_pay.rb +37 -0
  23. data/lib/cloud_payments/models/on_recurrent.rb +22 -0
  24. data/lib/cloud_payments/models/order.rb +14 -0
  25. data/lib/cloud_payments/models/secure3d.rb +1 -0
  26. data/lib/cloud_payments/models/subscription.rb +9 -32
  27. data/lib/cloud_payments/models/transaction.rb +13 -4
  28. data/lib/cloud_payments/namespaces.rb +12 -1
  29. data/lib/cloud_payments/namespaces/base.rb +2 -1
  30. data/lib/cloud_payments/namespaces/cards.rb +6 -0
  31. data/lib/cloud_payments/namespaces/kassa.rb +22 -0
  32. data/lib/cloud_payments/namespaces/orders.rb +15 -0
  33. data/lib/cloud_payments/namespaces/payments.rb +11 -0
  34. data/lib/cloud_payments/namespaces/subscriptions.rb +6 -0
  35. data/lib/cloud_payments/namespaces/tokens.rb +1 -0
  36. data/lib/cloud_payments/version.rb +2 -1
  37. data/lib/cloud_payments/webhooks.rb +42 -0
  38. data/spec/cloud_payments/client/response_spec.rb +3 -1
  39. data/spec/cloud_payments/client/serializer/multi_json_spec.rb +1 -0
  40. data/spec/cloud_payments/models/order_spec.rb +62 -0
  41. data/spec/cloud_payments/models/secure3d_spec.rb +1 -0
  42. data/spec/cloud_payments/models/subscription_spec.rb +1 -1
  43. data/spec/cloud_payments/models/transaction_spec.rb +25 -1
  44. data/spec/cloud_payments/namespaces/base_spec.rb +10 -3
  45. data/spec/cloud_payments/namespaces/cards_spec.rb +42 -2
  46. data/spec/cloud_payments/namespaces/kassa_spec.rb +43 -0
  47. data/spec/cloud_payments/namespaces/orders_spec.rb +57 -0
  48. data/spec/cloud_payments/namespaces/payments_spec.rb +119 -0
  49. data/spec/cloud_payments/namespaces/subscriptions_spec.rb +21 -1
  50. data/spec/cloud_payments/namespaces/tokens_spec.rb +1 -0
  51. data/spec/cloud_payments/namespaces_spec.rb +2 -1
  52. data/spec/cloud_payments/webhooks_spec.rb +272 -0
  53. data/spec/cloud_payments_spec.rb +27 -4
  54. data/spec/fixtures/apis/cards/post3ds/failed.yml +45 -0
  55. data/spec/fixtures/apis/cards/post3ds/successful.yml +48 -0
  56. data/spec/fixtures/apis/orders/cancel/failed.yml +6 -0
  57. data/spec/fixtures/apis/orders/cancel/successful.yml +6 -0
  58. data/spec/fixtures/apis/orders/create/successful.yml +20 -0
  59. data/spec/fixtures/apis/payments/find/failed.yml +45 -0
  60. data/spec/fixtures/apis/payments/find/failed_with_message.yml +6 -0
  61. data/spec/fixtures/apis/payments/find/successful.yml +48 -0
  62. data/spec/fixtures/apis/payments/get/failed.yml +46 -0
  63. data/spec/fixtures/apis/payments/get/failed_with_message.yml +6 -0
  64. data/spec/fixtures/apis/payments/get/refunded.yml +49 -0
  65. data/spec/fixtures/apis/payments/get/successful.yml +49 -0
  66. data/spec/fixtures/apis/subscriptions/find/successful.yml +4 -4
  67. data/spec/fixtures/apis/subscriptions/get/successful.yml +31 -0
  68. data/spec/spec_helper.rb +13 -24
  69. data/spec/support/examples.rb +1 -0
  70. data/spec/support/helpers.rb +3 -2
  71. metadata +62 -34
  72. data/spec/cloud_payments/client_spec.rb +0 -5
@@ -0,0 +1,45 @@
1
+ ---
2
+ :request:
3
+ :url: '/payments/find'
4
+ :body: '{"InvoiceId":"1234567"}'
5
+ :response:
6
+ :body: >
7
+ {
8
+ "Model": {
9
+ "TransactionId": 12345,
10
+ "Amount": 10.0,
11
+ "Currency": "RUB",
12
+ "CurrencyCode": 0,
13
+ "PaymentAmount": 10.0,
14
+ "PaymentCurrency": "RUB",
15
+ "PaymentCurrencyCode": 0,
16
+ "InvoiceId": "1234567",
17
+ "AccountId": "user_x",
18
+ "Email": null,
19
+ "Description": "Payment for goods on example.com",
20
+ "JsonData": null,
21
+ "CreatedDate": "\/Date(1401718880000)\/",
22
+ "CreatedDateIso":"2014-08-09T11:49:41",
23
+ "TestMode": true,
24
+ "IpAddress": "195.91.194.13",
25
+ "IpCountry": "RU",
26
+ "IpCity": "Ufa",
27
+ "IpRegion": "Bashkortostan Republic",
28
+ "IpDistrict": "Volga Federal District",
29
+ "IpLatitude": 54.7355,
30
+ "IpLongitude": 55.991982,
31
+ "CardFirstSix": "411111",
32
+ "CardLastFour": "1111",
33
+ "CardType": "Visa",
34
+ "CardTypeCode": 0,
35
+ "IssuerBankCountry": "RU",
36
+ "Status": "Declined",
37
+ "StatusCode": 5,
38
+ "Reason": "InsufficientFunds",
39
+ "ReasonCode": 5051,
40
+ "CardHolderMessage": "Insufficient funds on account",
41
+ "Name": "CARDHOLDER NAME"
42
+ },
43
+ "Success": false,
44
+ "Message": null
45
+ }
@@ -0,0 +1,6 @@
1
+ ---
2
+ :request:
3
+ :url: '/payments/find'
4
+ :body: '{"InvoiceId":"1234567"}'
5
+ :response:
6
+ :body: '{"Success":false,"Message":"Not found"}'
@@ -0,0 +1,48 @@
1
+ ---
2
+ :request:
3
+ :url: '/payments/find'
4
+ :body: '{"InvoiceId":"1234567"}'
5
+ :response:
6
+ :body: >
7
+ {
8
+ "Model":{
9
+ "TransactionId":12345,
10
+ "Amount":10.0,
11
+ "Currency":"RUB",
12
+ "CurrencyCode":0,
13
+ "InvoiceId":"1234567",
14
+ "AccountId":"user_x",
15
+ "Email":null,
16
+ "Description":"Payment for goods on example.com",
17
+ "JsonData":null,
18
+ "CreatedDate":"\/Date(1401718880000)\/",
19
+ "CreatedDateIso":"2014-08-09T11:49:41",
20
+ "AuthDate":"\/Date(1401733880523)\/",
21
+ "AuthDateIso":"2014-08-09T11:49:42",
22
+ "ConfirmDate":"\/Date(1401733880523)\/",
23
+ "ConfirmDateIso":"2014-08-09T11:49:42",
24
+ "AuthCode":"123456",
25
+ "TestMode":true,
26
+ "IpAddress":"195.91.194.13",
27
+ "IpCountry":"RU",
28
+ "IpCity":"Ufa",
29
+ "IpRegion":"Bashkortostan Republic",
30
+ "IpDistrict":"Volga Federal District",
31
+ "IpLatitude":54.7355,
32
+ "IpLongitude":55.991982,
33
+ "CardFirstSix":"411111",
34
+ "CardLastFour":"1111",
35
+ "CardType":"Visa",
36
+ "CardTypeCode":0,
37
+ "IssuerBankCountry":"RU",
38
+ "Status":"Completed",
39
+ "StatusCode":3,
40
+ "Reason":"Approved",
41
+ "ReasonCode":0,
42
+ "CardHolderMessage":"Payment successful",
43
+ "Name":"CARDHOLDER NAME",
44
+ "Token":"a4e67841-abb0-42de-a364-d1d8f9f4b3c0"
45
+ },
46
+ "Success":true,
47
+ "Message": null
48
+ }
@@ -0,0 +1,46 @@
1
+ ---
2
+ :request:
3
+ :url: '/payments/get'
4
+ :body: '{"TransactionId":12345}'
5
+ :response:
6
+ :body: >
7
+ {
8
+ "Model": {
9
+ "TransactionId": 12345,
10
+ "Amount": 10.0,
11
+ "Currency": "RUB",
12
+ "CurrencyCode": 0,
13
+ "PaymentAmount": 10.0,
14
+ "PaymentCurrency": "RUB",
15
+ "PaymentCurrencyCode": 0,
16
+ "InvoiceId": "1234567",
17
+ "AccountId": "user_x",
18
+ "Email": null,
19
+ "Description": "Payment for goods on example.com",
20
+ "JsonData": null,
21
+ "CreatedDate": "\/Date(1401718880000)\/",
22
+ "CreatedDateIso":"2014-08-09T11:49:41",
23
+ "TestMode": true,
24
+ "IpAddress": "195.91.194.13",
25
+ "IpCountry": "RU",
26
+ "IpCity": "Ufa",
27
+ "IpRegion": "Bashkortostan Republic",
28
+ "IpDistrict": "Volga Federal District",
29
+ "IpLatitude": 54.7355,
30
+ "IpLongitude": 55.991982,
31
+ "CardFirstSix": "411111",
32
+ "CardLastFour": "1111",
33
+ "CardType": "Visa",
34
+ "CardTypeCode": 0,
35
+ "IssuerBankCountry": "RU",
36
+ "Status": "Declined",
37
+ "StatusCode": 5,
38
+ "Reason": "InsufficientFunds",
39
+ "ReasonCode": 5051,
40
+ "Refunded": false,
41
+ "CardHolderMessage": "Insufficient funds on account",
42
+ "Name": "CARDHOLDER NAME"
43
+ },
44
+ "Success": false,
45
+ "Message": null
46
+ }
@@ -0,0 +1,6 @@
1
+ ---
2
+ :request:
3
+ :url: '/payments/get'
4
+ :body: '{"TransactionId":12345}'
5
+ :response:
6
+ :body: '{"Success":false,"Message":"Not found"}'
@@ -0,0 +1,49 @@
1
+ ---
2
+ :request:
3
+ :url: '/payments/get'
4
+ :body: '{"TransactionId":12345}'
5
+ :response:
6
+ :body: >
7
+ {
8
+ "Model":{
9
+ "TransactionId":12345,
10
+ "Amount":10.0,
11
+ "Currency":"RUB",
12
+ "CurrencyCode":0,
13
+ "InvoiceId":"1234567",
14
+ "AccountId":"user_x",
15
+ "Email":null,
16
+ "Description":"Payment for goods on example.com",
17
+ "JsonData":null,
18
+ "CreatedDate":"\/Date(1401718880000)\/",
19
+ "CreatedDateIso":"2014-08-09T11:49:41",
20
+ "AuthDate":"\/Date(1401733880523)\/",
21
+ "AuthDateIso":"2014-08-09T11:49:42",
22
+ "ConfirmDate":"\/Date(1401733880523)\/",
23
+ "ConfirmDateIso":"2014-08-09T11:49:42",
24
+ "AuthCode":"123456",
25
+ "TestMode":true,
26
+ "IpAddress":"195.91.194.13",
27
+ "IpCountry":"RU",
28
+ "IpCity":"Ufa",
29
+ "IpRegion":"Bashkortostan Republic",
30
+ "IpDistrict":"Volga Federal District",
31
+ "IpLatitude":54.7355,
32
+ "IpLongitude":55.991982,
33
+ "CardFirstSix":"411111",
34
+ "CardLastFour":"1111",
35
+ "CardType":"Visa",
36
+ "CardTypeCode":0,
37
+ "IssuerBankCountry":"RU",
38
+ "Status":"Completed",
39
+ "StatusCode":3,
40
+ "Reason":"Approved",
41
+ "ReasonCode":0,
42
+ "Refunded": true,
43
+ "CardHolderMessage":"Payment successful",
44
+ "Name":"CARDHOLDER NAME",
45
+ "Token":"a4e67841-abb0-42de-a364-d1d8f9f4b3c0"
46
+ },
47
+ "Success":true,
48
+ "Message": null
49
+ }
@@ -0,0 +1,49 @@
1
+ ---
2
+ :request:
3
+ :url: '/payments/get'
4
+ :body: '{"TransactionId":12345}'
5
+ :response:
6
+ :body: >
7
+ {
8
+ "Model":{
9
+ "TransactionId":12345,
10
+ "Amount":10.0,
11
+ "Currency":"RUB",
12
+ "CurrencyCode":0,
13
+ "InvoiceId":"1234567",
14
+ "AccountId":"user_x",
15
+ "Email":null,
16
+ "Description":"Payment for goods on example.com",
17
+ "JsonData":null,
18
+ "CreatedDate":"\/Date(1401718880000)\/",
19
+ "CreatedDateIso":"2014-08-09T11:49:41",
20
+ "AuthDate":"\/Date(1401733880523)\/",
21
+ "AuthDateIso":"2014-08-09T11:49:42",
22
+ "ConfirmDate":"\/Date(1401733880523)\/",
23
+ "ConfirmDateIso":"2014-08-09T11:49:42",
24
+ "AuthCode":"123456",
25
+ "TestMode":true,
26
+ "IpAddress":"195.91.194.13",
27
+ "IpCountry":"RU",
28
+ "IpCity":"Ufa",
29
+ "IpRegion":"Bashkortostan Republic",
30
+ "IpDistrict":"Volga Federal District",
31
+ "IpLatitude":54.7355,
32
+ "IpLongitude":55.991982,
33
+ "CardFirstSix":"411111",
34
+ "CardLastFour":"1111",
35
+ "CardType":"Visa",
36
+ "CardTypeCode":0,
37
+ "IssuerBankCountry":"RU",
38
+ "Status":"Completed",
39
+ "StatusCode":3,
40
+ "Reason":"Approved",
41
+ "ReasonCode":0,
42
+ "Refunded": false,
43
+ "CardHolderMessage":"Payment successful",
44
+ "Name":"CARDHOLDER NAME",
45
+ "Token":"a4e67841-abb0-42de-a364-d1d8f9f4b3c0"
46
+ },
47
+ "Success":true,
48
+ "Message": null
49
+ }
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  :request:
3
- :url: '/subscriptions/get'
4
- :body: '{"Id":"sc_8cf8a9338fb"}'
3
+ :url: '/subscriptions/find'
4
+ :body: '{"AccountId":"user@example.com"}'
5
5
  :response:
6
6
  :body: >
7
7
  {
8
- "Model":{
8
+ "Model":[{
9
9
  "Id":"sc_8cf8a9338fb",
10
10
  "AccountId":"user@example.com",
11
11
  "Description":"Monthly subscription",
@@ -25,7 +25,7 @@
25
25
  "FailedTransactionsNumber":0,
26
26
  "LastTransactionDateIso":"2014-08-09T11:49:41",
27
27
  "NextTransactionDateIso":"2014-08-09T11:49:41"
28
- },
28
+ }],
29
29
  "Success":true,
30
30
  "Message": null
31
31
  }
@@ -0,0 +1,31 @@
1
+ ---
2
+ :request:
3
+ :url: '/subscriptions/get'
4
+ :body: '{"Id":"sc_8cf8a9338fb"}'
5
+ :response:
6
+ :body: >
7
+ {
8
+ "Model":{
9
+ "Id":"sc_8cf8a9338fb",
10
+ "AccountId":"user@example.com",
11
+ "Description":"Monthly subscription",
12
+ "Email":"user@example.com",
13
+ "Amount":1.02,
14
+ "CurrencyCode":0,
15
+ "Currency":"RUB",
16
+ "RequireConfirmation":false,
17
+ "StartDateIso":"2014-08-09T11:49:41",
18
+ "IntervalCode":1,
19
+ "Interval":"Month",
20
+ "Period":1,
21
+ "MaxPeriods":12,
22
+ "StatusCode":0,
23
+ "Status":"Active",
24
+ "SuccessfulTransactionsNumber":0,
25
+ "FailedTransactionsNumber":0,
26
+ "LastTransactionDateIso":"2014-08-09T11:49:41",
27
+ "NextTransactionDateIso":"2014-08-09T11:49:41"
28
+ },
29
+ "Success":true,
30
+ "Message": null
31
+ }
@@ -1,38 +1,27 @@
1
+ # frozen_string_literal: true
1
2
  $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
3
 
3
- if ENV['CODECLIMATE_REPO_TOKEN']
4
- require "codeclimate-test-reporter"
5
- CodeClimate::TestReporter.start
6
- end
7
-
8
4
  require 'bundler'
9
5
  Bundler.require(:default, :test)
10
6
 
7
+ require 'webmock/rspec'
8
+
9
+ WebMock.enable!
11
10
  WebMock.disable_net_connect!
12
11
 
13
12
  Dir["./spec/support/**/*.rb"].each { |f| require f }
14
13
 
15
- CloudPayments.configure do |c|
16
- c.public_key = 'user'
17
- c.secret_key = 'pass'
18
- c.host = 'http://localhost:9292'
19
- c.log = false
20
- # c.raise_banking_errors = true
21
- end
22
-
23
14
  RSpec.configure do |config|
24
15
  config.mock_with :rspec
25
16
  config.include CloudPayments::RSpec::Helpers
26
17
 
27
- config.after(:suite){ WebMock.allow_net_connect! }
28
-
29
- # config.around :each, time_freeze: ->(v){ v.is_a?(Date) || v.is_a?(Time) || v.is_a?(String) } do |example|
30
- # datetime = if example.metadata[:time_freeze].is_a?(String)
31
- # DateTime.parse(example.metadata[:time_freeze])
32
- # else
33
- # example.metadata[:time_freeze]
34
- # end
35
-
36
- # Timecop.freeze(datetime){ example.run }
37
- # end
18
+ config.before :each do
19
+ CloudPayments.configure do |c|
20
+ c.public_key = 'user'
21
+ c.secret_key = 'pass'
22
+ c.host = 'http://localhost:9292'
23
+ c.log = false
24
+ # c.raise_banking_errors = true
25
+ end
26
+ end
38
27
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  RSpec.shared_examples :not_raise_without_attribute do |key, method = nil|
2
3
  method = key unless method
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'yaml'
2
3
 
3
4
  module CloudPayments
@@ -44,13 +45,13 @@ module CloudPayments
44
45
  @webmock_stub ||= begin
45
46
  if fixture
46
47
  WebMock::StubRegistry.instance.register_request_stub(WebMock::RequestStub.new(:post, url)).
47
- with(body: request[:body] || '', headers: request_headers)
48
+ with(body: request[:body] || '', headers: request_headers, basic_auth: ['user', 'pass'])
48
49
  end
49
50
  end
50
51
  end
51
52
 
52
53
  def url
53
- "http://user:pass@localhost:9292#{request[:url]}"
54
+ "http://localhost:9292#{request[:url]}"
54
55
  end
55
56
 
56
57
  def request_headers
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloud_payments
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - undr
8
+ - kirillplatonov
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2015-08-19 00:00:00.000000000 Z
12
+ date: 2020-05-27 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: faraday
@@ -28,75 +29,62 @@ dependencies:
28
29
  name: multi_json
29
30
  requirement: !ruby/object:Gem::Requirement
30
31
  requirements:
31
- - - ">="
32
+ - - "~>"
32
33
  - !ruby/object:Gem::Version
33
- version: '0'
34
+ version: '1.11'
34
35
  type: :runtime
35
36
  prerelease: false
36
37
  version_requirements: !ruby/object:Gem::Requirement
37
38
  requirements:
38
- - - ">="
39
+ - - "~>"
39
40
  - !ruby/object:Gem::Version
40
- version: '0'
41
+ version: '1.11'
41
42
  - !ruby/object:Gem::Dependency
42
43
  name: hashie
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: bundler
57
44
  requirement: !ruby/object:Gem::Requirement
58
45
  requirements:
59
46
  - - "~>"
60
47
  - !ruby/object:Gem::Version
61
- version: '1.7'
62
- type: :development
48
+ version: '3.4'
49
+ type: :runtime
63
50
  prerelease: false
64
51
  version_requirements: !ruby/object:Gem::Requirement
65
52
  requirements:
66
53
  - - "~>"
67
54
  - !ruby/object:Gem::Version
68
- version: '1.7'
55
+ version: '3.4'
69
56
  - !ruby/object:Gem::Dependency
70
57
  name: rake
71
58
  requirement: !ruby/object:Gem::Requirement
72
59
  requirements:
73
60
  - - "~>"
74
61
  - !ruby/object:Gem::Version
75
- version: '10.0'
62
+ version: '13.0'
76
63
  type: :development
77
64
  prerelease: false
78
65
  version_requirements: !ruby/object:Gem::Requirement
79
66
  requirements:
80
67
  - - "~>"
81
68
  - !ruby/object:Gem::Version
82
- version: '10.0'
69
+ version: '13.0'
83
70
  - !ruby/object:Gem::Dependency
84
71
  name: rspec
85
72
  requirement: !ruby/object:Gem::Requirement
86
73
  requirements:
87
- - - ">="
74
+ - - "~>"
88
75
  - !ruby/object:Gem::Version
89
- version: '0'
76
+ version: '3.9'
90
77
  type: :development
91
78
  prerelease: false
92
79
  version_requirements: !ruby/object:Gem::Requirement
93
80
  requirements:
94
- - - ">="
81
+ - - "~>"
95
82
  - !ruby/object:Gem::Version
96
- version: '0'
83
+ version: '3.9'
97
84
  description: CloudPayments ruby client
98
85
  email:
99
86
  - undr@yandex.ru
87
+ - mail@kirillplatonov.com
100
88
  executables: []
101
89
  extensions: []
102
90
  extra_rdoc_files: []
@@ -120,29 +108,41 @@ files:
120
108
  - lib/cloud_payments/client/serializer/multi_json.rb
121
109
  - lib/cloud_payments/config.rb
122
110
  - lib/cloud_payments/models.rb
111
+ - lib/cloud_payments/models/like_subscription.rb
123
112
  - lib/cloud_payments/models/model.rb
113
+ - lib/cloud_payments/models/on_fail.rb
114
+ - lib/cloud_payments/models/on_kassa_receipt.rb
115
+ - lib/cloud_payments/models/on_pay.rb
116
+ - lib/cloud_payments/models/on_recurrent.rb
117
+ - lib/cloud_payments/models/order.rb
124
118
  - lib/cloud_payments/models/secure3d.rb
125
119
  - lib/cloud_payments/models/subscription.rb
126
120
  - lib/cloud_payments/models/transaction.rb
127
121
  - lib/cloud_payments/namespaces.rb
128
122
  - lib/cloud_payments/namespaces/base.rb
129
123
  - lib/cloud_payments/namespaces/cards.rb
124
+ - lib/cloud_payments/namespaces/kassa.rb
125
+ - lib/cloud_payments/namespaces/orders.rb
130
126
  - lib/cloud_payments/namespaces/payments.rb
131
127
  - lib/cloud_payments/namespaces/subscriptions.rb
132
128
  - lib/cloud_payments/namespaces/tokens.rb
133
129
  - lib/cloud_payments/version.rb
130
+ - lib/cloud_payments/webhooks.rb
134
131
  - spec/cloud_payments/client/response_spec.rb
135
132
  - spec/cloud_payments/client/serializer/multi_json_spec.rb
136
- - spec/cloud_payments/client_spec.rb
133
+ - spec/cloud_payments/models/order_spec.rb
137
134
  - spec/cloud_payments/models/secure3d_spec.rb
138
135
  - spec/cloud_payments/models/subscription_spec.rb
139
136
  - spec/cloud_payments/models/transaction_spec.rb
140
137
  - spec/cloud_payments/namespaces/base_spec.rb
141
138
  - spec/cloud_payments/namespaces/cards_spec.rb
139
+ - spec/cloud_payments/namespaces/kassa_spec.rb
140
+ - spec/cloud_payments/namespaces/orders_spec.rb
142
141
  - spec/cloud_payments/namespaces/payments_spec.rb
143
142
  - spec/cloud_payments/namespaces/subscriptions_spec.rb
144
143
  - spec/cloud_payments/namespaces/tokens_spec.rb
145
144
  - spec/cloud_payments/namespaces_spec.rb
145
+ - spec/cloud_payments/webhooks_spec.rb
146
146
  - spec/cloud_payments_spec.rb
147
147
  - spec/fixtures/apis/cards/auth/failed.yml
148
148
  - spec/fixtures/apis/cards/auth/secure3d.yml
@@ -150,9 +150,21 @@ files:
150
150
  - spec/fixtures/apis/cards/charge/failed.yml
151
151
  - spec/fixtures/apis/cards/charge/secure3d.yml
152
152
  - spec/fixtures/apis/cards/charge/successful.yml
153
+ - spec/fixtures/apis/cards/post3ds/failed.yml
154
+ - spec/fixtures/apis/cards/post3ds/successful.yml
155
+ - spec/fixtures/apis/orders/cancel/failed.yml
156
+ - spec/fixtures/apis/orders/cancel/successful.yml
157
+ - spec/fixtures/apis/orders/create/successful.yml
153
158
  - spec/fixtures/apis/payments/confirm/failed.yml
154
159
  - spec/fixtures/apis/payments/confirm/failed_with_message.yml
155
160
  - spec/fixtures/apis/payments/confirm/successful.yml
161
+ - spec/fixtures/apis/payments/find/failed.yml
162
+ - spec/fixtures/apis/payments/find/failed_with_message.yml
163
+ - spec/fixtures/apis/payments/find/successful.yml
164
+ - spec/fixtures/apis/payments/get/failed.yml
165
+ - spec/fixtures/apis/payments/get/failed_with_message.yml
166
+ - spec/fixtures/apis/payments/get/refunded.yml
167
+ - spec/fixtures/apis/payments/get/successful.yml
156
168
  - spec/fixtures/apis/payments/post3ds/failed.yml
157
169
  - spec/fixtures/apis/payments/post3ds/successful.yml
158
170
  - spec/fixtures/apis/payments/refund/failed.yml
@@ -166,6 +178,7 @@ files:
166
178
  - spec/fixtures/apis/subscriptions/cancel/successful.yml
167
179
  - spec/fixtures/apis/subscriptions/create/successful.yml
168
180
  - spec/fixtures/apis/subscriptions/find/successful.yml
181
+ - spec/fixtures/apis/subscriptions/get/successful.yml
169
182
  - spec/fixtures/apis/subscriptions/update/successful.yml
170
183
  - spec/fixtures/apis/tokens/auth/failed.yml
171
184
  - spec/fixtures/apis/tokens/auth/successful.yml
@@ -174,7 +187,7 @@ files:
174
187
  - spec/spec_helper.rb
175
188
  - spec/support/examples.rb
176
189
  - spec/support/helpers.rb
177
- homepage: ''
190
+ homepage: https://github.com/platmart/cloud_payments
178
191
  licenses:
179
192
  - MIT
180
193
  metadata: {}
@@ -193,24 +206,26 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
206
  - !ruby/object:Gem::Version
194
207
  version: '0'
195
208
  requirements: []
196
- rubyforge_project:
197
- rubygems_version: 2.4.3
209
+ rubygems_version: 3.1.2
198
210
  signing_key:
199
211
  specification_version: 4
200
212
  summary: CloudPayments ruby client
201
213
  test_files:
202
214
  - spec/cloud_payments/client/response_spec.rb
203
215
  - spec/cloud_payments/client/serializer/multi_json_spec.rb
204
- - spec/cloud_payments/client_spec.rb
216
+ - spec/cloud_payments/models/order_spec.rb
205
217
  - spec/cloud_payments/models/secure3d_spec.rb
206
218
  - spec/cloud_payments/models/subscription_spec.rb
207
219
  - spec/cloud_payments/models/transaction_spec.rb
208
220
  - spec/cloud_payments/namespaces/base_spec.rb
209
221
  - spec/cloud_payments/namespaces/cards_spec.rb
222
+ - spec/cloud_payments/namespaces/kassa_spec.rb
223
+ - spec/cloud_payments/namespaces/orders_spec.rb
210
224
  - spec/cloud_payments/namespaces/payments_spec.rb
211
225
  - spec/cloud_payments/namespaces/subscriptions_spec.rb
212
226
  - spec/cloud_payments/namespaces/tokens_spec.rb
213
227
  - spec/cloud_payments/namespaces_spec.rb
228
+ - spec/cloud_payments/webhooks_spec.rb
214
229
  - spec/cloud_payments_spec.rb
215
230
  - spec/fixtures/apis/cards/auth/failed.yml
216
231
  - spec/fixtures/apis/cards/auth/secure3d.yml
@@ -218,9 +233,21 @@ test_files:
218
233
  - spec/fixtures/apis/cards/charge/failed.yml
219
234
  - spec/fixtures/apis/cards/charge/secure3d.yml
220
235
  - spec/fixtures/apis/cards/charge/successful.yml
236
+ - spec/fixtures/apis/cards/post3ds/failed.yml
237
+ - spec/fixtures/apis/cards/post3ds/successful.yml
238
+ - spec/fixtures/apis/orders/cancel/failed.yml
239
+ - spec/fixtures/apis/orders/cancel/successful.yml
240
+ - spec/fixtures/apis/orders/create/successful.yml
221
241
  - spec/fixtures/apis/payments/confirm/failed.yml
222
242
  - spec/fixtures/apis/payments/confirm/failed_with_message.yml
223
243
  - spec/fixtures/apis/payments/confirm/successful.yml
244
+ - spec/fixtures/apis/payments/find/failed.yml
245
+ - spec/fixtures/apis/payments/find/failed_with_message.yml
246
+ - spec/fixtures/apis/payments/find/successful.yml
247
+ - spec/fixtures/apis/payments/get/failed.yml
248
+ - spec/fixtures/apis/payments/get/failed_with_message.yml
249
+ - spec/fixtures/apis/payments/get/refunded.yml
250
+ - spec/fixtures/apis/payments/get/successful.yml
224
251
  - spec/fixtures/apis/payments/post3ds/failed.yml
225
252
  - spec/fixtures/apis/payments/post3ds/successful.yml
226
253
  - spec/fixtures/apis/payments/refund/failed.yml
@@ -234,6 +261,7 @@ test_files:
234
261
  - spec/fixtures/apis/subscriptions/cancel/successful.yml
235
262
  - spec/fixtures/apis/subscriptions/create/successful.yml
236
263
  - spec/fixtures/apis/subscriptions/find/successful.yml
264
+ - spec/fixtures/apis/subscriptions/get/successful.yml
237
265
  - spec/fixtures/apis/subscriptions/update/successful.yml
238
266
  - spec/fixtures/apis/tokens/auth/failed.yml
239
267
  - spec/fixtures/apis/tokens/auth/successful.yml