Add proper description to mollie credit card transactions

This commit is contained in:
David Bomba 2022-12-09 09:42:40 +11:00
parent b2ff2a1c18
commit 4c6342916f

View File

@ -52,6 +52,8 @@ class CreditCard
{
$amount = $this->mollie->convertToMollieAmount((float) $this->mollie->payment_hash->data->amount_with_fee);
$description = sprintf('%s: %s', ctrans('texts.invoices'), \implode(', ', collect($this->mollie->payment_hash->invoices())->pluck('invoice_number')->toArray()));
$this->mollie->payment_hash
->withData('gateway_type_id', GatewayType::CREDIT_CARD)
->withData('client_id', $this->mollie->client->id);
@ -68,7 +70,7 @@ class CreditCard
'mandateId' => $request->token,
'customerId' => $cgt->gateway_customer_reference,
'sequenceType' => 'recurring',
'description' => \sprintf('Hash: %s', $this->mollie->payment_hash->hash),
'description' => $description,
'webhookUrl' => $this->mollie->company_gateway->webhookUrl(),
'idempotencyKey' => uniqid("st",true),
'metadata' => [
@ -108,7 +110,7 @@ class CreditCard
'currency' => $this->mollie->client->currency()->code,
'value' => $amount,
],
'description' => \sprintf('Hash: %s', $this->mollie->payment_hash->hash),
'description' => $description,
'redirectUrl' => route('mollie.3ds_redirect', [
'company_key' => $this->mollie->client->company->company_key,
'company_gateway_id' => $this->mollie->company_gateway->hashed_id,