Right now we have these messages that are displayed to consumers:
> Betaling wordt a-sync verwerkt. @todo: maak deze tekst begrijpbaar voor consumenten.
> You have returned checkout at @gateway. We will inform you when you payment has been validated.
/**
* Builds the payment instructions.
*
* @param \Drupal\commerce_payment\Entity\PaymentInterface $payment
* The payment.
*
* @return array
* A render array containing the payment instructions.
*/
public function buildPaymentInstructions(PaymentInterface $payment = NULL) {
$instructions = [
'#type' => 'processed_text',
'#text' => 'Betaling wordt a-sync verwerkt. @todo: maak deze tekst begrijpbaar voor consumenten.',
'#format' => 'plain_text',
];
/**
* {@inheritdoc}
*/
public function onReturn(OrderInterface $order, Request $request) {
drupal_set_message($this->t('You have returned checkout at @gateway. We will inform you when you payment has been validated.', [
'@gateway' => $this->getDisplayLabel(),
]));
}
We should also add a $context to the t() function and always use the t() function.
Example from address module:
t('Street address', [], ['context' => 'Address label']),
t('First name', [], ['context' => 'Address label']),
t('Last name', [], ['context' => 'Address label']),
Maybe context could be 'Commerce Mollie message'
Comments
Comment #2
ndf commentedI dropped the green status message.
And the text under "Payment instructions" is now.
You will see this message when you return from Mollie. (So after you have payed).
Comment #3
ndf commentedPR https://github.com/DxEx/commerce_mollie/pull/3
Comment #4
finneReview: code and textually OK.
Comment #6
ndf commented