将NUSOAP转换为PHP5的SOAPClient

时间:2012-10-08 19:03:02

标签: php soap nusoap soap-client

我无法获得PHP5,因为我尝试使用NUSOAP替代PHP5的SoapClient。

如何将这个PHP5 SoapClient代码翻译成NUSOAP?

 $epay_params = array();
$epay_params['merchantnumber'] = "ENTER YOUR MERCHANT NUMBER HERE";
$epay_params['subscriptionid'] = "ENTER THE SUBSCRIPTIONID RETURNED FROM EPAY HERE";
$epay_params['orderid'] = "1234";
$epay_params['amount'] = "9995";
$epay_params['currency'] = "208";
$epay_params['instantcapture'] = "0";
$epay_params['fraud'] = "0";
$epay_params['transactionid'] = "-1";
$epay_params['pbsresponse'] = "-1";
$epay_params['epayresponse'] = "-1";

$client = new SoapClient('https://ssl.ditonlinebetalingssystem.dk/remote/subscription.asmx?WSDL');

$result = $client->authorize($epay_params);

if($result->authorizeResult == true)
{
    $transactionid = $result->transactionid;
}
else
{
    //Error - see pbsresponse and epayresponse
}

我试过这样的事,但我什么都不懂。

include("lib/nusoap.php");
$epay_params = array();
$epay_params['merchantnumber'] = $Payments->merchantnumber;
$epay_params['subscriptionid'] = $_POST['subscriptionname'];
$epay_params['orderid'] = $_POST['orderid'];
$epay_params['amount'] = $_POST['amount'];
$epay_params['currency'] = $_POST['currency'];
$epay_params['instantcapture'] = "0";
$epay_params['fraud'] = "0";
$epay_params['transactionid'] = "-1";
$epay_params['pbsresponse'] = "-1";
$epay_params['epayresponse'] = "-1";


$client = new nusoap_client('https://ssl.ditonlinebetalingssystem.dk/remote/subscription.asmx?WSDL','wsdl');
$client->call("transactionid", $epay_params);

echo $client->authorizeResult;

1 个答案:

答案 0 :(得分:0)

您是否可以澄清您是否尝试删除本地服务器或远程服务器上15分钟的条目?

我通过编写一个sql命令然后将其安排为cronjob,针对我的本地MySQL数据库中的条目对我的网站执行此操作。工作完美无缺。

如果您的问题是要删除远程数据库上的记录,请确保您可以先查询它。 API可能不接受某些SQL语句,例如DELETE。