wip
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user