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 からの通知がありません。これで私を助けることができる体はありますか?