PaymentGateway.php in Commerce Migrate 8.2
File
modules/ubercart/src/Plugin/migrate/source/PaymentGateway.php
View source
<?php
namespace Drupal\commerce_migrate_ubercart\Plugin\migrate\source;
use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
class PaymentGateway extends DrupalSqlBase {
public function query() {
$query = $this
->select('uc_payment_receipts', 'upr')
->distinct()
->fields('upr', [
'method',
]);
return $query;
}
public function fields() {
$fields = [
'method' => $this
->t('Payment method'),
];
return $fields;
}
public function getIds() {
return [
'method' => [
'type' => 'string',
'alias' => 'upr',
],
];
}
}