From 5b2e3a1828536b20c455dbf54bcbbd604624a5b4 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Mon, 11 Aug 2025 11:39:45 +0800 Subject: [PATCH 1/3] Debug an old 504 problem at payment-and-billing page > pending payment tab with no data --- .../SingleAdminPaymentsBillingWithStorageComponent.vue | 4 ++-- .../SingleAdminPaymentsBillingWithoutStorageComponent.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/assets/vue/components/paymentsBilling/elements/SingleAdminPaymentsBillingWithStorageComponent.vue b/resources/assets/vue/components/paymentsBilling/elements/SingleAdminPaymentsBillingWithStorageComponent.vue index 5839794f..28e5730a 100644 --- a/resources/assets/vue/components/paymentsBilling/elements/SingleAdminPaymentsBillingWithStorageComponent.vue +++ b/resources/assets/vue/components/paymentsBilling/elements/SingleAdminPaymentsBillingWithStorageComponent.vue @@ -75,9 +75,9 @@
- +
diff --git a/resources/assets/vue/components/paymentsBilling/elements/SingleAdminPaymentsBillingWithoutStorageComponent.vue b/resources/assets/vue/components/paymentsBilling/elements/SingleAdminPaymentsBillingWithoutStorageComponent.vue index f92fee28..bb3533ba 100644 --- a/resources/assets/vue/components/paymentsBilling/elements/SingleAdminPaymentsBillingWithoutStorageComponent.vue +++ b/resources/assets/vue/components/paymentsBilling/elements/SingleAdminPaymentsBillingWithoutStorageComponent.vue @@ -75,9 +75,9 @@
- +
From 1810809113a33d3b2bb7b6e92abf7262d1be10fc Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Thu, 14 Aug 2025 03:39:52 +0800 Subject: [PATCH 2/3] Fix a problem reported by Eileen of a group payment double charge problempayment through wallet --- ...eFixWalletGroupTransactionV2CommandJob.php | 49 +++++++++++++++++++ ...nsactionFixBillplzFailedCbV2CommandJob.php | 5 +- ...TimeFixWalletGroupTransactionV2Command.php | 48 ++++++++++++++++++ 3 files changed, 99 insertions(+), 3 deletions(-) create mode 100644 app/Classes/Jobs/Commands/V2/OneTimeFixWalletGroupTransactionV2CommandJob.php create mode 100644 app/Console/Commands/V2/OneTimeFixWalletGroupTransactionV2Command.php diff --git a/app/Classes/Jobs/Commands/V2/OneTimeFixWalletGroupTransactionV2CommandJob.php b/app/Classes/Jobs/Commands/V2/OneTimeFixWalletGroupTransactionV2CommandJob.php new file mode 100644 index 00000000..cbd1af0c --- /dev/null +++ b/app/Classes/Jobs/Commands/V2/OneTimeFixWalletGroupTransactionV2CommandJob.php @@ -0,0 +1,49 @@ +get(); + + foreach ($invoices as $invoice) { + + if($invoice->status == ApprovalStatus::APPROVED){ + $paymentTransaction = (App()->make(CreatePaymentTransactionProcessor::class))->execute($invoice, PaymentMethodType::WALLET, '', false); + + if($paymentTransaction && $paymentTransaction->status == ApprovalStatus::APPROVED){ + $pL = $invoice->owner; + (App()->make(ReleaseGoodsToCustomerProcessor::class))->execute($pL, $invoice); + } + } + } + $group = Group::where('id', 1377)->first(); + $group->status = ApprovalStatus::APPROVED; + $group->save(); + + $end = new Carbon(); + $elapsedTime = $start->diff($end)->format('%H:%I:%S'); + Log::info(Carbon::now() . ': End job - This is a one time fix of a double charge problem of a group payment through wallet. ElapsedTime: ' . $elapsedTime . '.'); + } +} diff --git a/app/Classes/Jobs/Commands/V2/OneTimeTransactionFixBillplzFailedCbV2CommandJob.php b/app/Classes/Jobs/Commands/V2/OneTimeTransactionFixBillplzFailedCbV2CommandJob.php index 7c68d2f7..78c62b4f 100644 --- a/app/Classes/Jobs/Commands/V2/OneTimeTransactionFixBillplzFailedCbV2CommandJob.php +++ b/app/Classes/Jobs/Commands/V2/OneTimeTransactionFixBillplzFailedCbV2CommandJob.php @@ -20,13 +20,12 @@ class OneTimeTransactionFixBillplzFailedCbV2CommandJob implements ShouldQueue public function handle() { - Log::info(Carbon::now() . ': Start job - One time fix failled callback from billplz cron ended.'); + Log::info(Carbon::now() . ': Start job - One time fix failled callback from billplz.'); $start = new Carbon(); //Transaction fix with this one time fix command: 15205, 16803, 17310, 22008, 6770 //This transaction, 16803 has approve payment but not its owner, shipping invoice $transactions = Transaction::whereIn('id', [22008, 6770])->get(); - Log::info(Carbon::now() . ' : One time fix failled callback from billplz started.'); foreach ($transactions as $transaction){ if($transaction){ @@ -40,6 +39,6 @@ class OneTimeTransactionFixBillplzFailedCbV2CommandJob implements ShouldQueue $end = new Carbon(); $elapsedTime = $start->diff($end)->format('%H:%I:%S'); - Log::info(Carbon::now() . ': End job - One time fix failled callback from billplz cron ended. ElapsedTime: ' . $elapsedTime . '.'); + Log::info(Carbon::now() . ': End job - One time fix failled callback from billplz. ElapsedTime: ' . $elapsedTime . '.'); } } diff --git a/app/Console/Commands/V2/OneTimeFixWalletGroupTransactionV2Command.php b/app/Console/Commands/V2/OneTimeFixWalletGroupTransactionV2Command.php new file mode 100644 index 00000000..f2a03599 --- /dev/null +++ b/app/Console/Commands/V2/OneTimeFixWalletGroupTransactionV2Command.php @@ -0,0 +1,48 @@ + Date: Thu, 14 Aug 2025 04:12:54 +0800 Subject: [PATCH 3/3] Fix a problem reported by Eileen of a group payment double charge problempayment through wallet --- .../Commands/V2/OneTimeFixWalletGroupTransactionV2Command.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Console/Commands/V2/OneTimeFixWalletGroupTransactionV2Command.php b/app/Console/Commands/V2/OneTimeFixWalletGroupTransactionV2Command.php index f2a03599..0c7c39a2 100644 --- a/app/Console/Commands/V2/OneTimeFixWalletGroupTransactionV2Command.php +++ b/app/Console/Commands/V2/OneTimeFixWalletGroupTransactionV2Command.php @@ -43,6 +43,8 @@ class OneTimeFixWalletGroupTransactionV2Command extends Command */ public function handle() { + return; + OneTimeFixWalletGroupTransactionV2CommandJob::dispatch(); } }