paymentsds-mpesa 0.1.0.pre.alpha.27 → 0.1.0.pre.alpha.32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/lib/paymentsds/mpesa/errors/constants.rb +51 -0
  4. data/lib/paymentsds/mpesa/errors/direct_debt_missing.rb +9 -0
  5. data/lib/paymentsds/mpesa/errors/duplicate_direct_debt.rb +9 -0
  6. data/lib/paymentsds/mpesa/errors/errors.rb +26 -0
  7. data/lib/paymentsds/mpesa/errors/inactive_account.rb +9 -0
  8. data/lib/paymentsds/mpesa/errors/initiator_authentication.rb +9 -0
  9. data/lib/paymentsds/mpesa/errors/insuficient_balance.rb +9 -0
  10. data/lib/paymentsds/mpesa/errors/invalid_amount.rb +9 -0
  11. data/lib/paymentsds/mpesa/errors/invalid_initiator_identifier.rb +9 -0
  12. data/lib/paymentsds/mpesa/errors/invalid_language_code.rb +9 -0
  13. data/lib/paymentsds/mpesa/errors/invalid_market.rb +9 -0
  14. data/lib/paymentsds/mpesa/errors/invalid_missing_properties.rb +9 -0
  15. data/lib/paymentsds/mpesa/errors/invalid_msisdn.rb +9 -0
  16. data/lib/paymentsds/mpesa/errors/invalid_receiver.rb +9 -0
  17. data/lib/paymentsds/mpesa/errors/invalid_reference.rb +9 -0
  18. data/lib/paymentsds/mpesa/errors/invalid_security_credential.rb +9 -0
  19. data/lib/paymentsds/mpesa/errors/invalid_shortcode.rb +9 -0
  20. data/lib/paymentsds/mpesa/errors/invalid_thirdparty_reference.rb +9 -0
  21. data/lib/paymentsds/mpesa/errors/invalid_transaction_id.rb +9 -0
  22. data/lib/paymentsds/mpesa/errors/invalid_transaction_reference.rb +9 -0
  23. data/lib/paymentsds/mpesa/errors/profile_problems.rb +9 -0
  24. data/lib/paymentsds/mpesa/errors/request_timeout.rb +9 -0
  25. data/lib/paymentsds/mpesa/errors/transaction_cancelled.rb +9 -0
  26. data/lib/paymentsds/mpesa/errors/transaction_failed.rb +9 -0
  27. data/lib/paymentsds/mpesa/errors/unavailabe_server.rb +9 -0
  28. data/lib/paymentsds/mpesa/errors/unknown.rb +9 -0
  29. data/lib/paymentsds/mpesa/errors/unknown_status.rb +9 -0
  30. data/lib/paymentsds/mpesa/errors/validation.rb +9 -0
  31. data/lib/paymentsds/mpesa/service.rb +125 -13
  32. data/lib/paymentsds/mpesa/version.rb +1 -1
  33. data/paymentsds-mpesa.gemspec +1 -0
  34. data/publish.sh +6 -0
  35. metadata +45 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6af0c9d99ed40864b592134ec7dba1896348da77525a6a7f748d1124a28b57c9
4
- data.tar.gz: 66c7f14a413d93480182372ecf673a1b040569fb0ab0210cda9db5d9eee185fa
3
+ metadata.gz: 698bacf39217bd0ec2d8a515ac12dcc503cf53460a1a2a924705c7c0dc6a04f4
4
+ data.tar.gz: 3a2658187038669829a88207df6f17dab61d42597cfe9b6a62c56f349de24ea2
5
5
  SHA512:
6
- metadata.gz: 5773f8c8a3d6d43b0245104f27e385dfe2ca2666ecd265cbc981f0d352da79ea7806db4089a275f295af612bc9c2dfeb95812de5d1480e3e865038eb65dcf96b
7
- data.tar.gz: a4ab7bc50b4da802fe0ebd55e3cf0600b9f85c399ad5084ac70cea16b6295826e9a7f0c2ceedb7c11193f961145c0c271b0bf76774d749fa3c595c5190e2f438
6
+ metadata.gz: dc9b3150e581a24ffb48d84a346399d71781430eade8e0df7c2b217b51c79e8b990dbe785253f4d48774266d7a697966fd051d2704beab4394c8d7cbc3d4989c
7
+ data.tar.gz: 9080abb4e22cab13b3ff779fe0b6d1a4b0bd15a7859290a52ebbcc2b5a4a173fd5554a0a440952dbc5d9b1b31d57471ac9c445f3c180c868a46d4300bdca28be
data/.gitignore CHANGED
@@ -10,4 +10,4 @@
10
10
  /Gemfile.lock
