Changeset View
Changeset View
Standalone View
Standalone View
src/app/Console/Commands/WalletCharge.php
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | public function handle() | ||||
$charge = $wallet->expectedCharges(); | $charge = $wallet->expectedCharges(); | ||||
if ($charge > 0) { | if ($charge > 0) { | ||||
$this->info( | $this->info( | ||||
"charging wallet {$wallet->id} for user {$wallet->owner->email} with {$charge}" | "charging wallet {$wallet->id} for user {$wallet->owner->email} with {$charge}" | ||||
); | ); | ||||
$wallet->chargeEntitlements(); | $wallet->chargeEntitlements(); | ||||
if ($wallet->balance < 0) { | |||||
// Disabled for now | |||||
// \App\Jobs\WalletPayment::dispatch($wallet); | |||||
} | |||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } |