This commit is contained in:
2024-10-14 20:40:45 +05:00
parent 94cc0e2d19
commit 0238267c49

View File

@@ -70,20 +70,20 @@ class OnlinePaymentRepo
];
}
OnlinePaymentHistory::create([
'online_paymantable_id' => $resource->id,
'online_paymantable_type' => $resource::$model,
'amount' => $resource->priceAmount(),
'orderNumber' => $orderNumber,
'description' => 'Kart tölegi',
'orderId' => $paymentResponse['orderId'],
'formUrl' => $paymentResponse['formUrl'],
'successUrl' => route('online-payment-store'),
'errorUrl' => route('online-payment-store'),
'api_client' => config('app.url'),
'username' => $resource->branch->billing_username,
'paymentStatus' => self::PENDING,
]);
$onlinePaymentHistory = new OnlinePaymentHistory();
$onlinePaymentHistory->online_paymantable_id = $resource->id;
$onlinePaymentHistory->online_paymantable_type = $resource::$model;
$onlinePaymentHistory->amount = $resource->priceAmount();
$onlinePaymentHistory->orderNumber = $orderNumber;
$onlinePaymentHistory->description = 'Kart tölegi';
$onlinePaymentHistory->orderId = $paymentResponse['orderId'];
$onlinePaymentHistory->formUrl = $paymentResponse['formUrl'];
$onlinePaymentHistory->successUrl = route('online-payment-store');
$onlinePaymentHistory->errorUrl = route('online-payment-store');
$onlinePaymentHistory->api_client = config('app.url');
$onlinePaymentHistory->username = $resource->branch->billing_username;
$onlinePaymentHistory->paymentStatus = self::PENDING;
$onlinePaymentHistory->save();
return [
'status' => 'success',