我有一个要通过SOAP发送的对象:
$Properties= array();
if( !empty( $email ) ) {
$Properties[] = new SoapVar((object) ['name' => 'Email', 'value' => $email], SOAP_ENC_OBJECT, null, null, 'property');
}
if( !empty( $country) ) {
$Properties[] = new SoapVar((object) ['name' => 'Country', 'value' => $country], SOAP_ENC_OBJECT, null, null, 'property');
}
$Properties = (object) $Properties;
实际呼叫是:
$RESULTS = $client->CheckDetails(
new SoapParam( $Properties, 'txn_properties' ),
);
这在运行PHP 5.4的开发服务器上有效,并且我正在获得结果。
但是在运行PHP 7.2的生产服务器上,我得到:
{"status":-1,"err":{"faultstring":"Bad Request","faultcode":"HTTP"}}
我正在查看PHP文档,但找不到适用于PHP 7.2的其他方法。