我无法在那里获得 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;