Page MenuHomePhorge

D4579.1775368810.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D4579.1775368810.diff

diff --git a/src/app/Http/Controllers/API/V4/PaymentsController.php b/src/app/Http/Controllers/API/V4/PaymentsController.php
--- a/src/app/Http/Controllers/API/V4/PaymentsController.php
+++ b/src/app/Http/Controllers/API/V4/PaymentsController.php
@@ -405,12 +405,24 @@
return false;
}
+ $appName = Tenant::getConfig($wallet->owner->tenant_id, 'app.name');
+ $description = "{$appName} Recurring Payment";
+ if ($plan = $wallet->plan()) {
+ if ($plan->months == 12) {
+ $description = "{$appName} Annual Payment";
+ } elseif ($plan->months == 3) {
+ $description = "{$appName} Quarterly Payment";
+ } elseif ($plan->months == 1) {
+ $description = "{$appName} Monthly Payment";
+ }
+ }
+
$request = [
'type' => Payment::TYPE_RECURRING,
'currency' => $wallet->currency,
'amount' => $amount,
'methodId' => PaymentProvider::METHOD_CREDITCARD,
- 'description' => Tenant::getConfig($wallet->owner->tenant_id, 'app.name') . ' Recurring Payment',
+ 'description' => $description,
];
self::addTax($wallet, $request);

File Metadata

Mime Type
text/plain
Expires
Sun, Apr 5, 6:00 AM (18 h, 8 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18832575
Default Alt Text
D4579.1775368810.diff (1 KB)

Event Timeline