wip
This commit is contained in:
@@ -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
11
app/Models/Warning.php
Normal 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;
|
||||
}
|
||||
@@ -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');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user