This commit is contained in:
2025-04-23 11:43:04 +05:00
parent 204b302768
commit 2a22ad31bb
2 changed files with 15 additions and 3 deletions

View File

@@ -17,6 +17,15 @@ class CheckOnlinePaymentStatus extends Action
{
use InteractsWithQueue, Queueable;
/**
* @property string $paymantable_type Payment Related Class
*/
public function __construct(
protected string $paymantable_type,
) {
// ...
}
/**
* Perform the action on the given models.
*
@@ -26,11 +35,10 @@ class CheckOnlinePaymentStatus extends Action
*/
public function handle(ActionFields $fields, Collection $models)
{
/** @var \App\Models\Order\Card\CardOrder $item */
$item = $models->first();
$onlinePaymentResource = OnlinePaymentHistory::query()
->where('online_paymantable_type', 'App\Models\Order\Card\CardOrder')
->where('online_paymantable_type', $this->paymantable_type)
->where('online_paymantable_id', $item->id)
->first();