Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117877745
D1750.1775338683.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D1750.1775338683.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D1750: Fix mandate status in mollie:info and stripe:info
Attached
Detach File
Event Timeline