Paypal SDK は非常にシンプルです。最初に私があなただったら、サンプルコードをインストールしてサーバーで動作することを確認します。以前の経験から、SDK が機能せず、php バージョンの問題が発生するまれなケースがあります。
次に、サーバーで動作することを確認したら、チャート フローは次のようになります。
ステップ 1.) SetExpressCheckout - 請求先住所、商品カートの合計などのすべての必須フィールドを使用して...
それが正しく行われた場合、トークンを取得します。
ステップ 2.) GetExpressCheckout - 以前に取得したトークンを使用して、トークンを渡す GetExpressCheckout を実行します。それが正しく行われた場合、Ack、Token、PayerID、value、currencyID、および基本的にすべての購入の詳細を含むオブジェクトを取得します。
ステップ 3.) DoExpressCheckout - 2 で取得したフィールドを使用して、次のように DoExpressCheckout を実行します。
$path = $pluginfolder.'paypal/lib';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
require_once('services/PayPalAPIInterfaceService/PayPalAPIInterfaceServiceService.php');
require_once('PPLoggingManager.php');
$logger = new PPLoggingManager('DoExpressCheckout');
$token = urlencode( $getToken );
$payerId = urlencode(  $getPayerID);
$paymentAction = urlencode(  $paymentType);
$orderTotal = new BasicAmountType();
$orderTotal->currencyID = $getCurrencyID;
$orderTotal->value = $getOrderTotal;
$paymentDetails= new PaymentDetailsType();
$paymentDetails->OrderTotal = $orderTotal;
if(isset($notifyURL))
{
    $paymentDetails->NotifyURL = $notifyURL;
}
$DoECRequestDetails = new DoExpressCheckoutPaymentRequestDetailsType();
$DoECRequestDetails->PayerID = $payerId;
$DoECRequestDetails->Token = $token;
$DoECRequestDetails->PaymentAction = $paymentAction;
$DoECRequestDetails->PaymentDetails[0] = $paymentDetails;
$DoECRequest = new DoExpressCheckoutPaymentRequestType();
$DoECRequest->DoExpressCheckoutPaymentRequestDetails = $DoECRequestDetails;
$DoECReq = new DoExpressCheckoutPaymentReq();
$DoECReq->DoExpressCheckoutPaymentRequest = $DoECRequest;
/*
* Trying to go a head with the payment and catching errors that might occure.
*/
try {
    /* wrap API method calls on the service object with a try catch */
    $DoECResponse = $paypalService->DoExpressCheckoutPayment($DoECReq);
} catch (Exception $ex) {
    if(isset($ex)) {
        $ex_message = $ex->getMessage();
        $ex_type = get_class($ex);
        if($ex instanceof PPConnectionException) {
            $error[] = "Error connecting to " . $ex->getUrl();
            $errorCheck =  true;
        } else if($ex instanceof PPMissingCredentialException || $ex instanceof PPInvalidCredentialException) {
            $error[] = $ex->errorMessage();
            $errorCheck =  true;
        } else if($ex instanceof PPConfigurationException) {
            $error[] = "Invalid configuration. Please check your configuration file";
            $errorCheck =  true;
        }
    }
}
それが役立つことを願っています。