Payment instructions should be configurable

Created on 26 January 2023, over 1 year ago
Updated 7 June 2023, about 1 year ago

Problem/Motivation

The text that is displayed after a successful payment is hard coded. This should be configurable in the admin UI.
Especially because the instructions don't make any sense for iDeal payments where the payment is instantly processed.

Proposed resolution

Change the function in modules/contrib/commerce_mollie/src/Plugin/Commerce/PaymentGateway/Mollie.php

 public function buildPaymentInstructions(PaymentInterface $payment = NULL) {
    $instructions = [
      '#type' => 'processed_text',
      '#text' => $this->t('Thank you for your payment with @gateway. We will inform you when your payment is processed. This is usually done within 24 hours.',
        ['@gateway' => $this->getDisplayLabel()],
        ['context' => 'Mollie payment instructions']
      ),
      '#format' => 'plain_text',
    ];

    return $instructions;
  }

So that it is configurable in admin UI: /admin/commerce/config/payment-gateways/manage/gateway_name

✨ Feature request
Status

Active

Version

1.9

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands sorson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @sorson
  • πŸ‡³πŸ‡±Netherlands Gerben Spil

    I wrote a quick patch that will put the text in a template file. This way, you can at least override the original English version and add a translation that matches the original English version.

Production build 0.69.0 2024