This commit is contained in:
2026-03-12 01:51:27 +05:00
parent 924ed64527
commit 45ca714b17
3 changed files with 57 additions and 0 deletions

View File

@@ -663,6 +663,14 @@ function syncVisaWithAzatAPI(VisaMasterPaymentOrderItem $orderItem): array
];
}
if (! isset($response['authRefNum'])) {
warn('payment missing authRefNum', $onlinePaymentResource->orderId);
return [
'error' => 'authRefNum missing',
'type' => 'modal',
];
}
$systemRawResponse = syncWithBankSystem(
online_payment_order_uuid: $onlinePaymentResource->orderId,
bank_unique_code: $visaPaymentOrder->branch->unique_code,
@@ -709,3 +717,12 @@ function syncVisaWithAzatAPI(VisaMasterPaymentOrderItem $orderItem): array
'type' => 'modal',
];
}
function warn($message, $content) {
DB::table('warnings')->insert([
$message => $message,
$content => $content,
'created_at' => now(),
'updated_at' => now(),
]);
}

11
app/Models/Warning.php Normal file
View File

@@ -0,0 +1,11 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Warning extends Model
{
use HasFactory;
}

View File

@@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('warnings', function (Blueprint $table) {
$table->id();
$table->string('message');
$table->text('content');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('warnings');
}
};