我正在使用以下代码进行 PayPal 链式付款
require_once ("paypalplatform.php");
$amount=100;
$amt1=($amount * 10 )/100;
$amt2=$amount-$amt1;
$actionType = "PAY";
$cancelUrl = "http://test.com/test";
$returnUrl = "http://test.com/test";
$currencyCode = "USD";
$receiverEmailArray = array(
'a***********_per@gmail.com',
'a***********_biz@gmail.com'
);
$receiverAmountArray = array(
$amt1,
$amt2
);
$receiverPrimaryArray = array();
$receiverInvoiceIdArray = array(
'1',
'2'
);
$senderEmail = "a************_per@gmail.com";
$feesPayer = "";
$ipnNotificationUrl = "http://test.com/paypal/buynow.php";
$memo = "";
$pin = "agalameex";
$preapprovalKey = "";
$reverseAllParallelPaymentsOnError = "";
$trackingId = generateTrackingID();
$resArray = CallPay ($actionType, $cancelUrl, $returnUrl, $currencyCode, $receiverEmailArray,
$receiverAmountArray, $receiverPrimaryArray, $receiverInvoiceIdArray,
$feesPayer, $ipnNotificationUrl, $memo, $pin, $preapprovalKey,
$reverseAllParallelPaymentsOnError, $senderEmail, $trackingId
);
$ack = strtoupper($resArray["responseEnvelope.ack"]);
if($ack=="SUCCESS")
{
if ("" == $preapprovalKey)
{
// redirect for web approval flow
$cmd = "cmd=_ap-payment&paykey=" . urldecode($resArray["payKey"]);
RedirectToPayPal ( $cmd );
}
else
{
// payKey is the key that you can use to identify the result from this Pay call
$payKey = urldecode($resArray["payKey"]);
// paymentExecStatus is the status of the payment
$paymentExecStatus = urldecode($resArray["paymentExecStatus"]);
}
}
else
{
//Display a user friendly Error on the page using any of the following error information returned by PayPal
//TODO - There can be more than 1 error, so check for "error(1).errorId", then "error(2).errorId", and so on until you find no more errors.
$ErrorCode = urldecode($resArray["error(0).errorId"]);
$ErrorMsg = urldecode($resArray["error(0).message"]);
$ErrorDomain = urldecode($resArray["error(0).domain"]);
$ErrorSeverity = urldecode($resArray["error(0).severity"]);
$ErrorCategory = urldecode($resArray["error(0).category"]);
echo "Preapproval API call failed. ";
echo "Detailed Error Message: " . $ErrorMsg;
echo "Error Code: " . $ErrorCode;
echo "Error Severity: " . $ErrorSeverity;
echo "Error Domain: " . $ErrorDomain;
echo "Error Category: " . $ErrorCategory;
}
在上面的代码中,除了返回通知 ($ipnNotificationUrl) 之外,一切都运行良好。付款完成后,我没有收到来自 $ipnNotificationUrl 的任何通知。任何机构都可以帮助我吗?