PaymentGateway.php in Commerce Migrate 3.0.x
File
modules/commerce/src/Plugin/migrate/source/commerce1/PaymentGateway.php
View source
<?php
namespace Drupal\commerce_migrate_commerce\Plugin\migrate\source\commerce1;
use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
class PaymentGateway extends DrupalSqlBase {
public function query() {
$query = $this
->select('commerce_payment_transaction', 'cpt')
->distinct()
->fields('cpt', [
'payment_method',
]);
return $query;
}
public function fields() {
$fields = [
'payment_method' => $this
->t('Payment method'),
];
return $fields;
}
public function getIds() {
return [
'payment_method' => [
'type' => 'string',
],
];
}
}