tckimlikdogrulama 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tckimlikdogrulama/version.rb +1 -1
- data/lib/tckimlikdogrulama.rb +7 -10
- metadata +1 -1
data/lib/tckimlikdogrulama.rb
CHANGED
@@ -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
|