mblox soap api - php soap付款请求无效并出错。
我在subscribe.php文件中使用如下代码...
$client = new SoapClient("https://ngp.us.mblox.com/client-gateway/services?wsdl", array('trace' => 1, 'encoding' => 'UTF-8', 'soap_version' => SOAP_1_2));
$array = array(
'SecurityContext'=>array('userId'=>'aaaaaaaa','password'=>'bbbbbbbb'),
'ClientDetails'=>array('shortcode'=>'234242', 'brandName'=>'aaaaaaaaaa.com', 'programSponsor'=>'aaaaaaaaaa', 'originatingUrl'=>'www.aaaaaaaaaa.com', 'minPageUrl'=>'www.aaaaaaaaaa.com', 'successUrl'=>'www.aaaaaaaaaa.com/subscribConfirm.php', 'cancelUrl'=>'www.aaaaaaaaaa.com', 'tcUrl'=>'www.aaaaaaaaaa.com/terms.html', 'postBackUrl'=>'http://aaaaaaaaaa/subscribe.php'),
'paymentDetails'=>array('paymentType'=>'PSMS', 'amount'=>'9.99', 'currency'=>'USD', 'billingFrequency'=>'MONTHLY'),
'msisdn'=>'243233232',
'serviceId'=>'332',
'operatorId'=>'33343',
'productDescription'=>'Text test',
'optInBody'=>'aaaaaaaaaa',
'browserSessionId'=>'123456',
);
$result = $client->initiatePayment($array);
它在最后一行显示错误如下=> $result = $client->initiatePayment($array);
致命错误:未捕获的SoapFault异常:[(null)] in /aaaaaaaa/Source/developement/PHP/ver1/subscribe.php:97堆栈追踪: 0 /aaaaaaaa/Source/developement/PHP/ver1/subscribe.php(97):SoapClient-> __ call('initiatePayment',Array)#1 /aaaaaaaa/Source/developement/PHP/ver1/subscribe.php(97): SoapClient-> initiatePayment(数组)#2 {main}引入 第97行/aaaaaaaa/Source/developement/PHP/ver1/subscribe.php