我能够收到用于接收付款的IPN消息,但我没有收到任何有关MassPay呼叫的IPN消息,并且沙箱中没有通知。有人有这个问题吗?这是我在PHP中用于MassPay的代码
$massPayRequest = new MassPayRequestType();
$massPayRequest->MassPayItem = array();
//Setup vars and loop through post
$payouts = array();
$account_mass_payees = array();
$rowCount = count($message_data);
foreach($message_data as $account_id) {
try {
$account_mass_payee = array();
$account_mass_payee['account_id'] = $account->account_id;
$account_mass_payee['user_id'] = $account->user_id;
$account_mass_payee['username'] = $account->username;
$account_mass_payee['account_type'] = $account->account_type;
$account_mass_payee['balance'] = $account->balance;
$account_mass_payee['paypal_email_address'] = $account_detail->paypal_email_address;
$account_mass_payees[] = $account_mass_payee;
//Create a mass pay item for this account
$masspayItem = new MassPayRequestItemType();
$masspayItem->Amount = new BasicAmountType("USD", $account_mass_payee['balance']);
$masspayItem->ReceiverEmail = $account_mass_payee['paypal_email_address'];
$massPayRequest->MassPayItem[] = $masspayItem;
} catch (\PPConnectionException $ex) {
$result = array (
"Status"=>"Error",
"Description"=>$ex->getMessage()
);
return $result;
}
}
//Send out the group as a batch...
$massPayReq = new MassPayReq();
$massPayReq->MassPayRequest = $massPayRequest;
$paypalService = new PayPalAPIInterfaceServiceService(PayPalConfig::getAcctAndConfig());
/////////////////////////
// PayPal Payment Request
/////////////////////////
try {
$massPayResponse = $paypalService->MassPay($massPayReq);
error_log(print_r($massPayResponse), true);
} catch (Exception $ex) {
$result = array (
"Status"=>"Error",
"Description"=>$ex->getMessage()
);
return $result;
}
以下是我在json中收到的示例结果:
{
"Timestamp": "2013-12-11T19:13:16Z",
"Ack": "Success",
"CorrelationID": "9c60bcac3****",
"Errors": null,
"Version": "106.0",
"Build": "8725992"
}
非常感谢任何帮助。
谢谢!