Page MenuHomePhorge

D1750.1775338683.diff
No OneTemporary

Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None

D1750.1775338683.diff

diff --git a/src/app/Console/Commands/MollieInfo.php b/src/app/Console/Commands/MollieInfo.php
--- a/src/app/Console/Commands/MollieInfo.php
+++ b/src/app/Console/Commands/MollieInfo.php
@@ -43,10 +43,21 @@
if ($mandate = $provider->getMandate($wallet)) {
$amount = $wallet->getSetting('mandate_amount');
$balance = $wallet->getSetting('mandate_balance') ?: 0;
+ $status = 'invalid';
+
+ if ($mandate['isPending']) {
+ $status = 'pending';
+ } elseif ($mandate['isValid']) {
+ $status = 'valid';
+ }
+
+ if ($wallet->getSetting('mandate_disabled')) {
+ $status .= ' (disabled)';
+ }
$this->info("Auto-payment: {$mandate['method']}");
$this->info(" id: {$mandate['id']}");
- $this->info(" status: " . ($mandate['isPending'] ? 'pending' : 'valid'));
+ $this->info(" status: {$status}");
$this->info(" amount: {$amount} {$wallet->currency}");
$this->info(" min-balance: {$balance} {$wallet->currency}");
} else {
diff --git a/src/app/Console/Commands/StripeInfo.php b/src/app/Console/Commands/StripeInfo.php
--- a/src/app/Console/Commands/StripeInfo.php
+++ b/src/app/Console/Commands/StripeInfo.php
@@ -45,10 +45,21 @@
if ($mandate = $provider->getMandate($wallet)) {
$amount = $wallet->getSetting('mandate_amount');
$balance = $wallet->getSetting('mandate_balance') ?: 0;
+ $status = 'invalid';
+
+ if ($mandate['isPending']) {
+ $status = 'pending';
+ } elseif ($mandate['isValid']) {
+ $status = 'valid';
+ }
+
+ if ($wallet->getSetting('mandate_disabled')) {
+ $status .= ' (disabled)';
+ }
$this->info("Auto-payment: {$mandate['method']}");
$this->info(" id: {$mandate['id']}");
- $this->info(" status: " . ($mandate['isPending'] ? 'pending' : 'valid'));
+ $this->info(" status: {$status}");
$this->info(" amount: {$amount} {$wallet->currency}");
$this->info(" min-balance: {$balance} {$wallet->currency}");
} else {

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 4, 9:38 PM (17 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18826866
Default Alt Text
D1750.1775338683.diff (2 KB)

Event Timeline