@@ -1222,6 +1222,66 @@ public function contactUpdate($params = array())
12221222 return $ return ;
12231223 }
12241224
1225+ /**
1226+ * contactUpdateAuthinfo
1227+ */
1228+ public function contactUpdateAuthinfo ($ params = array ())
1229+ {
1230+ if (!$ this ->isLoggedIn ) {
1231+ return array (
1232+ 'code ' => 2002 ,
1233+ 'msg ' => 'Command use error '
1234+ );
1235+ }
1236+
1237+ $ return = array ();
1238+ try {
1239+ $ from = $ to = array ();
1240+ $ from [] = '/{{ id }}/ ' ;
1241+ $ to [] = htmlspecialchars ($ params ['contactid ' ]);
1242+ $ from [] = '/{{ authInfo }}/ ' ;
1243+ $ to [] = htmlspecialchars ($ params ['authInfo ' ]);
1244+ $ from [] = '/{{ clTRID }}/ ' ;
1245+ $ clTRID = str_replace ('. ' , '' , round (microtime (1 ), 3 ));
1246+ $ to [] = htmlspecialchars ($ this ->prefix . '-contact-updateAuthinfo- ' . $ clTRID );
1247+ $ from [] = "/<\w+:\w+>\s*<\/\w+:\w+>\s+/ims " ;
1248+ $ to [] = '' ;
1249+ $ xml = preg_replace ($ from , $ to , '<?xml version="1.0" encoding="UTF-8" standalone="no"?>
1250+ <epp xmlns="urn:ietf:params:xml:ns:epp-1.0"
1251+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1252+ xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd">
1253+ <command>
1254+ <update>
1255+ <contact:update
1256+ xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
1257+ <contact:id>{{ id }}</contact:id>
1258+ <contact:chg>
1259+ <contact:authInfo>
1260+ <contact:pw>{{ authInfo }}</contact:pw>
1261+ </contact:authInfo>
1262+ </contact:chg>
1263+ </contact:update>
1264+ </update>
1265+ <clTRID>{{ clTRID }}</clTRID>
1266+ </command>
1267+ </epp> ' );
1268+ $ r = $ this ->writeRequest ($ xml );
1269+ $ code = (int )$ r ->response ->result ->attributes ()->code ;
1270+ $ msg = (string )$ r ->response ->result ->msg ;
1271+
1272+ $ return = array (
1273+ 'code ' => $ code ,
1274+ 'msg ' => $ msg
1275+ );
1276+ } catch (\Exception $ e ) {
1277+ $ return = array (
1278+ 'error ' => $ e ->getMessage ()
1279+ );
1280+ }
1281+
1282+ return $ return ;
1283+ }
1284+
12251285 /**
12261286 * contactUpdateStatus
12271287 */
@@ -1670,7 +1730,7 @@ public function domainCheckFee($params = array())
16701730 $ to [] = $ feeExtXml ;
16711731 $ from [] = '/{{ clTRID }}/ ' ;
16721732 $ microtime = str_replace ('. ' , '' , round (microtime (1 ), 3 ));
1673- $ to [] = htmlspecialchars ($ this ->prefix . '-domain-checkClaims - ' . $ microtime );
1733+ $ to [] = htmlspecialchars ($ this ->prefix . '-domain-checkFee - ' . $ microtime );
16741734 $ from [] = "/<\w+:\w+>\s*<\/\w+:\w+>\s+/ims " ;
16751735 $ to [] = '' ;
16761736 $ xml = preg_replace ($ from , $ to , '<?xml version="1.0" encoding="UTF-8" standalone="no"?>
0 commit comments