Closed codebolt-mike closed 1 year ago
Hi @codebolt-mike,
sorry for getting back to you so late.
In fact we already have a locale setting in cashier.locale
which can be overridden per customer. We could utilize this setting to create a translated string for the payment description.
What do you think of:
// Create Mollie payment
$payment = (new MandatedPaymentBuilder(
$owner,
trans('cashier::payment.description', ['number' => $this->number], Cashier::getLocale($owner)),
$totalDue,
url(config('cashier.webhook_url')),
[
'metadata' => [
'temporary_mollie_payment_id' => $this->mollie_payment_id,
],
]
))->create();
Hi @Naoray,
This looks amazing!
@codebolt-mike sorry for taking so long!
I’ve submitted the suggestion in #192
Good one. Before merging though, it may make sense to look at this one in one go.
This is what the default invoice receipt looks like:
@Naoray , @codebolt-mike , I'd say every static string here should ideally be translatable with keys included in that same language file. What do you think?
I think that should be perfect. Although in my use-cases I've created a custom invoice layout for e-mail and PDF.
My request was mainly focussed at the non-transferable string for the Mollie receipt that customers get.
All these strings inside a publishable lang-file would even be more perfect in my opinion. That gives future users of this package all the flexibility that a dev could ever want :)
@sandervanhooft as suggested the invoice receipt is now translatable in #192
New request:
Could you please make "Order" translatable? My dutch clients are receiving 'Order ' . $this->number in the Mollie bank-description.
Should be even more awesome if this could be changed in the config, with for example a default text.
vendor/mollie/laravel-cashier-mollie/src/Order/Order.php:243