paymentsds-mpesa 0.1.0.pre.alpha.36 → 0.1.0.pre.alpha.37

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: 5e83a038347cc86739d1d5fe54b583529e5bde197c7452675f36a6f8c32d0a39
4
- data.tar.gz: 6aa02323198c3ffba8e5a003012f91fda4c389192017c3716fac71b071b706bc
3
+ metadata.gz: 03f6b0c05d7c834460b07bb276ebcaf2d4f96c8ae84d0517549eece4a37fc2e9
4
+ data.tar.gz: 6bf1dfb79f71559379e8dbb50d565bc77a9017adfad4e3718e8ce28fda260bdb
5
5
  SHA512:
6
- metadata.gz: 81760b73fc2b3c91f7de44d2f5107869ca8a270a99cf6e0125f8fc9399fce03b56a3c63f81dd3c4deb46f12b8ec40dd0e03a93a09dc576da2f03fb3996474527
7
- data.tar.gz: de1770df98e13ae2066a8df7019d13cecfc5cfdea2757d91ac3e9dbd98b958b8a0a1bfb8dc6c1babaee918336c13cda669f87eafa8e32f43ce7bd66599123df5
6
+ metadata.gz: e0ef496fef3547aa79223025760dcdf334e527700d2e2f5382bc6c851142445727f9518c9fdeb045a1e1c14aafec36b2cd0cd3278924206d37457d183deac5d8
7
+ data.tar.gz: e95ea265812384153afcc9473d94a5247326c137ae00b7c18577ad9e545b1d209ef1a822dcf8c07751beb1a9750b660171e070dab27bd56915c90e10dbe921aa
@@ -1,34 +1,34 @@
1
1
  module Paymentsds
2
2
  module MPesa
3
- INS0 = "INS-0".freeze
4
- INS1 = "INS-1".freeze
5
- INS5 = "INS-5".freeze
6
- INS6 = "INS-6".freeze
7
- INS9 = "INS-9".freeze
8
- INS10 = "INS-10".freeze
9
- INS13 = "INS-13".freeze
10
- INS14 = "INS-14".freeze
11
- INS15 = "INS-15".freeze
12
- INS16 = "INS-16".freeze
13
- INS17 = "INS-17".freeze
14
- INS18 = "INS-18".freeze
15
- INS19 = "INS-19".freeze
16
- INS20 = "INS-20".freeze
17
- INS21 = "INS-21".freeze
18
- INS22 = "INS-22".freeze
19
- INS23 = "INS-23".freeze
20
- INS24 = "INS-24".freeze
21
- INS25 = "INS-25".freeze
22
- INS993 = "INS-993".freeze
23
- INS994 = "INS-994".freeze
24
- INS995 = "INS-995".freeze
25
- INS996 = "INS-996".freeze
26
- INS997 = "INS-997".freeze
27
- INS998 = "INS-998".freeze
28
- INS2001 = "INS-2001".freeze
29
- INS2002 = "INS-2002".freeze
30
- INS2051 = "INS-2051".freeze
31
- INS2057 = "INS-2057".freeze
3
+ INS0 = "INS-0".to_sym
4
+ INS1 = "INS-1".to_sym
5
+ INS5 = "INS-5".to_sym
6
+ INS6 = "INS-6".to_sym
7
+ INS9 = "INS-9".to_sym
8
+ INS10 = "INS-10".to_sym
9
+ INS13 = "INS-13".to_sym
10
+ INS14 = "INS-14".to_sym
11
+ INS15 = "INS-15".to_sym
12
+ INS16 = "INS-16".to_sym
13
+ INS17 = "INS-17".to_sym
14
+ INS18 = "INS-18".to_sym
15
+ INS19 = "INS-19".to_sym
16
+ INS20 = "INS-20".to_sym
17
+ INS21 = "INS-21".to_sym
18
+ INS22 = "INS-22".to_sym
19
+ INS23 = "INS-23".to_sym
20
+ INS24 = "INS-24".to_sym
21
+ INS25 = "INS-25".to_sym
22
+ INS993 = "INS-993".to_sym
23
+ INS994 = "INS-994".to_sym
24
+ INS995 = "INS-995".to_sym
25
+ INS996 = "INS-996".to_sym
26
+ INS997 = "INS-997".to_sym
27
+ INS998 = "INS-998".to_sym
28
+ INS2001 = "INS-2001".to_sym
29
+ INS2002 = "INS-2002".to_sym
30
+ INS2051 = "INS-2051".to_sym
31
+ INS2057 = "INS-2057".to_sym
32
32
 
