贝宝 API GetVerifiedStatus 不工作

PayPal API GetVerifiedStatus not working

所以我一直在尝试将 PayPal 的 GetVerifiedStatus API 实施到我的网站中,但 运行 出现以下错误:

Fatal error: Uncaught Error: Class 'PayPal\Types\AA\GetVerifiedStatusRequest' not found in C:\xampp\htdocs\paypaltest\getversys.php:14 Stack trace: #0 {main} thrown in C:\xampp\htdocs\paypaltest\getversys.php on line 14

可能是什么问题?我能够弄清楚的是那个特定的目录丢失了。但是我不知道如何得到它,因为我一直在寻找它,但没有成功。

我一直在使用与 PayPal SDK 提供的完全相同的代码。这是:

<?php
use PayPal\Service\AdaptiveAccountsService;
use PayPal\Types\AA\AccountIdentifierType;
use PayPal\Types\AA\GetVerifiedStatusRequest;
require_once('bootstrap.php');
$getVerifiedStatus = new GetVerifiedStatusRequest();


$accountIdentifier=new AccountIdentifierType();


$accountIdentifier->emailAddress = $_REQUEST['emailAddress'];
$getVerifiedStatus->accountIdentifier=$accountIdentifier;


$getVerifiedStatus->firstName = $_REQUEST['firstName'];


$getVerifiedStatus->lastName = $_REQUEST['lastName'];
$getVerifiedStatus->matchCriteria = $_REQUEST['matchCriteria'];


$service  = new AdaptiveAccountsService(Configuration::getAcctAndConfig());
try {

    $response = $service->GetVerifiedStatus($getVerifiedStatus);
} catch(Exception $ex) {
    require_once 'Common/Error.php';
    exit;
} 

$ack = strtoupper($response->responseEnvelope->ack);
if($ack != "SUCCESS"){
    echo "<b>Error </b>";
    echo "<pre>";
    print_r($response);
    echo "</pre>";      
} else {
echo "<pre>";
print_r($response);
echo "</pre>";
echo "<table>";
echo "<tr><td>Ack :</td><td><div id='Ack'>$ack</div> </td></tr>";
echo "</table>";        
}


require_once 'Common/Response.php';

所以我在这里回答我自己的问题,因为我联系了 PayPal 技术支持,并被告知 GetVerifiedStatus API 现在已弃用,无法使用。

这就是错误的原因。