Skip to content

Commit d2ec01a

Browse files
agoradesignbojanz
authored andcommitted
Issue #2958747 by agoradesign, bojanz: Show payment gateway in payment list (admin)
1 parent 5c430da commit d2ec01a

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

modules/payment/src/PaymentListBuilder.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@ protected function getDefaultOperations(EntityInterface $entity) {
119119
*/
120120
public function buildHeader() {
121121
$header['label'] = $this->t('Payment');
122-
$header['remote_id'] = $this->t('Remote ID');
123122
$header['state'] = $this->t('State');
123+
$header['payment_gateway'] = $this->t('Payment gateway');
124+
$header['remote_id'] = $this->t('Remote ID');
124125
return $header + parent::buildHeader();
125126
}
126127

@@ -136,10 +137,12 @@ public function buildRow(EntityInterface $entity) {
136137
$formatted_amount .= ' ' . $this->t('Refunded:') . ' ';
137138
$formatted_amount .= $this->currencyFormatter->format($refunded_amount->getNumber(), $refunded_amount->getCurrencyCode());
138139
}
140+
$payment_gateway = $entity->getPaymentGateway();
139141

140142
$row['label'] = $formatted_amount;
141-
$row['remote_id'] = $entity->getRemoteId() ?: $this->t('N/A');
142143
$row['state'] = $entity->getState()->getLabel();
144+
$row['payment_gateway'] = $payment_gateway ? $payment_gateway->label() : '';
145+
$row['remote_id'] = $entity->getRemoteId() ?: $this->t('N/A');
143146

144147
return $row + parent::buildRow($entity);
145148
}

0 commit comments

Comments
 (0)