mxit_api 0.2.0.pre → 0.2.1.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mxit_api/version.rb +1 -1
- data/lib/mxit_money_api/initialize.rb +5 -3
- data/lib/mxit_money_api/issue_money.rb +5 -3
- data/mxit_api.gemspec +2 -2
- metadata +3 -3
data/lib/mxit_api/version.rb
CHANGED
@@ -17,9 +17,11 @@ class MxitMoneyApi
|
|
17
17
|
url = URI.parse('https://m2api.fireid.com/paymentsplatform/rest/v3/push/')
|
18
18
|
req = Net::HTTP::Get.new(url.path, 'Accept'=>'application/json')
|
19
19
|
req.basic_auth(api_key,"mxit_money_api")
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
response = Net::HTTP.start(url.host, url.port,
|
21
|
+
:use_ssl => url.scheme == 'https',
|
22
|
+
:verify_mode => OpenSSL::SSL::VERIFY_NONE) do |https|
|
23
|
+
https.request(req)
|
24
|
+
end
|
23
25
|
if response.code == '200'
|
24
26
|
data = ActiveSupport::JSON.decode(response.body)
|
25
27
|
@balance = data['balance']
|
@@ -7,9 +7,11 @@ class MxitMoneyApi
|
|
7
7
|
'Accept'=>'application/json',
|
8
8
|
'Content-Type' =>'application/json')
|
9
9
|
req.basic_auth(api_key,"mxit_money_api".to_s)
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
response = Net::HTTP.start(url.host, url.port,
|
11
|
+
:use_ssl => url.scheme == 'https',
|
12
|
+
:verify_mode => OpenSSL::SSL::VERIFY_NONE) do |https|
|
13
|
+
https.request(req)
|
14
|
+
end
|
13
15
|
if response.code == '200' || response.code == '401' || response.code == '500' || response.code == '400'
|
14
16
|
@balance = nil
|
15
17
|
data = ActiveSupport::JSON.decode(response.body)
|
data/mxit_api.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "mxit_api"
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.1.pre"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Grant Speelman"]
|
12
|
-
s.date = "2013-01-
|
12
|
+
s.date = "2013-01-18"
|
13
13
|
s.description = "gem to use the Mxit APIs at http://dev.mxit.com/docs/ "
|
14
14
|
s.email = "grant.speelman@unboxedconsulting.com"
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mxit_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1.pre
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -231,7 +231,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
231
231
|
version: '0'
|
232
232
|
segments:
|
233
233
|
- 0
|
234
|
-
hash:
|
234
|
+
hash: -4321529454908252784
|
235
235
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
236
236
|
none: false
|
237
237
|
requirements:
|