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([ $onlinePaymentHistory = new OnlinePaymentHistory();
'online_paymantable_id' => $resource->id, $onlinePaymentHistory->online_paymantable_id = $resource->id;
'online_paymantable_type' => $resource::$model, $onlinePaymentHistory->online_paymantable_type = $resource::$model;
'amount' => $resource->priceAmount(), $onlinePaymentHistory->amount = $resource->priceAmount();
'orderNumber' => $orderNumber, $onlinePaymentHistory->orderNumber = $orderNumber;
'description' => 'Kart tölegi', $onlinePaymentHistory->description = 'Kart tölegi';
'orderId' => $paymentResponse['orderId'], $onlinePaymentHistory->orderId = $paymentResponse['orderId'];
'formUrl' => $paymentResponse['formUrl'], $onlinePaymentHistory->formUrl = $paymentResponse['formUrl'];
'successUrl' => route('online-payment-store'), $onlinePaymentHistory->successUrl = route('online-payment-store');
'errorUrl' => route('online-payment-store'), $onlinePaymentHistory->errorUrl = route('online-payment-store');
'api_client' => config('app.url'), $onlinePaymentHistory->api_client = config('app.url');
'username' => $resource->branch->billing_username, $onlinePaymentHistory->username = $resource->branch->billing_username;
'paymentStatus' => self::PENDING, $onlinePaymentHistory->paymentStatus = self::PENDING;
]); $onlinePaymentHistory->save();
return [ return [
'status' => 'success', 'status' => 'success',