11
11
  # rspec failure tracking
12
12
  .rspec_status
13
-
13
+ *.gem
@@ -0,0 +1,51 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ INS0 = "INS-0"
4
+ INS18 = "INS-18"
5
+ INS19 = "INS-19"
6
+ INS20 = "INS-20"
7
+ INS21 = "INS-21"
8
+ INS22 = "INS-22"
9
+ INS23 = "INS-23"
10
+ INS24 = "INS-24"
11
+ INS25 = "INS-25"
12
+ INS993 = "INS-993"
13
+ INS994 = "INS-994"
14
+ INS995 = "INS-995"
15
+ INS996 = "INS-996"
16
+ INS997 = "INS-997"
17
+ INS998 = "INS-998"
18
+ INS2001 = "INS-2001"
19
+ INS2002 = "INS-2002"
20
+ INS2051 = "INS-2051"
21
+ INS2057 = "INS-2057"
22
+
23
+ DIRECT_DEBT = "DIRECT_DEBT"
24
+ DUPLICATE_TRANSACTION = "DUPLICATE_TRANSACTION"
25
+ INSUFICIENT_BALANCE = "INSUFICIENT_BALANCE"
26
+ INVALID_AMOUNT = "INVALID_AMOUNT"
27
+ INVALID_MISSING_PROPERTIES = "INVALID_MISSING_PROPERTIES"
28
+ INVALID_RECEIVER = "INVALID_RECEIVER"
29
+ INVALID_REFERENCE = "INVALID_REFERENCE"
30
+ INVALID_SECURITY_CREDENTIAL = "INVALID_SECURITY_CREDENTIAL"
31
+ INVALID_SHORTCODE = "INVALID_SHORTCODE"
32
+ INVALID_THIRDPARTY_REFERENCE = "INVALID_THIRDPARTY_REFERENCE"
33
+ INVALID_TRANSACTION_ID = "INVALID_TRANSACTION_ID"
34
+ INVALID_TRANSACTION_REFERENCE = "INVALID_TRANSACTION_INVALID_TRANSACTION_REFERENCE"
35
+ REQUEST_TIMEOUT = "REQUEST_TIMEOUT"
36
+ TRANSACTION_CANCELLED = "TRANSACTION_CANCELLED"
37
+ TRANSACTION_FAILED = "TRANSACTION_FAILED"
38
+ UNAVAILABLE_SERVER = "UNAVAILABLE_SERVER"
39
+ UNKNOWN_STATUS = "UNKNOWN_STATUS"
40
+ UNKNOWN = "UNKNOWN"
41
+ VALIDATION = "VALIDATION"
42
+ INVALID_INITIATOR_IDENTIFIER = "INVALID_INITIATOR_IDENTIFIER"
43
+ INVALID_LANGUAGE_CODE = "INVALID_LANGUAGE_CODE"
44
+ INVALID_MARKET = "INVALID_MARKET"
45
+ INVALID_MSISDN = "INVALID_MSISDN"
46
+ PROFILE_PROBLEMS = "PROFILE_PROBLEMS"
47
+ INACTIVE_ACCOUNT = "INACTIVE_ACCOUNT"
48
+ INITIATOR_AUTHENTICATION = "INITIATOR_AUTHENTICATION"
49
+ PROFILE_PROBLEMS = "PROFILE_PROBLEMS"
50
+ end
51
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class DirectDebtMissingError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::DIRECT_DEBT)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class DuplicateDirectDebtError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::DUPLICATE_TRANSACTION)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,26 @@
1
+ require_relative "constants"
2
+ require_relative "direct_debt_missing"
3
+ require_relative "duplicate_direct_debt"
4
+ require_relative "inactive_account"
5
+ require_relative "initiator_authentication"
6
+ require_relative "insuficient_balance"
7
+ require_relative "invalid_initiator_identifier"
8
+ require_relative "invalid_market"
9
+ require_relative "invalid_language_code"
10
+ require_relative "invalid_msisdn"
11
+ require_relative "profile_problems"
12
+ require_relative "invalid_amount"
13
+ require_relative "invalid_missing_properties"
14
+ require_relative "invalid_receiver"
15
+ require_relative "invalid_reference"
16
+ require_relative "invalid_security_credential"
17
+ require_relative "invalid_shortcode"
18
+ require_relative "invalid_thirdparty_reference"
19
+ require_relative "invalid_transaction_id"
20
+ require_relative "invalid_transaction_reference"
21
+ require_relative "request_timeout"
22
+ require_relative "transaction_cancelled"
23
+ require_relative "transaction_failed"
24
+ require_relative "unavailable_server"
25
+ require_relative "unknown_status"
26
+ require_relative "unknown"
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InactiveAccountError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INACTIVE_ACCOUNT)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InitiatorAuthenticationError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INITIATOR_AUTHENTICATION)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InsuficientBalanceError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INSUFICIENT_BALANCE)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidAmountError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_AMOUNT)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidInitiatorIdentifierError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_INITIATOR_IDENTIFIER)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidLanguageCodeError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_LANGUAGE_CODE)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidMarketError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_MARKET)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidMissingPropertiesError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_MISSING_PROPERTIES)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidMSISDNError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_MSISDN)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidReceiverError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_RECEIVER)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidReferenceError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_REFERENCE)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidSecurityCredentialError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_SECURITY_CREDENTIAL)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidShortcodeError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_SHORTCODE)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidThirdPartyReferenceError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_THIRDPARTY_REFERENCE)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class TransactionIdError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_TRANSACTION_ID)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class InvalidTransactionReferenceError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::INVALID_TRANSACTION_REFERENCE)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class ProfileProblemsError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::PROFILE_PROBLEMS)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class ProfileProblemsError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::PROFILE_PROBLEMS)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class TransactionCancelledError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::TRANSACTION_CANCELLED)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class TransactionFailedError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::TRANSACTION_FAILED)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class UnavailableServerError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::UNAVAILABLE_SERVER)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class UnknownError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::UNKNOWN)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class UnknownStatusError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::UNKNOWN_STATUS)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Paymentsds
2
+ module MPesa
3
+ class ValidationError < StandardError
4
+ def initialize(msg=Paymentsds::MPesa::VALIDATION)
5
+ super(msg)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -1,6 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
  require 'json'
