stan errors fixed
This commit is contained in:
@@ -36,6 +36,9 @@ class MakeSberPaymentAction extends Action
|
||||
|
||||
/**
|
||||
* Perform the action on the given models.
|
||||
*
|
||||
* @param ActionFields $fields
|
||||
* @param Collection<array-key, \App\Modules\SberPaymentOrder\Models\SberPaymentOrder> $models
|
||||
*/
|
||||
public function handle(ActionFields $fields, Collection $models): mixed
|
||||
{
|
||||
@@ -102,7 +105,7 @@ class MakeSberPaymentAction extends Action
|
||||
* Get the fields available on the action.
|
||||
*
|
||||
* @param \Laravel\Nova\Http\Requests\NovaRequest $request
|
||||
* @return array
|
||||
* @return array<int, \Laravel\Nova\Fields\Field>
|
||||
*/
|
||||
public function fields(NovaRequest $request)
|
||||
{
|
||||
@@ -193,8 +196,10 @@ class MakeSberPaymentAction extends Action
|
||||
|
||||
/**
|
||||
* Order a payment page
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public function order($resource, $amount)
|
||||
public function order(SberPaymentOrder $resource, int|float|string $amount): array
|
||||
{
|
||||
$onlinePaymentRepo = OnlinePaymentRepo::make();
|
||||
|
||||
@@ -256,11 +261,14 @@ class MakeSberPaymentAction extends Action
|
||||
/**
|
||||
* Create payment record
|
||||
*
|
||||
* @param $payment
|
||||
* @param $resource
|
||||
* @param array<string, string> $payment
|
||||
*/
|
||||
public function createPaymentRecord($payment, $resource, $total_amount, $usd_payment)
|
||||
{
|
||||
public function createPaymentRecord(
|
||||
array $payment,
|
||||
SberPaymentOrder $resource,
|
||||
int|float|string $total_amount,
|
||||
int|float|string $usd_payment
|
||||
): void {
|
||||
SberPaymentOrderItem::create([
|
||||
'sber_payment_order_id' => $resource->id,
|
||||
'online_payment_history_id' => $payment['online_payment_history_id'],
|
||||
@@ -270,7 +278,12 @@ class MakeSberPaymentAction extends Action
|
||||
]);
|
||||
}
|
||||
|
||||
public function canAcceptPayment($today)
|
||||
/**
|
||||
* Can payment be accepted?
|
||||
*
|
||||
* @param \Illuminate\Support\Carbon $today
|
||||
*/
|
||||
public function canAcceptPayment($today): bool
|
||||
{
|
||||
$year = $today->format('Y');
|
||||
$month = $today->format('m');
|
||||
|
||||
Reference in New Issue
Block a user