cobisja / tad-php

PHP Library for ZK Time & Attendance Devices
MIT License
213 stars 159 forks source link

Fingerprint x100-x cant write template #78

Open myhardez opened 5 years ago

myhardez commented 5 years ago

I try to write template but i have error. please help me


$options = [ 'ip' => '192.168.200.4',
'com_key' => xxxxx,
'soap_port' => 80,
'udp_port' => 4370,
'encoding' => 'utf-8' ];

$tad_factory = new TADFactory($options); $tad = $tad_factory->get_instance();

$user_info = [ 'pin' => 2, 'name' => 'Mustapha Ramadhan', 'password' => 8888, 'privilege' => 0, ]; $r = $tad->set_user_info($user_info);

$template1_vx9 = "ocosgoulTUEdNKVRwRQ0I27BDTEkdMEONK9KQQunMVSBK6VPLEENk9MwgQ+DP3PBC1FTXEEG4ihpQQQ3vFQBO4K+WwERYilHAQ8ztktBEBbKQ0ELDtJrwQ7dqCiBCz+/IgEGKrBjQQhEO0zBFQNDQYEKFbhrQQdLF1wBDxclfUELMNFXwQRvvmHBCslKUAEZfU1OQRzmIU5BXRW0eoEKPMltgQnQGUyBJQSfRIEUSzIdAQ45l3gBByHUTMEJ5yVhQQmi0UZBFHvYPUEGeKxTAQ6rFGNBCIYURoEOZS9VwR+1M4RoE5m0DRUTF8DHd6HdqxHAxWmj393M28DDX2FkanKi/t7LGsDCWqGarmt1BaL/25nAwVaiipu/cgcQGKG6mcDBU6KYmr5wChQcobmJIsDBUKKJmZ1uExyi+ZaYwMFMgU2CQCSinYdnJsDBR4Ghl3Q4owa3dnfAwUamdlZlR5p2Zi7AwUSndERlfOpWZlfAwUOiQzVkLDhDopRUVTLAwT2iQ0ZjIzVMolNFRcDBN6I0ZlQebVaiEjRVwMEyolVVUxVxXKEBRUTAwS+iZVYyD3JhoQJFTMDBLKJlVUIKcWShBVVTwMIkoWVkFQhyaaEVZ1rAwh6hVlUPAW+iNGd3wMIToWdlBnWiRWZ3aMDDCqRmZjRpZmrAxASjd2Vnh2/gAA=="; $template1_data = [ 'pin' => $user_info['pin'], 'finger_id' => 0, 'size' => 514, 'valid' => 1, 'template' => $template1_vx9 ]; $response = $tad->set_user_template( $template1_data );

echo $response->to_json();

---------RESULT-------------------- {"Row":{"Result":"0","Information":"Write the template fail!"}}

whoamikenken commented 5 years ago

How do you get the template?

alkaram-ammar commented 5 years ago

How do you get the template?

If it is recorded you can get VIA get_response_body function