点击付款';支付';公司管理面板中的按钮';在php中使用自适应支付将客户的paypal帐户转换为payal帐户

点击付款';支付';公司管理面板中的按钮';在php中使用自适应支付将客户的paypal帐户转换为payal帐户,php,paypal,paypal-sandbox,paypal-adaptive-payments,Php,Paypal,Paypal Sandbox,Paypal Adaptive Payments,我想通过点击管理面板中的“支付”按钮,使用php中的自适应支付将钱从公司的paypal帐户转移到客户的payal帐户 我为此做了很多尝试,但每次都失败了。请帮忙 我也遵循这一点 注意:-我在本地主机上运行它,并使用付费沙箱帐户 我目前使用以下代码并使用sdk adaptivepayments sdk php 我的configration.php文件是 <?php class Configuration { public static function getConfig()

我想通过点击管理面板中的“支付”按钮,使用php中的自适应支付将钱从公司的paypal帐户转移到客户的payal帐户

我为此做了很多尝试,但每次都失败了。请帮忙

我也遵循这一点

注意:-我在本地主机上运行它,并使用付费沙箱帐户

我目前使用以下代码并使用sdk adaptivepayments sdk php

我的configration.php文件是

<?php

class Configuration {

    public static function getConfig() {
        $config = array(
            "mode" => "sandbox"
        );
        return $config;
    }

    public static function getAcctAndConfig() {
        $config = array(
            // Signature Credential
            "acct1.UserName" => "*************.************.com",
            "acct1.Password" => "**********************",
            "acct1.Signature" => "***************************************",
            "acct1.AppId" => "APP-**********************"
        );

        return array_merge($config, self::getConfig());
        ;
    }
}
请帮帮我

<?php

session_start();
require_once('../PPBootStrap.php');
require_once('../Common/Constants.php');
define("DEFAULT_SELECT", "- Select -");
$returnUrl = "http://localhost/paypal/adaptive/parallel/success.php";
$cancelUrl = "http://localhost/paypal/adaptive/parallel/index.php";
$memo = "Adaptive Payment";
$actionType = "PAY";
$currencyCode = "USD";
$senderEmail ="info@birddog.com";

$receiverEmail = array("manojrana@gmail.com");
$receiverAmount = array("300.00");
$primaryReceiver = array("false");
$_SESSION['facilty_provider'] = array("AirGo Airline's Test Store");

if (isset($receiverEmail)) {
    $receiver = array();
    for ($i = 0; $i < count($receiverEmail); $i++) {
        $receiver[$i] = new Receiver();

        $receiver[$i]->email = $receiverEmail[$i];

        $receiver[$i]->amount = $receiverAmount[$i];
        $receiver[$i]->primary = $primaryReceiver[$i];
    }
    $receiverList = new ReceiverList($receiver);
}

$payRequest = new PayRequest(new RequestEnvelope("en_US"), $actionType, $cancelUrl, $currencyCode, $receiverList, $returnUrl);
// Add optional params

if ($memo != "") {
    $payRequest->memo = $memo;
}


$service = new AdaptivePaymentsService(Configuration::getAcctAndConfig());

try {
    **$response = $service->Pay($payRequest);**
    $ack = strtoupper($response->responseEnvelope->ack);
    if ($ack == "SUCCESS") {
        $_SESSION['pay_key'] = $payKey = $response->payKey;
        $payKey = $response->payKey;
        $payPalURL = PAYPAL_REDIRECT_URL . '_ap-payment&paykey=' . $payKey;
        header('Location: ' . $payPalURL);
    }
} catch (Exception $ex) {
    require_once '../Common/Error.php';
    exit;
}
PayResponse Object
(
    [responseEnvelope] => ResponseEnvelope Object
        (
            [timestamp] => 2017-10-11T22:20:35.114-07:00
            [ack] => Failure
            [correlationId] => aebfb26213bbe
            [build] => 39000598
        )

    [payKey] => 
    [paymentExecStatus] => 
    [payErrorList] => 
    [paymentInfoList] => 
    [sender] => 
    [defaultFundingPlan] => 
    [warningDataList] => 
    [error] => Array
        (
            [0] => ErrorData Object
                (
                    [errorId] => 520003
                    [domain] => PLATFORM
                    [subdomain] => Application
                    [severity] => Error
                    [category] => Application
                    [message] => Authentication failed. API credentials are incorrect.
                    [exceptionId] => 
                    [parameter] => 
                )

        )

)