| 12345678910111213141516171819202122 |
- <?php
-
- namespace App\Console\Commands;
-
- use App\Commerce\PaymentDoubleCheck;
- use Illuminate\Console\Attributes\Description;
- use Illuminate\Console\Attributes\Signature;
- use Illuminate\Console\Command;
-
- #[Signature('orders:check-payments')]
- #[Description('Ask Stripe and HitPay about orders still awaiting payment, in case a payment was missed')]
- class CheckOrderPayments extends Command
- {
- public function handle(PaymentDoubleCheck $doubleCheck): int
- {
- $result = $doubleCheck->run();
-
- $this->info("Checked {$result['checked']} unpaid orders: {$result['paid']} were paid, {$result['failed']} could not be checked, {$result['reminded']} shoppers reminded by email. {$result['given_up']} marked not paid after a day.");
-
- return self::SUCCESS;
- }
- }
|