Skip to content

Instantly share code, notes, and snippets.

@wemrekurt
Created December 19, 2022 18:28
Show Gist options
  • Select an option

  • Save wemrekurt/b532cf57f2d4e984ecc35abc95b28e12 to your computer and use it in GitHub Desktop.

Select an option

Save wemrekurt/b532cf57f2d4e984ecc35abc95b28e12 to your computer and use it in GitHub Desktop.
TC Validate
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