3
3
  require 'faraday'
4
+ require 'faraday_middleware'
5
+
6
+ require_relative "errors/errors"
4
7
 
5
8
  module Paymentsds
6
9
  module MPesa
@@ -58,11 +61,9 @@ module Paymentsds
58
61
  when /^[0-9]{5,6}$/
59
62
  :B2B_PAYMENT
60
63
  end
61
-
62
- # Should raise an exception
63
64
  end
64
65
 
65
- # Should raise an exception
66
+ raise InvalidDestination
66
67
  end
67
68
 
68
69
  def detect_missing_properties(opcode, intent)
@@ -148,6 +149,7 @@ module Paymentsds
148
149
  }
149
150
 
150
151
  http_client = Faraday.new(url: request_data[:base_url]) do |client|
152
+ client.adapter Faraday.default_adapter
151
153
  client.headers = request_data[:headers]
152
154
  client.response :json
153
155
  end
@@ -178,17 +180,127 @@ module Paymentsds
178
180
  end
179
181
 
180
182
  def build_response(result)
181
- puts result.inspect
182
-
183
- if result.status < 300
184
- response = Paymentsds::MPesa::Result.new(result.success?, nil, result.data)
185
- elsif result.status < 400
186
- case re
187
- elsif result.status < 500
188
- elsif result.status < 600
183
+
184
+ case result.status
185
+ when 200
186
+ case result.body[:output_ResponseCode]
187
+ when Paymentsds::MPesa::INS0
188
+ response = Paymentsds::MPesa::Result.new(result.success?, nil, result.body)
189
+ else
190
+ raise UnknownError
191
+ end
192
+
193
+ when 201
194
+ case result.body[:output_ResponseCode]
195
+ when Paymentsds::MPesa::INS0
196
+ response = Paymentsds::MPesa::Result.new(result.success?, nil, result.body)
197
+ else
198
+ raise UnknownError
199
+ end
200
+
201
+ when 400
202
+ case result.body[:output_ResponseCode]
203
+ when Paymentsds::MPesa::INS13
204
+ raise InvalidShortcodeError
205
+ when Paymentsds::MPesa::INS14
206
+ raise InvalidReferenceError
207
+ when Paymentsds::MPesa::INS15
208
+ raise InvalidAmountError
209
+ when Paymentsds::MPesa::INS17
210
+ raise InvalidTransactionReferenceError
211
+ when Paymentsds::MPesa::INS18
212
+ raise InvalidTransactionIdError
213
+ when Paymentsds::MPesa::INS19
214
+ raise InvalidThirdPartyReferenceError
215
+ when Paymentsds::MPesa::INS20
216
+ raise InvalidMissingPropertiesError
217
+ when Paymentsds::MPesa::INS21
218
+ raise ValidationError
219
+ when Paymentsds::MPesa::INS22
220
+ raise InvalidOperationPartError
221
+ when Paymentsds::MPesa::INS23
222
+ raise UnknownStatusError
223
+ when Paymentsds::MPesa::INS24
224
+ raise InvalidInitiatorIdentifierError
225
+ when Paymentsds::MPesa::INS25
226
+ raise InvalidSecurityCredentialError
227
+ when Paymentsds::MPesa::INS993
228
+ raise DirectDebtMissingError
229
+ when Paymentsds::MPesa::INS994
230
+ raise DuplicatedDirectDebtError
231
+ when Paymentsds::MPesa::INS995
232
+ raise ProfileProblemsError
233
+ when Paymentsds::MPesa::INS996
234
+ raise InactiveAccountError
235
+ when Paymentsds::MPesa::INS997
236
+ raise InvalidLanguageCodeError
237
+ when Paymentsds::MPesa::INS998
238
+ raise InvalidMarketError
239
+ when Paymentsds::MPesa::INS2001
240
+ raise InitiatorAuthenticationError
241
+ when Paymentsds::MPesa::INS2002
242
+ raise InvalidReceiverError
243
+ when Paymentsds::MPesa::INS2051
244
+ raise InvalidMSISDNError
245
+ when Paymentsds::MPesa::INS2057
246
+ raise InvalidLanguageCodeError
247
+ else
248
+ raise UnknownError
249
+ end
250
+
251
+ when 401
252
+ case result.body[:output_ResponseCode]
253
+ when Paymentsds::MPesa::INS5
254
+ raise TransactionCancelledError
255
+ when Paymentsds::MPesa::INS6
256
+ raise TransactionFailedError
257
+ else
258
+ raise UnknownError
259
+ end
260
+
261
+ when 408
262
+ case result.body[:output_ResponseCode]
263
+ when Paymentsds::MPesa::INS9
264
+ raise RequestTimeoutError
265
+ else
266
+ raise UnknownError
267
+ end
268
+
269
+ when 409
270
+ case result.body[:output_ResponseCode]
271
+ when Paymentsds::MPesa::INS10
272
+ raise DuplicateTransactionError
273
+ else
274
+ raise UnknownError
275
+ end
276
+
277
+ when 422
278
+ case result.body[:output_ResponseCode]
279
+ when Paymentsds::MPesa::INS2006
280
+ raise InsufficientBalanceError
281
+ else
282
+ raise UnknownError
283
+ end
284
+
285
+ when 500
286
+ case result.body[:output_ResponseCode]
287
+ when Paymentsds::MPesa::INS1
288
+ raise InternalError
289
+ else
290
+ raise UnknownError
291
+ end
292
+
293
+ when 503
294
+ case result.body[:output_ResponseCode]
295
+ when Paymentsds::MPesa::INS16
296
+ raise UnavailableServerError
297
+ else
298
+ raise UnknownError
299
+ end
300
+
189
301
  else
190
- end
191
-
302
+ raise UnknownError
303
+ end
192
304
  end
193
305
 
194
306
  def generate_access_token
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Paymentsds
4
4
  module MPesa
5
- VERSION = '0.1.0.pre.alpha.27'
5
+ VERSION = '0.1.0.pre.alpha.32'
6
6
  end
7
7
  end
@@ -28,4 +28,5 @@ Gem::Specification.new do |spec|
28
28
  spec.add_development_dependency 'rspec', '~> 3.9.0', '>= 3.9.0'
29
29
  spec.add_development_dependency 'overcommit', '~> 0.55.0', '>= 0.55.0'
30
30
  spec.add_development_dependency 'rubocop', '~> 0.88.0', '>= 0.88.0'
31
+ spec.add_development_dependency 'faraday_middleware'
31
32
  end
@@ -0,0 +1,6 @@
1
+ #!/bin/env bash
2
+
3
+ rm -rf *.gem
4
+ gem build paymentsds-mpesa.gemspec
5
+ gem push *.gem
6
+ gem install paymentsds-mpesa --pre
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paymentsds-mpesa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.alpha.27
4
+ version: 0.1.0.pre.alpha.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edson Michaque
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-27 00:00:00.000000000 Z
11
+ date: 2020-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -90,6 +90,20 @@ dependencies:
90
90
  - - ">="
