Page MenuHomePhorge

D2716.1776090891.diff
No OneTemporary

Authored By
Unknown
Size
27 KB
Referenced Files
None
Subscribers
None

D2716.1776090891.diff

diff --git a/src/app/Console/Commands/Data/Import/OpenExchangeRatesCommand.php b/src/app/Console/Commands/Data/Import/OpenExchangeRatesCommand.php
--- a/src/app/Console/Commands/Data/Import/OpenExchangeRatesCommand.php
+++ b/src/app/Console/Commands/Data/Import/OpenExchangeRatesCommand.php
@@ -27,23 +27,20 @@
*/
public function handle()
{
- $sourceCurrency = 'CHF';
+ foreach (['CHF', 'EUR'] as $sourceCurrency) {
+ $rates = \App\Backends\OpenExchangeRates::retrieveRates($sourceCurrency);
- $rates = \App\Backends\OpenExchangeRates::retrieveRates($sourceCurrency);
+ $file = resource_path("exchangerates-$sourceCurrency.php");
- //
- // export
- //
- $file = resource_path("exchangerates-$sourceCurrency.php");
+ $out = "<?php return [\n";
- $out = "<?php return [\n";
+ foreach ($rates as $countryCode => $rate) {
+ $out .= sprintf(" '%s' => '%s',\n", $countryCode, $rate);
+ }
- foreach ($rates as $countryCode => $rate) {
- $out .= sprintf(" '%s' => '%s',\n", $countryCode, $rate);
- }
-
- $out .= "];\n";
+ $out .= "];\n";
- file_put_contents($file, $out);
+ file_put_contents($file, $out);
+ }
}
}
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
@@ -4,6 +4,7 @@
use App\Http\Controllers\Controller;
use App\Providers\PaymentProvider;
+use App\Tenant;
use App\Wallet;
use App\Payment;
use Illuminate\Http\Request;
@@ -53,8 +54,8 @@
]);
$mandate = [
- 'currency' => 'CHF',
- 'description' => \config('app.name') . ' Auto-Payment Setup',
+ 'currency' => $wallet->currency,
+ 'description' => Tenant::getConfig($user->tenant_id, 'app.name') . ' Auto-Payment Setup',
'methodId' => $request->methodId
];
@@ -173,7 +174,7 @@
}
if ($amount < PaymentProvider::MIN_AMOUNT) {
- $min = intval(PaymentProvider::MIN_AMOUNT / 100) . ' CHF';
+ $min = $wallet->money(intval(PaymentProvider::MIN_AMOUNT / 100));
return ['amount' => \trans('validation.minamount', ['amount' => $min])];
}
@@ -211,7 +212,7 @@
// Validate the minimum value
if ($amount < PaymentProvider::MIN_AMOUNT) {
- $min = intval(PaymentProvider::MIN_AMOUNT / 100) . ' CHF';
+ $min = $wallet->money(intval(PaymentProvider::MIN_AMOUNT / 100));
$errors = ['amount' => \trans('validation.minamount', ['amount' => $min])];
return response()->json(['status' => 'error', 'errors' => $errors], 422);
}
@@ -221,7 +222,7 @@
'currency' => $request->currency,
'amount' => $amount,
'methodId' => $request->methodId,
- 'description' => \config('app.name') . ' Payment',
+ 'description' => Tenant::getConfig($user->tenant_id, 'app.name') . ' Payment',
];
$provider = PaymentProvider::factory($wallet);
@@ -327,10 +328,10 @@
$request = [
'type' => PaymentProvider::TYPE_RECURRING,
- 'currency' => 'CHF',
+ 'currency' => $wallet->currency,
'amount' => $amount,
'methodId' => PaymentProvider::METHOD_CREDITCARD,
- 'description' => \config('app.name') . ' Recurring Payment',
+ 'description' => Tenant::getConfig($wallet->owner->tenant_id, 'app.name') . ' Recurring Payment',
];
$result = $provider->payment($wallet, $request);
@@ -449,7 +450,7 @@
$hasMore = true;
}
- $result = $result->map(function ($item) {
+ $result = $result->map(function ($item) use ($wallet) {
$provider = PaymentProvider::factory($item->provider);
$payment = $provider->getPayment($item->id);
$entry = [
@@ -458,6 +459,7 @@
'type' => $item->type,
'description' => $item->description,
'amount' => $item->amount,
+ 'currency' => $wallet->currency,
'status' => $item->status,
'isCancelable' => $payment['isCancelable'],
'checkoutUrl' => $payment['checkoutUrl']
diff --git a/src/app/Http/Controllers/API/V4/WalletsController.php b/src/app/Http/Controllers/API/V4/WalletsController.php
--- a/src/app/Http/Controllers/API/V4/WalletsController.php
+++ b/src/app/Http/Controllers/API/V4/WalletsController.php
@@ -256,13 +256,14 @@
}
}
- $result = $result->map(function ($item) use ($isAdmin) {
+ $result = $result->map(function ($item) use ($isAdmin, $wallet) {
$entry = [
'id' => $item->id,
'createdAt' => $item->created_at->format('Y-m-d H:i'),
'type' => $item->type,
'description' => $item->shortDescription(),
'amount' => $item->amount,
+ 'currency' => $wallet->currency,
'hasDetails' => !empty($item->cnt),
];
diff --git a/src/app/Observers/UserObserver.php b/src/app/Observers/UserObserver.php
--- a/src/app/Observers/UserObserver.php
+++ b/src/app/Observers/UserObserver.php
@@ -56,7 +56,7 @@
{
$settings = [
'country' => \App\Utils::countryForRequest(),
- 'currency' => 'CHF',
+ 'currency' => \config('app.currency'),
/*
'first_name' => '',
'last_name' => '',
diff --git a/src/app/Observers/WalletObserver.php b/src/app/Observers/WalletObserver.php
--- a/src/app/Observers/WalletObserver.php
+++ b/src/app/Observers/WalletObserver.php
@@ -25,6 +25,8 @@
break;
}
}
+
+ $wallet->currency = \config('app.currency');
}
/**
diff --git a/src/app/Payment.php b/src/app/Payment.php
--- a/src/app/Payment.php
+++ b/src/app/Payment.php
@@ -7,7 +7,7 @@
/**
* A payment operation on a wallet.
*
- * @property int $amount Amount of money in cents of CHF
+ * @property int $amount Amount of money in cents of system currency
* @property string $description Payment description
* @property string $id Mollie's Payment ID
* @property \App\Wallet $wallet The wallet
diff --git a/src/app/Providers/Payment/Mollie.php b/src/app/Providers/Payment/Mollie.php
--- a/src/app/Providers/Payment/Mollie.php
+++ b/src/app/Providers/Payment/Mollie.php
@@ -547,6 +547,7 @@
* List supported payment methods.
*
* @param string $type The payment type for which we require a method (oneoff/recurring).
+ * @param string $currency Currency code
*
* @return array Array of array with available payment methods:
* - id: id of the method
@@ -556,30 +557,34 @@
* - exchangeRate: The projected exchange rate (actual rate is determined during payment)
* - icon: An icon (icon name) representing the method
*/
- public function providerPaymentMethods($type): array
+ public function providerPaymentMethods(string $type, string $currency): array
{
- $providerMethods = array_merge(
- // Fallback to EUR methods (later provider methods will override earlier ones)
- (array) mollie()->methods()->allActive(
- [
- 'sequenceType' => $type,
- 'amount' => [
- 'value' => '1.00',
- 'currency' => 'EUR'
- ]
+ // Prefer methods in the system currency
+ $providerMethods = (array) mollie()->methods()->allActive(
+ [
+ 'sequenceType' => $type,
+ 'amount' => [
+ 'value' => '1.00',
+ 'currency' => $currency
]
- ),
- // Prefer CHF methods
- (array) mollie()->methods()->allActive(
+ ]
+ );
+
+ // Get EUR methods (e.g. bank transfers are in EUR only)
+ if ($currency != 'EUR') {
+ $eurMethods = (array) mollie()->methods()->allActive(
[
'sequenceType' => $type,
'amount' => [
'value' => '1.00',
- 'currency' => 'CHF'
+ 'currency' => 'EUR'
]
]
- )
- );
+ );
+
+ // Later provider methods will override earlier ones
+ $providerMethods = array_merge($eurMethods, $providerMethods);
+ }
$availableMethods = [];
@@ -589,7 +594,7 @@
'name' => $method->description,
'minimumAmount' => round(floatval($method->minimumAmount->value) * 100), // Converted to cents
'currency' => $method->minimumAmount->currency,
- 'exchangeRate' => \App\Utils::exchangeRate('CHF', $method->minimumAmount->currency)
+ 'exchangeRate' => \App\Utils::exchangeRate($currency, $method->minimumAmount->currency)
];
}
diff --git a/src/app/Providers/Payment/Stripe.php b/src/app/Providers/Payment/Stripe.php
--- a/src/app/Providers/Payment/Stripe.php
+++ b/src/app/Providers/Payment/Stripe.php
@@ -483,7 +483,8 @@
/**
* List supported payment methods.
*
- * @param string $type The payment type for which we require a method (oneoff/recurring).
+ * @param string $type The payment type for which we require a method (oneoff/recurring).
+ * @param string $currency Currency code
*
* @return array Array of array with available payment methods:
* - id: id of the method
@@ -493,7 +494,7 @@
* - exchangeRate: The projected exchange rate (actual rate is determined during payment)
* - icon: An icon (icon name) representing the method
*/
- public function providerPaymentMethods($type): array
+ public function providerPaymentMethods(string $type, string $currency): array
{
//TODO get this from the stripe API?
$availableMethods = [];
@@ -504,14 +505,14 @@
'id' => self::METHOD_CREDITCARD,
'name' => "Credit Card",
'minimumAmount' => self::MIN_AMOUNT,
- 'currency' => 'CHF',
+ 'currency' => $currency,
'exchangeRate' => 1.0
],
self::METHOD_PAYPAL => [
'id' => self::METHOD_PAYPAL,
'name' => "PayPal",
'minimumAmount' => self::MIN_AMOUNT,
- 'currency' => 'CHF',
+ 'currency' => $currency,
'exchangeRate' => 1.0
]
];
@@ -522,7 +523,7 @@
'id' => self::METHOD_CREDITCARD,
'name' => "Credit Card",
'minimumAmount' => self::MIN_AMOUNT, // Converted to cents,
- 'currency' => 'CHF',
+ 'currency' => $currency,
'exchangeRate' => 1.0
]
];
diff --git a/src/app/Providers/PaymentProvider.php b/src/app/Providers/PaymentProvider.php
--- a/src/app/Providers/PaymentProvider.php
+++ b/src/app/Providers/PaymentProvider.php
@@ -254,7 +254,8 @@
/**
* List supported payment methods from this provider
*
- * @param string $type The payment type for which we require a method (oneoff/recurring).
+ * @param string $type The payment type for which we require a method (oneoff/recurring).
+ * @param string $currency Currency code
*
* @return array Array of array with available payment methods:
* - id: id of the method
@@ -264,7 +265,7 @@
* - exchangeRate: The projected exchange rate (actual rate is determined during payment)
* - icon: An icon (icon name) representing the method
*/
- abstract public function providerPaymentMethods($type): array;
+ abstract public function providerPaymentMethods(string $type, string $currency): array;
/**
* Get a payment.
@@ -345,7 +346,7 @@
{
$providerName = self::providerName($wallet);
- $cacheKey = "methods-" . $providerName . '-' . $type;
+ $cacheKey = "methods-{$providerName}-{$type}-{$wallet->currency}";
if ($methods = Cache::get($cacheKey)) {
\Log::debug("Using payment method cache" . var_export($methods, true));
@@ -353,7 +354,8 @@
}
$provider = PaymentProvider::factory($providerName);
- $methods = self::applyMethodWhitelist($type, $provider->providerPaymentMethods($type));
+ $methods = $provider->providerPaymentMethods($type, $wallet->currency);
+ $methods = self::applyMethodWhitelist($type, $methods);
\Log::debug("Loaded payment methods" . var_export($methods, true));
diff --git a/src/app/Wallet.php b/src/app/Wallet.php
--- a/src/app/Wallet.php
+++ b/src/app/Wallet.php
@@ -14,7 +14,12 @@
*
* A wallet is owned by an {@link \App\User}.
*
- * @property integer $balance
+ * @property int $balance Current balance in cents
+ * @property string $currency Currency code
+ * @property ?string $description Description
+ * @property string $id Unique identifier
+ * @property ?\App\User $owner Owner (can be null when owner is deleted)
+ * @property int $user_id Owner's identifier
*/
class Wallet extends Model
{
@@ -26,19 +31,39 @@
public $timestamps = false;
+ /**
+ * The attributes' default values.
+ *
+ * @var array
+ */
protected $attributes = [
'balance' => 0,
- 'currency' => 'CHF'
];
+ /**
+ * The attributes that are mass assignable.
+ *
+ * @var array
+ */
protected $fillable = [
- 'currency'
+ 'currency',
+ 'description'
];
+ /**
+ * The attributes that can be not set.
+ *
+ * @var array
+ */
protected $nullable = [
'description',
];
+ /**
+ * The types of attributes to which its values will be cast
+ *
+ * @var array
+ */
protected $casts = [
'balance' => 'integer',
];
diff --git a/src/config/app.php b/src/config/app.php
--- a/src/config/app.php
+++ b/src/config/app.php
@@ -69,6 +69,8 @@
'tenant_id' => env('APP_TENANT_ID', null),
+ 'currency' => \strtoupper(env('APP_CURRENCY', 'CHF')),
+
/*
|--------------------------------------------------------------------------
| Application Domain
diff --git a/src/resources/lang/en/ui.php b/src/resources/lang/en/ui.php
--- a/src/resources/lang/en/ui.php
+++ b/src/resources/lang/en/ui.php
@@ -331,7 +331,7 @@
'add-penalty' => "Add penalty",
'add-penalty-title' => "Add a penalty to the wallet",
'auto-payment' => "Auto-payment",
- 'auto-payment-text' => "Fill up by <b>{amount} CHF</b> when under <b>{balance} CHF</b> using {method}",
+ 'auto-payment-text' => "Fill up by <b>{amount}</b> when under <b>{balance}</b> using {method}",
'country' => "Country",
'create' => "Create user",
'custno' => "Customer No.",
@@ -390,7 +390,7 @@
. " You can cancel or change the auto-payment option at any time.",
'auto-payment-setup' => "Set up auto-payment",
'auto-payment-disabled' => "The configured auto-payment has been disabled. Top up your wallet or raise the auto-payment amount.",
- 'auto-payment-info' => "Auto-payment is <b>set</b> to fill up your account by <b>{amount} CHF</b> every time your account balance gets under <b>{balance} CHF</b>.",
+ 'auto-payment-info' => "Auto-payment is <b>set</b> to fill up your account by <b>{amount}</b> every time your account balance gets under <b>{balance}</b>.",
'auto-payment-inprogress' => "The setup of the automatic payment is still in progress.",
'auto-payment-next' => "Next, you will be redirected to the checkout page, where you can provide your credit card details.",
'auto-payment-disabled-next' => "The auto-payment is disabled. Immediately after you submit new settings we'll enable it and attempt to top up your wallet.",
diff --git a/src/resources/vue/Admin/User.vue b/src/resources/vue/Admin/User.vue
--- a/src/resources/vue/Admin/User.vue
+++ b/src/resources/vue/Admin/User.vue
@@ -128,7 +128,7 @@
<div class="card-body">
<h2 class="card-title">
{{ $t('wallet.title') }}
- <span :class="wallet.balance < 0 ? 'text-danger' : 'text-success'"><strong>{{ $root.price(wallet.balance) }}</strong></span>
+ <span :class="wallet.balance < 0 ? 'text-danger' : 'text-success'"><strong>{{ $root.price(wallet.balance, wallet.currency) }}</strong></span>
</h2>
<div class="card-text">
<form class="read-only short">
@@ -146,8 +146,8 @@
<div class="col-sm-8">
<span id="autopayment" :class="'form-control-plaintext' + (wallet.mandateState ? ' text-danger' : '')"
v-html="$t('user.auto-payment-text', {
- amount: wallet.mandate.amount,
- balance: wallet.mandate.balance,
+ amount: wallet.mandate.amount + ' ' + wallet.currency,
+ balance: wallet.mandate.balance + ' ' + wallet.currency,
method: wallet.mandate.method
})"
>
diff --git a/src/resources/vue/Dashboard.vue b/src/resources/vue/Dashboard.vue
--- a/src/resources/vue/Dashboard.vue
+++ b/src/resources/vue/Dashboard.vue
@@ -17,7 +17,7 @@
</router-link>
<router-link v-if="status.enableWallets" class="card link-wallet" :to="{ name: 'wallet' }">
<svg-icon icon="wallet"></svg-icon><span class="name">{{ $t('dashboard.wallet') }}</span>
- <span v-if="balance < 0" class="badge badge-danger">{{ $root.price(balance) }}</span>
+ <span v-if="balance < 0" class="badge badge-danger">{{ $root.price(balance, currency) }}</span>
</router-link>
<router-link v-if="$root.hasSKU('meet')" class="card link-chat" :to="{ name: 'rooms' }">
<svg-icon icon="comments"></svg-icon><span class="name">{{ $t('dashboard.chat') }}</span>
@@ -41,6 +41,7 @@
return {
status: {},
balance: 0,
+ currency: '',
webmailURL: window.config['app.webmail_url']
}
},
@@ -55,6 +56,7 @@
// TODO: currencies, multi-wallets, accounts
authInfo.wallets.forEach(wallet => {
this.balance += wallet.balance
+ this.currency = wallet.currency
})
},
statusUpdate(user) {
diff --git a/src/resources/vue/Wallet.vue b/src/resources/vue/Wallet.vue
--- a/src/resources/vue/Wallet.vue
+++ b/src/resources/vue/Wallet.vue
@@ -26,7 +26,7 @@
{{ $t('wallet.auto-payment-disabled') }}
</div>
<template v-else>
- <p v-html="$t('wallet.auto-payment-info', { amount: mandate.amount, balance: mandate.balance })"></p>
+ <p v-html="$t('wallet.auto-payment-info', { amount: mandate.amount + ' ' + wallet.currency, balance: mandate.balance + ' ' + wallet.currency})"></p>
<p>{{ $t('wallet.payment-method', { method: mandate.method }) }}</p>
</template>
<div v-if="mandate.isPending" class="alert alert-warning">
diff --git a/src/resources/vue/Widgets/PaymentLog.vue b/src/resources/vue/Widgets/PaymentLog.vue
--- a/src/resources/vue/Widgets/PaymentLog.vue
+++ b/src/resources/vue/Widgets/PaymentLog.vue
@@ -69,7 +69,7 @@
})
},
amount(payment) {
- return this.$root.price(payment.amount)
+ return this.$root.price(payment.amount, payment.currency)
}
}
}
diff --git a/src/resources/vue/Widgets/TransactionLog.vue b/src/resources/vue/Widgets/TransactionLog.vue
--- a/src/resources/vue/Widgets/TransactionLog.vue
+++ b/src/resources/vue/Widgets/TransactionLog.vue
@@ -103,7 +103,7 @@
})
},
amount(transaction) {
- return this.$root.price(transaction.amount)
+ return this.$root.price(transaction.amount, transaction.currency)
},
className(transaction) {
return transaction.amount < 0 ? 'text-danger' : 'text-success';
diff --git a/src/tests/Browser/PaymentMollieTest.php b/src/tests/Browser/PaymentMollieTest.php
--- a/src/tests/Browser/PaymentMollieTest.php
+++ b/src/tests/Browser/PaymentMollieTest.php
@@ -78,7 +78,7 @@
->click('@button-action');
})
->on(new PaymentMollie())
- ->assertSeeIn('@title', \config('app.name') . ' Payment')
+ ->assertSeeIn('@title', $user->tenant->title . ' Payment')
->assertSeeIn('@amount', 'CHF 12.34');
$this->assertSame(1, $user->wallets()->first()->payments()->count());
@@ -168,7 +168,7 @@
->click('@button-action');
})
->on(new PaymentMollie())
- ->assertSeeIn('@title', \config('app.name') . ' Auto-Payment Setup')
+ ->assertSeeIn('@title', $user->tenant->title . ' Auto-Payment Setup')
->assertMissing('@amount')
->submitValidCreditCard()
->waitForLocation('/wallet')
diff --git a/src/tests/Browser/PaymentStripeTest.php b/src/tests/Browser/PaymentStripeTest.php
--- a/src/tests/Browser/PaymentStripeTest.php
+++ b/src/tests/Browser/PaymentStripeTest.php
@@ -78,7 +78,7 @@
->click('@button-action');
})
->on(new PaymentStripe())
- ->assertSeeIn('@title', \config('app.name') . ' Payment')
+ ->assertSeeIn('@title', $user->tenant->title . ' Payment')
->assertSeeIn('@amount', 'CHF 12.34')
->assertValue('@email-input', $user->email)
->submitValidCreditCard();
diff --git a/src/tests/Browser/Reseller/PaymentMollieTest.php b/src/tests/Browser/Reseller/PaymentMollieTest.php
--- a/src/tests/Browser/Reseller/PaymentMollieTest.php
+++ b/src/tests/Browser/Reseller/PaymentMollieTest.php
@@ -83,7 +83,7 @@
->click('@button-action');
})
->on(new PaymentMollie())
- ->assertSeeIn('@title', \config('app.name') . ' Payment')
+ ->assertSeeIn('@title', $user->tenant->title . ' Payment')
->assertSeeIn('@amount', 'CHF 12.34');
$this->assertSame(1, $wallet->payments()->count());
diff --git a/src/tests/Feature/Controller/PaymentsMollieTest.php b/src/tests/Feature/Controller/PaymentsMollieTest.php
--- a/src/tests/Feature/Controller/PaymentsMollieTest.php
+++ b/src/tests/Feature/Controller/PaymentsMollieTest.php
@@ -143,7 +143,7 @@
$payment = Payment::where('id', $json['id'])->first();
$this->assertSame(2010, $payment->amount);
$this->assertSame($wallet->id, $payment->wallet_id);
- $this->assertSame(\config('app.name') . " Auto-Payment Setup", $payment->description);
+ $this->assertSame($user->tenant->title . " Auto-Payment Setup", $payment->description);
$this->assertSame(PaymentProvider::TYPE_MANDATE, $payment->type);
// Test fetching the mandate information
@@ -376,7 +376,7 @@
$this->assertSame(1234, $payment->amount);
$this->assertSame(1234, $payment->currency_amount);
$this->assertSame('CHF', $payment->currency);
- $this->assertSame(\config('app.name') . ' Payment', $payment->description);
+ $this->assertSame($user->tenant->title . ' Payment', $payment->description);
$this->assertSame('open', $payment->status);
$this->assertEquals(0, $wallet->balance);
diff --git a/src/tests/Feature/Controller/PaymentsStripeTest.php b/src/tests/Feature/Controller/PaymentsStripeTest.php
--- a/src/tests/Feature/Controller/PaymentsStripeTest.php
+++ b/src/tests/Feature/Controller/PaymentsStripeTest.php
@@ -135,7 +135,7 @@
// Stripe in 'setup' mode does not allow to set the amount
$payment = Payment::where('wallet_id', $wallet->id)->first();
$this->assertSame(0, $payment->amount);
- $this->assertSame(\config('app.name') . " Auto-Payment Setup", $payment->description);
+ $this->assertSame($user->tenant->title . " Auto-Payment Setup", $payment->description);
$this->assertSame(PaymentProvider::TYPE_MANDATE, $payment->type);
// Test fetching the mandate information
@@ -328,7 +328,7 @@
$this->assertCount(1, $payments);
$payment = $payments[0];
$this->assertSame(1234, $payment->amount);
- $this->assertSame(\config('app.name') . ' Payment', $payment->description);
+ $this->assertSame($user->tenant->title . ' Payment', $payment->description);
$this->assertSame('open', $payment->status);
$this->assertEquals(0, $wallet->balance);
@@ -538,7 +538,7 @@
"created" => 123456789,
"amount" => 2010,
"currency" => "chf",
- "description" => "Kolab Recurring Payment"
+ "description" => $user->tenant->title . " Recurring Payment"
]);
$client = $this->mockStripe();
@@ -559,7 +559,7 @@
$this->assertCount(1, $wallet->payments()->get());
$payment = $wallet->payments()->first();
$this->assertSame(2010, $payment->amount);
- $this->assertSame(\config('app.name') . " Recurring Payment", $payment->description);
+ $this->assertSame($user->tenant->title . " Recurring Payment", $payment->description);
$this->assertSame("pi_XX", $payment->id);
// Expect no payment if the mandate is disabled
diff --git a/src/tests/Feature/Controller/Reseller/PaymentsMollieTest.php b/src/tests/Feature/Controller/Reseller/PaymentsMollieTest.php
--- a/src/tests/Feature/Controller/Reseller/PaymentsMollieTest.php
+++ b/src/tests/Feature/Controller/Reseller/PaymentsMollieTest.php
@@ -89,7 +89,7 @@
$this->assertSame(2010, $payment->amount);
$this->assertSame($wallet->id, $payment->wallet_id);
- $this->assertSame(\config('app.name') . " Auto-Payment Setup", $payment->description);
+ $this->assertSame($reseller->tenant->title . " Auto-Payment Setup", $payment->description);
$this->assertSame(PaymentProvider::TYPE_MANDATE, $payment->type);
// Test fetching the mandate information

File Metadata

Mime Type
text/plain
Expires
Mon, Apr 13, 2:34 PM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18856552
Default Alt Text
D2716.1776090891.diff (27 KB)

Event Timeline