This commit is contained in:
2026-03-12 02:28:50 +05:00
parent 2bd2c45ddb
commit 03c692adbb
4 changed files with 80 additions and 15 deletions

View File

@@ -550,6 +550,16 @@ function syncSberWithAzatAPI(SberPaymentOrderItem $orderItem): array
];
}
if (! isset($response['authRefNum'])) {
warn('missing-authRefNum', $onlinePaymentResource->orderId);
ignoreSberPayment('missing-authRefNum', $orderItem);
return [
'error' => 'authRefNum missing',
'type' => 'modal',
];
}
$systemRawResponse = syncWithBankSystem(
online_payment_order_uuid: $onlinePaymentResource->orderId,
bank_unique_code: $sberPaymentOrder->branch->unique_code,
@@ -665,7 +675,7 @@ function syncVisaWithAzatAPI(VisaMasterPaymentOrderItem $orderItem): array
if (! isset($response['authRefNum'])) {
warn('missing-authRefNum', $onlinePaymentResource->orderId);
ignorePayment('missing-authRefNum', $orderItem);
ignoreVisaPayment('missing-authRefNum', $orderItem);
return [
'error' => 'authRefNum missing',
@@ -729,7 +739,7 @@ function warn($message, $content) {
]);
}
function ignorePayment($message, $item) {
function ignoreVisaPayment($message, $item) {
DB::table('ignore_visa_payments')->insert([
'message' => $message,
'payment_id' => $item->id,
@@ -737,3 +747,12 @@ function ignorePayment($message, $item) {
'updated_at' => now(),
]);
}
function ignoreSberPayment($message, $item) {
DB::table('ignore_sber_payments')->insert([
'message' => $message,
'payment_id' => $item->id,
'created_at' => now(),
'updated_at' => now(),
]);
}