We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday in our country

Commit 04e48bfb authored by Ángel Campos's avatar Ángel Campos Committed by GitHub

[PW-1942] Notifications Overview (#639)

* [PW-1942]: Admin notifications overview for adyen_notification table

* [PW-1942]: Added notifications overview link to cron information message

* [PW-1942]: Added notifications overview link to cron information message

* [PW-1942]: Adjusted columns, filters and formatting on notifications overview
Moved PSP search URL function to helper since it is now being used in multiple places

* [PW-1942]: Changed virtualType classname to avoid conflicts with Notifications Collection

* [PW-1942]: Implemented getPspReferenceSearchUrl() from library

* [PW-1942]: Unit testing

* [PW-1942]: Applying recommended changes:
* Renamed XML files to adyen_notifications_overview
* Applied PSR2 code styling to CronMessage.php
* Updated Copyright year
* Early return and replaced switch with if and default value in NotificationColumn.php. Also, docs state that success can only be true/false so got rid of third CSS class
* Moved getPspReferenceSearchUrl() method from PHP Lib to Data helper, and added if/else to receive liveEnvironment from notification record instead of receiving test/live string

* [PW-1942]: Code styling

* [PW-1942]: Applying recommended changes:
* Inverted live/test if check
* Removed unnecessary constructor
Co-authored-by: default avatarcyattilakiss <42297201+cyattilakiss@users.noreply.github.com>
parent a510e037
...@@ -31,17 +31,20 @@ class CronMessage implements \Magento\Framework\Notification\MessageInterface ...@@ -31,17 +31,20 @@ class CronMessage implements \Magento\Framework\Notification\MessageInterface
protected $_dateChecked; protected $_dateChecked;
protected $_adyenHelper; protected $_adyenHelper;
protected $_timezoneInterface; protected $_timezoneInterface;
protected $backendHelper;
public function __construct( public function __construct(
\Magento\Backend\Model\Auth\Session $authSession, \Magento\Backend\Model\Auth\Session $authSession,
\Adyen\Payment\Helper\Data $adyenHelper, \Adyen\Payment\Helper\Data $adyenHelper,
\Magento\Framework\Stdlib\DateTime\TimezoneInterface $timezoneInterface \Magento\Framework\Stdlib\DateTime\TimezoneInterface $timezoneInterface,
\Magento\Backend\Helper\Data $backendHelper
) { ) {
$this->_authSession = $authSession; $this->_authSession = $authSession;
$this->_cronCheck = $this->getSessionData("cronCheck"); $this->_cronCheck = $this->getSessionData("cronCheck");
$this->_dateChecked = $this->getSessionData("dateChecked"); $this->_dateChecked = $this->getSessionData("dateChecked");
$this->_adyenHelper = $adyenHelper; $this->_adyenHelper = $adyenHelper;
$this->_timezoneInterface = $timezoneInterface; $this->_timezoneInterface = $timezoneInterface;
$this->backendHelper = $backendHelper;
} }
/** /**
...@@ -89,7 +92,8 @@ class CronMessage implements \Magento\Framework\Notification\MessageInterface ...@@ -89,7 +92,8 @@ class CronMessage implements \Magento\Framework\Notification\MessageInterface
*/ */
public function getText() public function getText()
{ {
$message = __('You have ' . $this->_cronCheck . ' unprocessed notification(s). Please check your Cron'); $urlNotificationsOverview = $this->backendHelper->getUrl("adyen/NotificationsOverview/index");
$message = __('You have <a href="%1">%2 unprocessed notification(s)</a>. Please check your Cron', $urlNotificationsOverview, $this->_cronCheck);
$urlMagento = "http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html"; $urlMagento = "http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html";
$urlAdyen = "https://docs.adyen.com/developers/plugins/magento-2/set-up-the-plugin-in-magento#step2runcron"; $urlAdyen = "https://docs.adyen.com/developers/plugins/magento-2/set-up-the-plugin-in-magento#step2runcron";
$message .= __( $message .= __(
......
<?php
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment module (https://www.adyen.com/)
*
* Copyright (c) 2020 Adyen BV (https://www.adyen.com/)
* See LICENSE.txt for license details.
*
* Author: Adyen <magento@adyen.com>
*/
namespace Adyen\Payment\Controller\Adminhtml\Notifications;
class Overview extends \Magento\Backend\App\Action
{
/**
* Load the page defined in corresponding layout XML
*
* @return \Magento\Framework\View\Result\Page
*/
public function execute()
{
$resultPage = $this->resultFactory->create(\Magento\Framework\Controller\ResultFactory::TYPE_PAGE);
$resultPage->setActiveMenu('Adyen_Payment::notifications_overview')
->getConfig()->getTitle()->prepend(__('Adyen Notifications Overview'));
return $resultPage;
}
}
\ No newline at end of file
...@@ -1853,4 +1853,27 @@ class Data extends AbstractHelper ...@@ -1853,4 +1853,27 @@ class Data extends AbstractHelper
return $localeCode; return $localeCode;
} }
/**
* Get the Customer Area PSP Search URL with a preset PSP Reference
*
* @param string $pspReference
* @param string $liveEnvironment
* @return string
*/
public function getPspReferenceSearchUrl($pspReference, $liveEnvironment)
{
if ($liveEnvironment === "true") {
$checkoutEnvironment = "live";
} else {
$checkoutEnvironment = "test";
}
return sprintf(
"https://ca-%s.adyen.com/ca/ca/accounts/showTx.shtml?pspReference=%s",
$checkoutEnvironment,
$pspReference
);
}
} }
...@@ -1886,11 +1886,13 @@ class Cron ...@@ -1886,11 +1886,13 @@ class Cron
* *
* @return void * @return void
*/ */
protected function addRefundFailedNotice(){ protected function addRefundFailedNotice()
{
$this->notifierPool->addNotice( $this->notifierPool->addNotice(
__("Adyen: Refund for order #%1 has failed", $this->_merchantReference), __("Adyen: Refund for order #%1 has failed", $this->_merchantReference),
__("Reason: %1 | PSPReference: %2 | You can go to Adyen Customer Area and trigger this refund manually or contact our support.", $this->_reason, $this->_pspReference), __("Reason: %1 | PSPReference: %2 | You can go to Adyen Customer Area and trigger this refund manually or contact our support.",
sprintf("https://ca-%s.adyen.com/ca/ca/accounts/showTx.shtml?pspReference=%s", $this->_live === 'true' ? 'live' : 'test', $this->_pspReference) $this->_reason, $this->_pspReference),
$this->_adyenHelper->getPspReferenceSearchUrl($this->_pspReference, $this->_live)
); );
} }
} }
...@@ -105,4 +105,33 @@ class DataTest extends \PHPUnit\Framework\TestCase ...@@ -105,4 +105,33 @@ class DataTest extends \PHPUnit\Framework\TestCase
$this->assertEquals(false, $this->dataHelper->isPaymentMethodOpenInvoiceMethod('ideal')); $this->assertEquals(false, $this->dataHelper->isPaymentMethodOpenInvoiceMethod('ideal'));
$this->assertEquals(true, $this->dataHelper->isPaymentMethodOpenInvoiceMethod('test_klarna')); $this->assertEquals(true, $this->dataHelper->isPaymentMethodOpenInvoiceMethod('test_klarna'));
} }
/**
* @param string $expectedResult
* @param string $pspReference
* @param string $checkoutEnvironment
* @dataProvider checkoutEnvironmentsProvider
*
*/
public function testGetPspReferenceSearchUrl($expectedResult, $pspReference, $checkoutEnvironment)
{
$pspSearchUrl = $this->dataHelper->getPspReferenceSearchUrl($pspReference, $checkoutEnvironment);
$this->assertEquals($expectedResult, $pspSearchUrl);
}
public static function checkoutEnvironmentsProvider()
{
return array(
array(
'https://ca-test.adyen.com/ca/ca/accounts/showTx.shtml?pspReference=7914073381342284',
'7914073381342284',
'false'
),
array(
'https://ca-live.adyen.com/ca/ca/accounts/showTx.shtml?pspReference=883580976999434D',
'883580976999434D',
'true'
)
);
}
} }
<?php
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment Module
*
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*
* Author: Adyen <magento@adyen.com>
*/
namespace Adyen\Payment\Ui\Component\Listing\Column;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_MockObject as MockObject;
use Adyen\Payment\Ui\Component\Listing\Column\NotificationColumn;
use Magento\Sales\Model\Order;
use Magento\Backend\Helper\Data;
use Adyen\Payment\Helper\Data as AdyenHelper;
use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Framework\View\Element\UiComponentFactory;
class NotificationColumnTest extends TestCase
{
/**
* @var \PHPUnit_Framework_MockObject_MockObject|Order
*/
private $orderMock;
/**
* @var \PHPUnit_Framework_MockObject_MockObject|Data
*/
private $dataMock;
/**
* @var \PHPUnit_Framework_MockObject_MockObject|AdyenHelper
*/
private $adyenHelperMock;
/**
* @var \PHPUnit_Framework_MockObject_MockObject|ContextInterface
*/
private $contextMock;
/**
* @var \PHPUnit_Framework_MockObject_MockObject|UiComponentFactory
*/
private $uiComponentMock;
/**
* @var NotificationColumn
*/
private $notificationColumn;
public function setUp()
{
$this->orderMock = $this->getMockBuilder(Order::class)
->disableOriginalConstructor()
->getMock();
$this->orderMock->method("loadByIncrementId")
->willReturnSelf();
$this->orderMock->method("getId")
->willReturn(1);
$this->dataMock = $this->getMockBuilder(Data::class)
->disableOriginalConstructor()
->getMock();
$this->dataMock->method("getUrl")
->with("sales/order/view", ["order_id" => 1])
->willReturn("https://test.com/index.php/admin/sales/order/view/order_id/7/key/90713b7af1b7d29bc585626042062a9c514473d1c692c69be03eb1a8bfb00f74/");
$this->adyenHelperMock = $this->getMockBuilder(AdyenHelper::class)
->disableOriginalConstructor()
->getMock();
$this->adyenHelperMock->method("getPspReferenceSearchUrl")
->willReturnCallback(function($pspReference, $liveEnvironment){
return "https://ca-test.adyen.com/ca/ca/accounts/showTx.shtml?pspReference=$pspReference";
});
$this->contextMock = $this->getMockBuilder(ContextInterface::class)
->disableOriginalConstructor()
->getMock();
$this->uiComponentMock = $this->getMockBuilder(UiComponentFactory::class)
->disableOriginalConstructor()
->getMock();
$this->notificationColumn = new NotificationColumn(
$this->orderMock,
$this->dataMock,
$this->adyenHelperMock,
$this->contextMock,
$this->uiComponentMock
);
}
/**
* @dataProvider dataSourceProvider
* @throws \Exception
*/
public function testPrepareDataSource($originalDataSource, $modifiedDataSource)
{
$resultDataSource = $this->notificationColumn->prepareDataSource($originalDataSource);
$this->assertEquals($modifiedDataSource, $resultDataSource);
}
public function dataSourceProvider()
{
return array(
array(
array(
'data' =>
array(
'items' =>
array(
0 =>
array(
'id_field_name' => 'entity_id',
'entity_id' => '6779',
'pspreference' => '852559045255812F',
'original_reference' => '882559045109501K',
'merchant_reference' => '000000007',
'event_code' => 'REFUND_FAILED',
'success' => 'false',
'payment_method' => 'visa',
'amount_value' => '1000',
'amount_currency' => 'EUR',
'reason' => 'Modification in different currency than authorisation',
'live' => 'false',
'additional_data' => 'a:1:{s:14:"shopperCountry";s:2:"NL";}',
'done' => '1',
'processing' => '0',
'created_at' => '2019-05-28 12:08:53',
'updated_at' => '2020-02-07 09:02:35',
'orig_data' => null,
),
1 =>
array(
'id_field_name' => 'entity_id',
'entity_id' => '6780',
'pspreference' => '852559045465860A',
'original_reference' => '882559045109501K',
'merchant_reference' => '000000007',
'event_code' => 'REFUND',
'success' => 'false',
'payment_method' => 'visa',
'amount_value' => '1500',
'amount_currency' => 'EUR',
'reason' => 'Modification in different currency than authorisation',
'live' => 'false',
'additional_data' => 'a:1:{s:14:"shopperCountry";s:2:"NL";}',
'done' => '1',
'processing' => '0',
'created_at' => '2019-05-28 12:12:05',
'updated_at' => '2020-02-07 09:02:35',
'orig_data' => null,
),
2 =>
array(
'id_field_name' => 'entity_id',
'entity_id' => '6809',
'pspreference' => '882559051426497E',
'original_reference' => '8825562829109806',
'merchant_reference' => '000000007',
'event_code' => 'REFUND',
'success' => 'false',
'payment_method' => 'mc',
'amount_value' => '15000',
'amount_currency' => 'USD',
'reason' => 'Insufficient balance on payment',
'live' => 'false',
'additional_data' => 'a:1:{s:14:"shopperCountry";s:2:"GB";}',
'done' => '1',
'processing' => '0',
'created_at' => '2019-05-28 13:51:19',
'updated_at' => '2020-02-07 09:02:35',
'orig_data' => null,
),
),
'totalRecords' => 3,
)
),
array(
'data' =>
array(
'items' =>
array(
0 =>
array(
'id_field_name' => 'entity_id',
'entity_id' => '6779',
'pspreference' => '<a href="https://ca-test.adyen.com/ca/ca/accounts/showTx.shtml?pspReference=852559045255812F" target="_blank">852559045255812F</a>',
'original_reference' => '882559045109501K',
'merchant_reference' => '<a href="https://test.com/index.php/admin/sales/order/view/order_id/7/key/90713b7af1b7d29bc585626042062a9c514473d1c692c69be03eb1a8bfb00f74/">000000007</a>',
'event_code' => 'REFUND_FAILED',
'success' => '<span class="grid-severity-critical">false</span>',
'payment_method' => 'visa',
'amount_value' => '1000',
'amount_currency' => 'EUR',
'reason' => 'Modification in different currency than authorisation',
'live' => 'false',
'additional_data' => 'a:1:{s:14:"shopperCountry";s:2:"NL";}',
'done' => '1',
'processing' => '0',
'created_at' => '2019-05-28 12:08:53',
'updated_at' => '2020-02-07 09:02:35',
'orig_data' => null,
'status' => 'Processed',
),
1 =>
array(
'id_field_name' => 'entity_id',
'entity_id' => '6780',
'pspreference' => '<a href="https://ca-test.adyen.com/ca/ca/accounts/showTx.shtml?pspReference=852559045465860A" target="_blank">852559045465860A</a>',
'original_reference' => '882559045109501K',
'merchant_reference' => '<a href="https://test.com/index.php/admin/sales/order/view/order_id/7/key/90713b7af1b7d29bc585626042062a9c514473d1c692c69be03eb1a8bfb00f74/">000000007</a>',
'event_code' => 'REFUND',
'success' => '<span class="grid-severity-critical">false</span>',
'payment_method' => 'visa',
'amount_value' => '1500',
'amount_currency' => 'EUR',
'reason' => 'Modification in different currency than authorisation',
'live' => 'false',
'additional_data' => 'a:1:{s:14:"shopperCountry";s:2:"NL";}',
'done' => '1',
'processing' => '0',
'created_at' => '2019-05-28 12:12:05',
'updated_at' => '2020-02-07 09:02:35',
'orig_data' => null,
'status' => 'Processed',
),
2 =>
array(
'id_field_name' => 'entity_id',
'entity_id' => '6809',
'pspreference' => '<a href="https://ca-test.adyen.com/ca/ca/accounts/showTx.shtml?pspReference=882559051426497E" target="_blank">882559051426497E</a>',
'original_reference' => '8825562829109806',
'merchant_reference' => '<a href="https://test.com/index.php/admin/sales/order/view/order_id/7/key/90713b7af1b7d29bc585626042062a9c514473d1c692c69be03eb1a8bfb00f74/">000000007</a>',
'event_code' => 'REFUND',
'success' => '<span class="grid-severity-critical">false</span>',
'payment_method' => 'mc',
'amount_value' => '15000',
'amount_currency' => 'USD',
'reason' => 'Insufficient balance on payment',
'live' => 'false',
'additional_data' => 'a:1:{s:14:"shopperCountry";s:2:"GB";}',
'done' => '1',
'processing' => '0',
'created_at' => '2019-05-28 13:51:19',
'updated_at' => '2020-02-07 09:02:35',
'orig_data' => null,
'status' => 'Processed',
),
),
'totalRecords' => 3,
)
)
)
);
}
}
<?php
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment module (https://www.adyen.com/)
*
* Copyright (c) 2020 Adyen BV (https://www.adyen.com/)
* See LICENSE.txt for license details.
*
* Author: Adyen <magento@adyen.com>
*/
namespace Adyen\Payment\Ui\Component\Listing\Column;
class NotificationColumn extends \Magento\Ui\Component\Listing\Columns\Column
{
/**
* @var \Magento\Sales\Api\Data\OrderInterface
*/
protected $orderInterface;
/**
* @var \Magento\Backend\Helper\Data
*/
protected $backendHelper;
/**
* @var \Adyen\Payment\Helper\Data
*/
protected $adyenHelper;
public function __construct(
\Magento\Sales\Api\Data\OrderInterface $orderInterface,
\Magento\Backend\Helper\Data $backendHelper,
\Adyen\Payment\Helper\Data $adyenHelper,
\Magento\Framework\View\Element\UiComponent\ContextInterface $context,
\Magento\Framework\View\Element\UiComponentFactory $uiComponentFactory,
array $components = [],
array $data = []
) {
$this->orderInterface = $orderInterface;
$this->backendHelper = $backendHelper;
$this->adyenHelper = $adyenHelper;
parent::__construct($context, $uiComponentFactory, $components, $data);
}
/**
* Style and format Adyen notification columns
*
* @param array $dataSource
* @return array
*/
public function prepareDataSource(array $dataSource)
{
if (empty($dataSource['data']['items'])) {
return $dataSource;
}
foreach ($dataSource['data']['items'] as & $item) {
$class = "grid-severity-critical";
if ($item["success"] == "true") {
$class = "grid-severity-notice";
}
$item["success"] = sprintf('<span class="%s">%s</span>', $class, $item["success"]);
//Setting Status "fake" column value based on processing and done values
if ($item["processing"] == 0) {
if ($item["done"] == 0) {
$item["status"] = __("Queued");
} else {
$item["status"] = __("Processed");
}
} else {
$item["status"] = __("In progress");
}
//Adding anchor link to order number and PSP reference if order number exists
$this->orderInterface->unsetData();
$order = $this->orderInterface->loadByIncrementId($item["merchant_reference"]);
if ($order->getId()) {
$orderUrl = $this->backendHelper->getUrl("sales/order/view", ["order_id" => $order->getId()]);
$item["merchant_reference"] = sprintf(
'<a href="%s">%s</a>',
$orderUrl,
$item["merchant_reference"]
);
$item["pspreference"] = sprintf(
'<a href="%s" target="_blank">%s</a>',
$this->adyenHelper->getPspReferenceSearchUrl(
$item["pspreference"],
$item["live"]
),
$item["pspreference"]
);
}
}
return $dataSource;
}
}
\ No newline at end of file
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../Magento/Backend/etc/menu.xsd">
<menu>
<add id="Adyen_Payment::adyen" title="Adyen" module="Adyen_Payment" sortOrder="100" parent="Magento_Backend::system" resource="Adyen_Payment::adyen"/>
<add id="Adyen_Payment::notifications_overview" title="Notifications Overview" module="Adyen_Payment" sortOrder="10" parent="Adyen_Payment::adyen" action="adyen/notifications/overview" resource="Adyen_Payment::notifications_overview"/>
</menu>
</config>
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
<router id="admin">
<route id="adyen" frontName="adyen">
<module name="Adyen_Payment"/>
</route>
</router>
</config>
...@@ -1035,4 +1035,20 @@ ...@@ -1035,4 +1035,20 @@
<type name="Magento\Checkout\Api\GuestPaymentInformationManagementInterface"> <type name="Magento\Checkout\Api\GuestPaymentInformationManagementInterface">
<plugin name="AdyenGuestPaymentInformationManagementAddPaymentInfo" type="Adyen\Payment\Plugin\GuestPaymentInformationManagement" sortOrder="10"/> <plugin name="AdyenGuestPaymentInformationManagementAddPaymentInfo" type="Adyen\Payment\Plugin\GuestPaymentInformationManagement" sortOrder="10"/>
</type> </type>
<!--Notifications overview-->
<type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
<arguments>
<argument name="collections" xsi:type="array">
<item name="adyen_notifications_overview_data_source" xsi:type="string">Adyen\Payment\Model\ResourceModel\Notification\UiComponentCollection</item>
</argument>
</arguments>
</type>
<virtualType name="Adyen\Payment\Model\ResourceModel\Notification\UiComponentCollection" type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
<arguments>
<argument name="mainTable" xsi:type="string">adyen_notification</argument>
<argument name="resourceModel" xsi:type="string">Adyen\Payment\Model\ResourceModel\Notification</argument>
</arguments>
</virtualType>
</config> </config>
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<title>
Adyen Notifications Overview
</title>
</head>
<body>
<referenceContainer name="content">
<uiComponent name="adyen_notifications_overview"/>
</referenceContainer>
</body>
</page>
\ No newline at end of file
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">adyen_notifications_overview.adyen_notifications_overview_data_source</item>
<item name="deps" xsi:type="string">adyen_notifications_overview.adyen_notifications_overview_data_source</item>
</item>
<item name="spinner" xsi:type="string">spinner_columns</item>
</argument>
<listingToolbar name="listing_top">
<columnsControls name="columns_controls"/>
<paging name="listing_paging"/>
<filters name="listing_filters" />
</listingToolbar>
<dataSource name="nameOfDataSource">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider</argument>
<argument name="name" xsi:type="string">adyen_notifications_overview_data_source</argument>
<argument name="primaryFieldName" xsi:type="string">entity_id</argument>
<argument name="requestFieldName" xsi:type="string">id</argument>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
<item name="update_url" xsi:type="url" path="mui/index/render"/>
<item name="storageConfig" xsi:type="array">
<item name="indexField" xsi:type="string">entity_id</item>
</item>
</item>
</argument>
</argument>
</dataSource>
<columns name="spinner_columns">
<column name="entity_id">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">textRange</item>
<item name="sorting" xsi:type="string">desc</item>
<item name="label" xsi:type="string" translate="true">ID</item>
</item>
</argument>
</column>
<column name="processing">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">Magento\Config\Model\Config\Source\Yesno</item>
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
<item name="filter" xsi:type="string">select</item>
<item name="dataType" xsi:type="string">select</item>
<item name="editor" xsi:type="string">select</item>
<item name="label" xsi:type="string" translate="true">Processing</item>
</item>
</argument>
</column>
<column name="done">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">Magento\Config\Model\Config\Source\Yesno</item>
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
<item name="filter" xsi:type="string">select</item>
<item name="dataType" xsi:type="string">select</item>
<item name="editor" xsi:type="string">select</item>
<item name="label" xsi:type="string" translate="true">Done</item>
</item>
</argument>
</column>
<column name="status" class="Adyen\Payment\Ui\Component\Listing\Column\NotificationColumn">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Status</item>
<item name="sortable" xsi:type="boolean">false</item>
</item>
</argument>
</column>
<column name="success">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">true</item>
<item name="label" xsi:type="string" translate="true">Success</item>
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
</item>
</argument>
</column>
<column name="pspreference">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">PSP Reference</item>
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
</item>
</argument>
</column>
<column name="event_code">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Event Code</item>
</item>
</argument>
</column>
<column name="merchant_reference">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Order</item>
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
</item>
</argument>
</column>
<column name="created_at" class="Magento\Ui\Component\Listing\Columns\Date">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">dateRange</item>
<item name="label" xsi:type="string" translate="true">Creation Date</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/date</item>
<item name="dataType" xsi:type="string">date</item>
</item>
</argument>
</column>
</columns>
</listing>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment