我正在尝试将 adyen api 实施到我的项目中,但遇到以下问题:
起初,我收到来自 adyen 的通知回调,其中 AUTHORIZATION 为 true,事务状态为 1,但在此之后,我没有收到任何其他通知。即使支付过程被捕获为真,通知也不会到达。
我已经在 adyen 沙箱中测试了 adyen 通知,并且通知可以正常工作。这是回调文件的代码示例:
if (($eventCode=="AUTHORISATION") && ($success=="true"))
{
if($paymentRecharge['status']!=0) //Check if status is placed only
{
ReleaseTableLock($orderID);
print('[accepted]');
return;
}
if (($paymentRecharge['adyen_amount']!=$value) || ($paymentRecharge['currency']!=$currency)) //Check to see if the paid value is the same as our value, otherwise this is Fraud
{
SetPaymentStatus($orderID,5);
ReleaseTableLock($orderID);
print('[accepted]');
return;
}
MarkAsAuthorised($orderID); //changes status to 1 - authorised
//check if we need to Capture automatically
if($adyenParams['adyen_capture']==1)
{
$adyen = new AdyenGateway();
$data = array();
$data["params"] = $adyenParams;
$data["userId"] = $paymentRecharge['customerId'];
$response;
$result=$adyen->Capture($data,$pspReference,$response,$paymentRecharge['userId'],$paymentRecharge['adyen_amount'],$paymentRecharge['currency']);
}
}
if (($eventCode=="AUTHORISATION") && ($success=="false"))
{
SetPaymentStatus($orderID,6);
ReleaseTableLock($orderID);
print('[accepted]');
return;
}
if (($eventCode=="CAPTURE") && ($success=="true"))
{
SetPaymentStatus($orderID,2);
ProcessPayment($orderID);
}
//Release the payment order lock
ReleaseTableLock($orderID);
print('[accepted]');
为什么会发生这种情况的任何想法?