Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117888389
D5026.1775359105.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D5026.1775359105.diff
View Options
diff --git a/src/app/Jobs/WalletCheck.php b/src/app/Jobs/WalletCheck.php
--- a/src/app/Jobs/WalletCheck.php
+++ b/src/app/Jobs/WalletCheck.php
@@ -69,16 +69,13 @@
return null;
}
- if ($this->wallet->chargeEntitlements() > 0) {
- // We make a payment when there's a charge. If for some reason the
- // payment failed we can't just throw here, as another execution of this job
- // will not re-try the payment. So, we attempt a payment in a separate job.
- try {
- $this->topUpWallet();
- } catch (\Exception $e) {
- \Log::error("Failed to top-up wallet {$this->walletId}: " . $e->getMessage());
- WalletCharge::dispatch($this->wallet->id);
- }
+ $this->wallet->chargeEntitlements();
+ try {
+ $this->topUpWallet();
+ } catch (\Exception $e) {
+ \Log::error("Failed to top-up wallet {$this->walletId}: " . $e->getMessage());
+ // Spawn a job to try again
+ WalletCharge::dispatch($this->wallet->id);
}
if ($this->wallet->balance >= 0) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 5, 3:18 AM (12 h, 31 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18832171
Default Alt Text
D5026.1775359105.diff (1 KB)
Attached To
Mode
D5026: Always try to top-up the wallet on charge
Attached
Detach File
Event Timeline