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 异常:/aaaaaaaa/Source/developement/PHP/ver1/subscribe.php:97 中的 [(null)] 堆栈跟踪:0 /aaaaaaaa/Source/developement/PHP/ver1/subscribe.php(97) : SoapClient->__call('initiatePayment', Array) #1 /aaaaaaaa/Source/developement/PHP/ver1/subscribe.php(97): SoapClient->initiatePayment(Array) #2 {main} throw in /aaaaaaaa/Source /developement/PHP/ver1/subscribe.php 第 97 行