91
91
  - !ruby/object:Gem::Version
92
92
  version: 0.88.0
93
+ - !ruby/object:Gem::Dependency
94
+ name: faraday_middleware
95
+ requirement: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ type: :development
101
+ prerelease: false
102
+ version_requirements: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
93
107
  description: M-Pesa SDK for Ruby is an unofficial library aiming to help businesses
94
108
  integrating every M-Pesa operations to their Ruby applications.
95
109
  email:
@@ -115,12 +129,41 @@ files:
115
129
  - lib/paymentsds/mpesa/constants.rb
116
130
  - lib/paymentsds/mpesa/environment.rb
117
131
  - lib/paymentsds/mpesa/error_type.rb
132
+ - lib/paymentsds/mpesa/errors/constants.rb
133
+ - lib/paymentsds/mpesa/errors/direct_debt_missing.rb
134
+ - lib/paymentsds/mpesa/errors/duplicate_direct_debt.rb
135
+ - lib/paymentsds/mpesa/errors/errors.rb
136
+ - lib/paymentsds/mpesa/errors/inactive_account.rb
137
+ - lib/paymentsds/mpesa/errors/initiator_authentication.rb
138
+ - lib/paymentsds/mpesa/errors/insuficient_balance.rb
139
+ - lib/paymentsds/mpesa/errors/invalid_amount.rb
140
+ - lib/paymentsds/mpesa/errors/invalid_initiator_identifier.rb
141
+ - lib/paymentsds/mpesa/errors/invalid_language_code.rb
142
+ - lib/paymentsds/mpesa/errors/invalid_market.rb
143
+ - lib/paymentsds/mpesa/errors/invalid_missing_properties.rb
144
+ - lib/paymentsds/mpesa/errors/invalid_msisdn.rb
145
+ - lib/paymentsds/mpesa/errors/invalid_receiver.rb
146
+ - lib/paymentsds/mpesa/errors/invalid_reference.rb
147
+ - lib/paymentsds/mpesa/errors/invalid_security_credential.rb
148
+ - lib/paymentsds/mpesa/errors/invalid_shortcode.rb
149
+ - lib/paymentsds/mpesa/errors/invalid_thirdparty_reference.rb
150
+ - lib/paymentsds/mpesa/errors/invalid_transaction_id.rb
151
+ - lib/paymentsds/mpesa/errors/invalid_transaction_reference.rb
152
+ - lib/paymentsds/mpesa/errors/profile_problems.rb
153
+ - lib/paymentsds/mpesa/errors/request_timeout.rb
154
+ - lib/paymentsds/mpesa/errors/transaction_cancelled.rb
155
+ - lib/paymentsds/mpesa/errors/transaction_failed.rb
156
+ - lib/paymentsds/mpesa/errors/unavailabe_server.rb
157
+ - lib/paymentsds/mpesa/errors/unknown.rb
158
+ - lib/paymentsds/mpesa/errors/unknown_status.rb
159
+ - lib/paymentsds/mpesa/errors/validation.rb
118
160
  - lib/paymentsds/mpesa/operation.rb
119
161
  - lib/paymentsds/mpesa/patterns.rb
120
162
  - lib/paymentsds/mpesa/result.rb
121
163
  - lib/paymentsds/mpesa/service.rb
122
164
  - lib/paymentsds/mpesa/version.rb
123
165
  - paymentsds-mpesa.gemspec
166
+ - publish.sh
124
167
  homepage: https://github.com/paymentsds/mpesa-ruby-sdk
125
168
  licenses:
126
169
  - Apache-2.0