Payment instructions should be configurable

Created on 26 January 2023, almost 2 years ago
Updated 7 June 2023, over 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.71.5 2024