我正在使用 paypal sdk 进行自适应支付(新版本)。在本地服务器上一切正常,但一旦我将它移到另一台服务器上,它就会说。
Fatal error: Class 'string' not found in "path/payment/lib/PPMessage.php" on line 103
两台服务器上的 php 版本相同。我尝试提供相对路径等,但似乎没有任何效果。
请帮忙!谢谢。
最佳答案
我在github上创建了一个issue
https://github.com/paypal/sdk-core-php/issues/92#issuecomment-256091144
解决方案是这样的: 更改 PPMessage.php 的第 75 行
改变这一行: https://github.com/paypal/sdk-core-php/blob/master/lib/PayPal/Core/PPMessage.php#L75
if (!$this->isBuiltInType($type)) {
$type = PPUtils::propertyType($this, $property);
if (!class_exists($type)) {
trigger_error("Class $type not found.", E_USER_NOTICE);
continue; // just ignore
}
}
关于php - fatal error : Class 'string' not found in paypal sdk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14393687/