tckimlikdogrulama 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Tckimlikdogrulama
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -14,16 +14,7 @@ module Tckimlikdogrulama
14
14
  birth_year = options[:birth_year]
15
15
 
16
16
  client = Savon::Client.new("https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL")
17
- res = client.request(:tc_kimlik_no_dogrula)
18
- {
19
- soap.body =
20
- {
21
- "TCKimlikNo" => identification_number,
22
- "Ad" => UnicodeUtils.upcase(first_name, :tr) ,
23
- "Soyad" => UnicodeUtils.upcase(last_name, :tr),
24
- "DogumYili" => birth_year
25
- }
26
- }
17
+ res = client.request(:tc_kimlik_no_dogrula) {soap.body = { "TCKimlikNo" => identification_number, "Ad" => UnicodeUtils.upcase(first_name, :tr) , "Soyad" => UnicodeUtils.upcase(last_name, :tr), "DogumYili" => birth_year}}
27
18
  unless res.body[:tc_kimlik_no_dogrula_response][:tc_kimlik_no_dogrula_result]
28
19
  self.errors.add(:identification_number, "Doğrulanamadı. Lütfen bilgilerinizi kontrol edip, tekrar deneyiniz.")
29
20
  end
@@ -43,3 +34,9 @@ module Tckimlikdogrulama
43
34
  end
44
35
  end
45
36
  end
37
+
38
+
39
+ class ActiveRecord::Base
40
+ include Tckimlikdogrulama
41
+
42
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tckimlikdogrulama
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: