wip
This commit is contained in:
@@ -10,6 +10,17 @@ class CreateCardOrder extends CreateRecord
|
||||
{
|
||||
protected static string $resource = CardOrderResource::class;
|
||||
|
||||
/**
|
||||
* @return array<Action | ActionGroup>
|
||||
*/
|
||||
protected function getFormActions(): array
|
||||
{
|
||||
return [
|
||||
$this->getCreateFormAction(),
|
||||
$this->getCancelFormAction(),
|
||||
];
|
||||
}
|
||||
|
||||
protected function getRedirectUrl(): string
|
||||
{
|
||||
$defaultUrl = $this->getResource()::getUrl('index');
|
||||
@@ -17,11 +28,11 @@ class CreateCardOrder extends CreateRecord
|
||||
/** @var \App\Modules\CardOrder\Models\CardOrder */
|
||||
$record = $this->record;
|
||||
|
||||
$OnlinePayment = CardOrderRepository::make()
|
||||
$onlinePayment = CardOrderRepository::make()
|
||||
->createOnlinePaymentOrder($record);
|
||||
|
||||
return $OnlinePayment->successful()
|
||||
? $OnlinePayment->paymentLink()
|
||||
return $onlinePayment->successful()
|
||||
? $onlinePayment->paymentLink()
|
||||
: $defaultUrl;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user