33
33
  DIRECT_DEBT = "DIRECT_DEBT".freeze
34
34
  DUPLICATE_TRANSACTION = "DUPLICATE_TRANSACTION".freeze
@@ -184,7 +184,7 @@ module Paymentsds
184
184
 
185
185
  case result.status
186
186
  when 200
187
- case result.body[:output_ResponseCode]
187
+ case result.body[:output_ResponseCode].to_sym
188
188
  when Paymentsds::MPesa::INS0
189
189
  response = Paymentsds::MPesa::Result.new(result.success?, nil, result.body)
190
190
  else
@@ -192,7 +192,7 @@ module Paymentsds
192
192
  end
193
193
 
194
194
  when 201
195
- case result.body[:output_ResponseCode]
195
+ case result.body[:output_ResponseCode].to_sym
196
196
  when Paymentsds::MPesa::INS0
197
197
  response = Paymentsds::MPesa::Result.new(result.success?, nil, result.body)
198
198
  else
@@ -200,7 +200,7 @@ module Paymentsds
200
200
  end
201
201
 
202
202
  when 400
203
- case result.body[:output_ResponseCode]
203
+ case result.body[:output_ResponseCode].to_sym
204
204
  when Paymentsds::MPesa::INS13
205
205
  raise InvalidShortcodeError
206
206
  when Paymentsds::MPesa::INS14
@@ -250,7 +250,7 @@ module Paymentsds
250
250
  end
251
251
 
252
252
  when 401
253
- case result.body[:output_ResponseCode]
253
+ case result.body[:output_ResponseCode].to_sym
254
254
  when Paymentsds::MPesa::INS5
255
255
  raise TransactionCancelledError
256
256
  when Paymentsds::MPesa::INS6
@@ -260,7 +260,7 @@ module Paymentsds
260
260
  end
261
261
 
262
262
  when 408
263
- case result.body[:output_ResponseCode]
263
+ case result.body[:output_ResponseCode].to_sym
264
264
  when Paymentsds::MPesa::INS9
265
265
  raise RequestTimeoutError
266
266
  else
@@ -268,7 +268,7 @@ module Paymentsds
268
268
  end
269
269
 
270
270
  when 409
271
- case result.body[:output_ResponseCode]
271
+ case result.body[:output_ResponseCode].to_sym
272
272
  when Paymentsds::MPesa::INS10
273
273
  raise DuplicateTransactionError
274
274
  else
@@ -276,7 +276,7 @@ module Paymentsds
276
276
  end
277
277
 
278
278
  when 422
279
- case result.body[:output_ResponseCode]
279
+ case result.body[:output_ResponseCode].to_sym
280
280
  when Paymentsds::MPesa::INS2006
281
281
  raise InsufficientBalanceError
282
282
  else
@@ -284,7 +284,7 @@ module Paymentsds
284
284
  end
285
285
 
286
286
  when 500
287
- case result.body[:output_ResponseCode]
287
+ case result.body[:output_ResponseCode].to_sym
288
288
  when Paymentsds::MPesa::INS1
289
289
  raise InternalError
290
290
  else
@@ -292,7 +292,7 @@ module Paymentsds
292
292
  end
293
293
 
294
294
  when 503
295
- case result.body[:output_ResponseCode]
295
+ case result.body[:output_ResponseCode].to_sym
296
296
  when Paymentsds::MPesa::INS16
297
297
  raise UnavailableServerError
298
298
  else
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Paymentsds
4
4
  module MPesa
5
- VERSION = '0.1.0.pre.alpha.36'
5
+ VERSION = '0.1.0.pre.alpha.37'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
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.36
4
+ version: 0.1.0.pre.alpha.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edson Michaque