Created
December 19, 2022 18:28
-
-
Save wemrekurt/b532cf57f2d4e984ecc35abc95b28e12 to your computer and use it in GitHub Desktop.
TC Validate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module TcValidate | |
| def self.validate(tc, name, surname, birth) | |
| client = Savon.client(wsdl: 'https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL') | |
| res = client.call(:tc_kimlik_no_dogrula, message: { 'TCKimlikNo' => tc.to_i, 'Ad' => name, 'Soyad' => surname, 'DogumYili' => birth.to_i }) | |
| res.body | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment