我想用这些代码拨打肥皂:
$fields = array(
"Token_param" => array(
"AMOUNT" => $this->getEncryptedAmount(),
"CRN" => $this->getEncryptedTrancactionId(),
"MID" => $this->getEncryptedMerchantId(),
"REFERALADRESS" => $this->getEncryptedCallbackUrl(),
"SIGNATURE" => $this->createSignature(),
"TID" => $this->getEncryptedTerminalId()
)
);
try {
$ops = array ('soap' => array(
'attempts' => 2 // Attempts if soap connection is fail
) );
$soap = new SoapClient($this->serverUrl,$ops, array("stream_context" => stream_context_create(
array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
)
)
)));
$response = $soap->reservation($fields);
} catch(\SoapFault $e) {
$this->transactionFailed();
$this->newLog('SoapFault', $e->getMessage());
throw $e;
}
但我明白了: SoapClient :: SoapClient():参数无效
我认为肥皂客户端的第二个参数存在问题。