Я пытаюсь внедрить adyen api в свой проект и столкнулся со следующей проблемой:
Сначала я получаю обратный вызов уведомления от adyen с AUTHORIZATION true и статусом транзакции 1, но после этого я не получаю никаких других уведомлений. Даже если процесс оплаты CAPTURED true, уведомление не приходит.
Я протестировал уведомления 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]');
Любые идеи, почему это происходит?