PDA

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : مشکل با redreseller.com API



mrcic
August 5th, 2018, 14:44
باسلام
درحال کار با api redreseller.com هستم به وسیله نمونه کد های که تو بخش ارماشیگاهش بود یک تیکه کدی نوشتم برای اسکریپت خودم تمام داده ها رو هم به صورت درست ارسال میکنم اما با ارور -22 مواجعه میشم
ممنون مشیم کسانی که با این api کار کردن راهنماییم کنن

مفهموم خطا -22 : وب سرویس با توجه به اطلاعات ارسال شده نادرست می باشد



<?php

function redreseller_RegisterDomain($sld, $tld, $NICHandle, $Webservice_id, $Webservice_pass, $ns1, $ns2, $ns3, $ns4)
{
$domain = $sld . '.' . $tld;
$handle = $NICHandle;
$duration = 12;
$testmode = "off";

$client = new SoapClient('http://www.redreseller.com/WebService/wsdl');
$res = $client->PayDomain(
['webservice_id' => $Webservice_id, 'webservice_pass' => $Webservice_pass],
$domain,
$handle,
$duration,
[
'ns1' => $ns1,
'ns2' => $ns2,
'ns3' => $ns3,
'ns4' => $ns4,
]
);


if ($testmode == 'on') {
if ((int)$res != 1001) {
$values['error'] = 'error number = ' . $res;
}
} else {
if ((int)$res != 1000) {
$values['error'] = 'error number = ' . $res;
}
}

return $values;
}

$sld = "sitename";
$tld = "ir";
$ns1 = "ns1.parkina.com";
$ns2 = "ns2.parkina.com";
$ns3 = "ns3.parkina.com";
$ns4 = "ns4.parkina.com";
$NICHandle = "*******";
$Webservice_id = "************";
$Webservice_pass = "*********";


print_r(redreseller_RegisterDomain($sld, $tld, $NICHandle, $Webservice_id, $Webservice_pass, $ns1, $ns2, $ns3, $ns4));