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 f9f07dd2 authored by Rik ter Beek's avatar Rik ter Beek

remove deprecated adyen_pos integrations

parent 0611a071
<?php
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment module (https://www.adyen.com/)
*
* Copyright (c) 2015 Adyen BV (https://www.adyen.com/)
* See LICENSE.txt for license details.
*
* Author: Adyen <magento@adyen.com>
*/
namespace Adyen\Payment\Block\Info;
class Pos extends AbstractInfo
{
/**
* @var string
*/
protected $_template = 'Adyen_Payment::info/adyen_pos.phtml';
}
This diff is collapsed.
<?php
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment module (https://www.adyen.com/)
*
* Copyright (c) 2015 Adyen BV (https://www.adyen.com/)
* See LICENSE.txt for license details.
*
* Author: Adyen <magento@adyen.com>
*/
namespace Adyen\Payment\Controller\Process;
class RedirectPos extends \Magento\Framework\App\Action\Action
{
/**
* @var \Magento\Quote\Model\Quote
*/
protected $_quote = false;
/**
* @var \Magento\Checkout\Model\Session
*/
protected $_checkoutSession;
/**
* @var \Magento\Sales\Model\Order
*/
protected $_order;
/**
* @var \Magento\Sales\Model\OrderFactory
*/
protected $_orderFactory;
/**
* @param \Magento\Framework\App\Action\Context $context
*/
public function __construct(
\Magento\Framework\App\Action\Context $context
) {
parent::__construct($context);
}
/**
* Return checkout session object
*
* @return \Magento\Checkout\Model\Session
*/
protected function _getCheckoutSession()
{
return $this->_checkoutSession;
}
public function execute()
{
$this->_view->loadLayout();
$this->_view->getLayout()->initMessages();
$this->_view->renderLayout();
}
/**
* Get order object
*
* @return \Magento\Sales\Model\Order
*/
protected function _getOrder()
{
if (!$this->_order) {
$incrementId = $this->_getCheckout()->getLastRealOrderId();
$this->_orderFactory = $this->_objectManager->get('Magento\Sales\Model\OrderFactory');
$this->_order = $this->_orderFactory->create()->loadByIncrementId($incrementId);
}
return $this->_order;
}
/**
* @return \Magento\Checkout\Model\Session
*/
protected function _getCheckout()
{
return $this->_objectManager->get('Magento\Checkout\Model\Session');
}
/**
* @return mixed
*/
protected function _getQuote()
{
return $this->_objectManager->get('Magento\Quote\Model\Quote');
}
/**
* @return mixed
*/
protected function _getQuoteManagement()
{
return $this->_objectManager->get('\Magento\Quote\Model\QuoteManagement');
}
}
<?php
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment module (https://www.adyen.com/)
*
* Copyright (c) 2015 Adyen BV (https://www.adyen.com/)
* See LICENSE.txt for license details.
*
* Author: Adyen <magento@adyen.com>
*/
namespace Adyen\Payment\Gateway\Command;
use Magento\Payment\Gateway\Command;
use Magento\Payment\Gateway\CommandInterface;
class PosCommand implements CommandInterface
{
/**
* @var \Adyen\Payment\Helper\Data
*/
protected $_adyenHelper;
/**
* HppCommand constructor.
*
* @param \Adyen\Payment\Helper\Data $adyenHelper
*/
public function __construct(\Adyen\Payment\Helper\Data $adyenHelper)
{
$this->_adyenHelper = $adyenHelper;
}
/**
* @param array $commandSubject
* @return $this
*/
public function execute(array $commandSubject)
{
$payment =\Magento\Payment\Gateway\Helper\SubjectReader::readPayment($commandSubject);
$stateObject = \Magento\Payment\Gateway\Helper\SubjectReader::readStateObject($commandSubject);
// do not send email
$payment = $payment->getPayment();
$payment->getOrder()->setCanSendNewEmailFlag(false);
// update status and state
$stateObject->setState(\Magento\Sales\Model\Order::STATE_NEW);
$stateObject->setStatus($this->_adyenHelper->getAdyenAbstractConfigData('order_status'));
$stateObject->setIsNotified(false);
return $this;
}
}
...@@ -452,28 +452,6 @@ class Data extends AbstractHelper ...@@ -452,28 +452,6 @@ class Data extends AbstractHelper
return $this->getConfigData($field, 'adyen_oneclick', $storeId, true); return $this->getConfigData($field, 'adyen_oneclick', $storeId, true);
} }
/**
* @desc Gives back adyen_pos configuration values
* @param $field
* @param int|null $storeId
* @return mixed
*/
public function getAdyenPosConfigData($field, $storeId = null)
{
return $this->getConfigData($field, 'adyen_pos', $storeId);
}
/**
* @desc Gives back adyen_pos configuration values as flag
* @param $field
* @param int|null $storeId
* @return mixed
*/
public function getAdyenPosConfigDataFlag($field, $storeId = null)
{
return $this->getConfigData($field, 'adyen_pos', $storeId, true);
}
/** /**
* @param $field * @param $field
* @param int|null $storeId * @param int|null $storeId
......
...@@ -649,7 +649,6 @@ class Cron ...@@ -649,7 +649,6 @@ class Cron
if ($this->_eventCode == Notification::AUTHORISATION if ($this->_eventCode == Notification::AUTHORISATION
|| $this->_eventCode == Notification::HANDLED_EXTERNALLY || $this->_eventCode == Notification::HANDLED_EXTERNALLY
|| ($this->_eventCode == Notification::CAPTURE && $_paymentCode == "adyen_pos")
) { ) {
/* /*
* if current notification is authorisation : false and * if current notification is authorisation : false and
...@@ -847,10 +846,7 @@ class Cron ...@@ -847,10 +846,7 @@ class Cron
break; break;
case Notification::HANDLED_EXTERNALLY: case Notification::HANDLED_EXTERNALLY:
case Notification::AUTHORISATION: case Notification::AUTHORISATION:
// for POS don't do anything on the AUTHORIZATION
if ($_paymentCode != "adyen_pos") {
$this->_authorizePayment(); $this->_authorizePayment();
}
break; break;
case Notification::MANUAL_REVIEW_REJECT: case Notification::MANUAL_REVIEW_REJECT:
// don't do anything it will send a CANCEL_OR_REFUND notification when this payment is captured // don't do anything it will send a CANCEL_OR_REFUND notification when this payment is captured
...@@ -865,7 +861,6 @@ class Cron ...@@ -865,7 +861,6 @@ class Cron
} }
break; break;
case Notification::CAPTURE: case Notification::CAPTURE:
if ($_paymentCode != "adyen_pos") {
/* /*
* ignore capture if you are on auto capture * ignore capture if you are on auto capture
* this could be called if manual review is enabled and you have a capture delay * this could be called if manual review is enabled and you have a capture delay
...@@ -889,10 +884,6 @@ class Cron ...@@ -889,10 +884,6 @@ class Cron
} }
} }
} }
} else {
// FOR POS authorize the payment on the CAPTURE notification
$this->_authorizePayment();
}
break; break;
case Notification::OFFER_CLOSED: case Notification::OFFER_CLOSED:
if (!$this->_order->canCancel()) { if (!$this->_order->canCancel()) {
...@@ -1147,10 +1138,8 @@ class Cron ...@@ -1147,10 +1138,8 @@ class Cron
} }
} }
if (($this->_paymentMethod == "c_cash" && if ($this->_paymentMethod == "c_cash" &&
$this->_getConfigData('create_shipment', 'adyen_cash', $this->_order->getStoreId())) || $this->_getConfigData('create_shipment', 'adyen_cash', $this->_order->getStoreId())
($this->_getConfigData('create_shipment', 'adyen_pos', $this->_order->getStoreId()) &&
$_paymentCode == "adyen_pos")
) { ) {
$this->_createShipment(); $this->_createShipment();
} }
...@@ -1321,9 +1310,9 @@ class Cron ...@@ -1321,9 +1310,9 @@ class Cron
return false; return false;
} }
// payment method ideal, cash adyen_boleto or adyen_pos has direct capture // payment method ideal, cash adyen_boleto has direct capture
if ($_paymentCode == "adyen_pos" || (($_paymentCode == "adyen_sepa" || if (($_paymentCode == "adyen_sepa" ||
$this->_paymentMethod == "sepadirectdebit") && $sepaFlow != "authcap") $this->_paymentMethod == "sepadirectdebit") && $sepaFlow != "authcap"
) { ) {
$this->_adyenLogger->addAdyenNotificationCronjob( $this->_adyenLogger->addAdyenNotificationCronjob(
'This payment method does not allow manual capture.(2) paymentCode:' . 'This payment method does not allow manual capture.(2) paymentCode:' .
...@@ -1333,7 +1322,8 @@ class Cron ...@@ -1333,7 +1322,8 @@ class Cron
} }
if ($_paymentCode == "adyen_pos_cloud") { if ($_paymentCode == "adyen_pos_cloud") {
$captureModePos = $this->_adyenHelper->getAdyenPosCloudConfigData('capture_mode_pos', $this->_order->getStoreId()); $captureModePos = $this->_adyenHelper->getAdyenPosCloudConfigData('capture_mode_pos',
$this->_order->getStoreId());
if (strcmp($captureModePos, 'auto') === 0) { if (strcmp($captureModePos, 'auto') === 0) {
$this->_adyenLogger->addAdyenNotificationCronjob( $this->_adyenLogger->addAdyenNotificationCronjob(
'This payment method is POS Cloud and configured to be working as auto capture ' 'This payment method is POS Cloud and configured to be working as auto capture '
......
<?php
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment module (https://www.adyen.com/)
*
* Copyright (c) 2015 Adyen BV (https://www.adyen.com/)
* See LICENSE.txt for license details.
*
* Author: Adyen <magento@adyen.com>
*/
namespace Adyen\Payment\Model\Ui;
use Magento\Checkout\Model\ConfigProviderInterface;
use Magento\Payment\Helper\Data as PaymentHelper;
use Magento\Directory\Helper\Data;
class AdyenPosConfigProvider implements ConfigProviderInterface
{
const CODE = 'adyen_pos';
/**
* @var PaymentHelper
*/
protected $_paymentHelper;
/**
* @var \Adyen\Payment\Helper\Data
*/
protected $_adyenHelper;
/**
* Request object
*
* @var \Magento\Framework\App\RequestInterface
*/
protected $_request;
/**
* @var \Magento\Framework\UrlInterface
*/
protected $_urlBuilder;
/**
* AdyenHppConfigProvider constructor.
*
* @param PaymentHelper $paymentHelper
* @param \Adyen\Payment\Helper\Data $adyenHelper
*/
public function __construct(
PaymentHelper $paymentHelper,
\Adyen\Payment\Helper\Data $adyenHelper,
\Magento\Framework\App\RequestInterface $request,
\Magento\Framework\UrlInterface $urlBuilder
) {
$this->_paymentHelper = $paymentHelper;
$this->_adyenHelper = $adyenHelper;
$this->_request = $request;
$this->_urlBuilder = $urlBuilder;
}
/**
* Set configuration for AdyenHPP payemnt method
*
* @return array
*/
public function getConfig()
{
// set to active
$config = [
'payment' => [
self::CODE => [
'isActive' => true,
'redirectUrl' => $this->_urlBuilder->getUrl(
'adyen/process/redirectPos',
['_secure' => $this->_getRequest()->isSecure()]
)
]
]
];
return $config;
}
/**
* Retrieve request object
*
* @return \Magento\Framework\App\RequestInterface
*/
protected function _getRequest()
{
return $this->_request;
}
}
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
<include path="Adyen_Payment::system/adyen_oneclick.xml"/> <include path="Adyen_Payment::system/adyen_oneclick.xml"/>
<include path="Adyen_Payment::system/adyen_hpp.xml"/> <include path="Adyen_Payment::system/adyen_hpp.xml"/>
<include path="Adyen_Payment::system/adyen_sepa.xml"/> <include path="Adyen_Payment::system/adyen_sepa.xml"/>
<include path="Adyen_Payment::system/adyen_pos.xml"/>
<include path="Adyen_Payment::system/adyen_pos_cloud.xml"/> <include path="Adyen_Payment::system/adyen_pos_cloud.xml"/>
<include path="Adyen_Payment::system/adyen_pay_by_mail.xml"/> <include path="Adyen_Payment::system/adyen_pay_by_mail.xml"/>
<include path="Adyen_Payment::system/adyen_boleto.xml"/> <include path="Adyen_Payment::system/adyen_boleto.xml"/>
......
<?xml version="1.0"?>
<!--
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment module (https://www.adyen.com/)
*
* Copyright (c) 2015 Adyen BV (https://www.adyen.com/)
* See LICENSE.txt for license details.
*
* Author: Adyen <magento@adyen.com>
*/
-->
<include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_include.xsd">
<group id="adyen_pos" translate="label" type="text" sortOrder="300" showInDefault="1" showInWebsite="1" showInStore="1">
<label><![CDATA[Point of Sale (POS) integration]]></label>
<frontend_model>Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment</frontend_model>
<fieldset_css>adyen-method-adyen-cc</fieldset_css>
<comment>Process Point of Sales transactions</comment>
<field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enabled</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<config_path>payment/adyen_pos/active</config_path>
</field>
<field id="title" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Title</label>
<config_path>payment/adyen_pos/title</config_path>
</field>
<field id="sort_order" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Sort Order</label>
<frontend_class>validate-number</frontend_class>
<config_path>payment/adyen_pos/sort_order</config_path>
</field>
<field id="recurring_type" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Agreement Type</label>
<tooltip>You can set different value for POS because you have to have the permission of the customer</tooltip>
<source_model>Adyen\Payment\Model\Config\Source\RecurringType</source_model>
<config_path>payment/adyen_pos/recurring_type</config_path>
</field>
<group id="adyen_pos_advanced_settings" translate="label" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="200">
<label>Advanced Settings</label>
<frontend_model>Magento\Config\Block\System\Config\Form\Fieldset</frontend_model>
<field id="add_receipt_order_lines" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Add orderlines to receipt</label>
<tooltip>If you have the Adyen App configured to print to an external printer the orderlines can be printed on to the receipt if you turn this option on.</tooltip>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<config_path>payment/adyen_pos/add_receipt_order_lines</config_path>
</field>
</group>
<group id="adyen_pos_country_specific" translate="label" showInDefault="1" showInWebsite="1" sortOrder="210">
<label>Country Specific Settings</label>
<frontend_model>Magento\Config\Block\System\Config\Form\Fieldset</frontend_model>
<field id="allowspecific" translate="label" type="allowspecific" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Payment from Applicable Countries</label>
<source_model>Magento\Payment\Model\Config\Source\Allspecificcountries</source_model>
<config_path>payment/adyen_pos/allowspecific</config_path>
</field>
<field id="specificcountry" translate="label" type="multiselect" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Payment from Specific Countries</label>
<source_model>Magento\Directory\Model\Config\Source\Country</source_model>
<can_be_empty>1</can_be_empty>
<config_path>payment/adyen_pos/specificcountry</config_path>
</field>
</group>
</group>
</include>
\ No newline at end of file
...@@ -130,26 +130,6 @@ ...@@ -130,26 +130,6 @@
<can_cancel>1</can_cancel> <can_cancel>1</can_cancel>
<group>adyen</group> <group>adyen</group>
</adyen_sepa> </adyen_sepa>
<adyen_pos>
<active>0</active>
<model>AdyenPaymentPosFacade</model>
<order_status>pending</order_status>
<title>Adyen POS</title>
<allowspecific>0</allowspecific>
<sort_order>5</sort_order>
<payment_action>order</payment_action>
<can_initialize>1</can_initialize>
<is_gateway>1</is_gateway>
<can_use_checkout>1</can_use_checkout>
<can_capture>1</can_capture>
<can_capture_partial>1</can_capture_partial>
<can_use_internal>0</can_use_internal>
<can_refund_partial_per_invoice>1</can_refund_partial_per_invoice>
<can_refund>1</can_refund>
<can_void>1</can_void>
<can_cancel>1</can_cancel>
<group>adyen</group>
</adyen_pos>
<adyen_pos_cloud> <adyen_pos_cloud>
<active>0</active> <active>0</active>
<model>AdyenPaymentPosCloudFacade</model> <model>AdyenPaymentPosCloudFacade</model>
......
...@@ -84,16 +84,6 @@ ...@@ -84,16 +84,6 @@
<argument name="commandPool" xsi:type="object">AdyenPaymentBoletoCommandPool</argument> <argument name="commandPool" xsi:type="object">AdyenPaymentBoletoCommandPool</argument>
</arguments> </arguments>
</virtualType> </virtualType>
<virtualType name="AdyenPaymentPosFacade" type="Magento\Payment\Model\Method\Adapter">
<arguments>
<argument name="code" xsi:type="const">Adyen\Payment\Model\Ui\AdyenPosConfigProvider::CODE</argument>
<argument name="formBlockType" xsi:type="string">Adyen\Payment\Block\Form\Pos</argument>
<argument name="infoBlockType" xsi:type="string">Adyen\Payment\Block\Info\Pos</argument>
<argument name="valueHandlerPool" xsi:type="object">AdyenPaymentPosValueHandlerPool</argument>
<argument name="validatorPool" xsi:type="object">AdyenPaymentPosValidatorPool</argument>
<argument name="commandPool" xsi:type="object">AdyenPaymentPosCommandPool</argument>
</arguments>
</virtualType>
<virtualType name="AdyenPaymentPosCloudFacade" type="Magento\Payment\Model\Method\Adapter"> <virtualType name="AdyenPaymentPosCloudFacade" type="Magento\Payment\Model\Method\Adapter">
<arguments> <arguments>
<argument name="code" xsi:type="const">Adyen\Payment\Model\Ui\AdyenPosCloudConfigProvider::CODE</argument> <argument name="code" xsi:type="const">Adyen\Payment\Model\Ui\AdyenPosCloudConfigProvider::CODE</argument>
...@@ -205,13 +195,6 @@ ...@@ -205,13 +195,6 @@
</arguments> </arguments>
</virtualType> </virtualType>
<virtualType name="AdyenPaymentPosValueHandlerPool" type="Magento\Payment\Gateway\Config\ValueHandlerPool">
<arguments>
<argument name="handlers" xsi:type="array">
<item name="default" xsi:type="string">AdyenPaymentPosConfigValueHandler</item>
</argument>
</arguments>
</virtualType>
<virtualType name="AdyenPaymentPosCloudValueHandlerPool" type="Magento\Payment\Gateway\Config\ValueHandlerPool"> <virtualType name="AdyenPaymentPosCloudValueHandlerPool" type="Magento\Payment\Gateway\Config\ValueHandlerPool">
<arguments> <arguments>
<argument name="handlers" xsi:type="array"> <argument name="handlers" xsi:type="array">
...@@ -219,11 +202,6 @@ ...@@ -219,11 +202,6 @@
</argument> </argument>
</arguments> </arguments>
</virtualType> </virtualType>
<virtualType name="AdyenPaymentPosConfigValueHandler" type="Magento\Payment\Gateway\Config\ConfigValueHandler">
<arguments>
<argument name="configInterface" xsi:type="object">AdyenPaymentPosConfig</argument>
</arguments>
</virtualType>
<virtualType name="AdyenPaymentPosCloudConfigValueHandler" type="Magento\Payment\Gateway\Config\ConfigValueHandler"> <virtualType name="AdyenPaymentPosCloudConfigValueHandler" type="Magento\Payment\Gateway\Config\ConfigValueHandler">
<arguments> <arguments>
<argument name="configInterface" xsi:type="object">AdyenPaymentPosCloudConfig</argument> <argument name="configInterface" xsi:type="object">AdyenPaymentPosCloudConfig</argument>
...@@ -288,11 +266,6 @@ ...@@ -288,11 +266,6 @@
<argument name="methodCode" xsi:type="const">Adyen\Payment\Model\Ui\AdyenBoletoConfigProvider::CODE</argument> <argument name="methodCode" xsi:type="const">Adyen\Payment\Model\Ui\AdyenBoletoConfigProvider::CODE</argument>
</arguments> </arguments>
</virtualType> </virtualType>
<virtualType name="AdyenPaymentPosConfig" type="Magento\Payment\Gateway\Config\Config">
<arguments>
<argument name="methodCode" xsi:type="const">Adyen\Payment\Model\Ui\AdyenPosConfigProvider::CODE</argument>
</arguments>
</virtualType>
<virtualType name="AdyenPaymentPosCloudConfig" type="Magento\Payment\Gateway\Config\Config"> <virtualType name="AdyenPaymentPosCloudConfig" type="Magento\Payment\Gateway\Config\Config">
<arguments> <arguments>
<argument name="methodCode" xsi:type="const">Adyen\Payment\Model\Ui\AdyenPosCloudConfigProvider::CODE</argument> <argument name="methodCode" xsi:type="const">Adyen\Payment\Model\Ui\AdyenPosCloudConfigProvider::CODE</argument>
...@@ -371,18 +344,6 @@ ...@@ -371,18 +344,6 @@
</arguments> </arguments>
</virtualType> </virtualType>
<virtualType name="AdyenPaymentPosCommandPool" type="Magento\Payment\Gateway\Command\CommandPool">
<arguments>
<argument name="commands" xsi:type="array">
<item name="initialize" xsi:type="string">Adyen\Payment\Gateway\Command\PosCommand</item>
<item name="capture" xsi:type="string">AdyenPaymentCaptureCommand</item>
<item name="void" xsi:type="string">AdyenPaymentCancelCommand</item>
<item name="refund" xsi:type="string">AdyenPaymentRefundCommand</item>
<item name="cancel" xsi:type="string">AdyenPaymentCancelCommand</item>
</argument>
</arguments>
</virtualType>
<virtualType name="AdyenPaymentPosCloudCommandPool" type="Magento\Payment\Gateway\Command\CommandPool"> <virtualType name="AdyenPaymentPosCloudCommandPool" type="Magento\Payment\Gateway\Command\CommandPool">
<arguments> <arguments>
<argument name="commands" xsi:type="array"> <argument name="commands" xsi:type="array">
...@@ -759,13 +720,6 @@ ...@@ -759,13 +720,6 @@
</arguments> </arguments>
</virtualType> </virtualType>
<virtualType name="AdyenPaymentPosValidatorPool" type="Magento\Payment\Gateway\Validator\ValidatorPool">
<arguments>
<argument name="validators" xsi:type="array">
<item name="country" xsi:type="string">AdyenPosCountryValidator</item>
</argument>
</arguments>
</virtualType>
<virtualType name="AdyenPaymentPosCloudValidatorPool" type="Magento\Payment\Gateway\Validator\ValidatorPool"> <virtualType name="AdyenPaymentPosCloudValidatorPool" type="Magento\Payment\Gateway\Validator\ValidatorPool">
<arguments> <arguments>
<argument name="validators" xsi:type="array"> <argument name="validators" xsi:type="array">
...@@ -773,11 +727,6 @@ ...@@ -773,11 +727,6 @@
</argument> </argument>
</arguments> </arguments>
</virtualType> </virtualType>
<virtualType name="AdyenPosCountryValidator" type="Magento\Payment\Gateway\Validator\CountryValidator">
<arguments>
<argument name="config" xsi:type="object">AdyenPaymentPosConfig</argument>
</arguments>
</virtualType>
<virtualType name="AdyenPosCloudCountryValidator" type="Magento\Payment\Gateway\Validator\CountryValidator"> <virtualType name="AdyenPosCloudCountryValidator" type="Magento\Payment\Gateway\Validator\CountryValidator">
<arguments> <arguments>
<argument name="config" xsi:type="object">AdyenPaymentPosCloudConfig</argument> <argument name="config" xsi:type="object">AdyenPaymentPosCloudConfig</argument>
......
...@@ -27,15 +27,28 @@ ...@@ -27,15 +27,28 @@
<type name="Magento\Checkout\Model\CompositeConfigProvider"> <type name="Magento\Checkout\Model\CompositeConfigProvider">
<arguments> <arguments>
<argument name="configProviders" xsi:type="array"> <argument name="configProviders" xsi:type="array">
<item name="adyen_generic_config_provider" xsi:type="object">Adyen\Payment\Model\Ui\AdyenGenericConfigProvider</item> <item name="adyen_generic_config_provider" xsi:type="object">
<item name="adyen_cc_config_provider" xsi:type="object">Adyen\Payment\Model\Ui\AdyenCcConfigProvider</item> Adyen\Payment\Model\Ui\AdyenGenericConfigProvider
<item name="adyen_oneclick_config_provider" xsi:type="object">Adyen\Payment\Model\Ui\AdyenOneclickConfigProvider</item> </item>
<item name="adyen_hpp_config_provider" xsi:type="object">Adyen\Payment\Model\Ui\AdyenHppConfigProvider</item> <item name="adyen_cc_config_provider" xsi:type="object">Adyen\Payment\Model\Ui\AdyenCcConfigProvider
<item name="adyen_sepa_config_provider" xsi:type="object">Adyen\Payment\Model\Ui\AdyenSepaConfigProvider</item> </item>
<item name="adyen_boleto_config_provider" xsi:type="object">Adyen\Payment\Model\Ui\AdyenBoletoConfigProvider</item> <item name="adyen_oneclick_config_provider" xsi:type="object">
<item name="adyen_pos_config_provider" xsi:type="object">Adyen\Payment\Model\Ui\AdyenPosConfigProvider</item> Adyen\Payment\Model\Ui\AdyenOneclickConfigProvider
<item name="adyen_pos_cloud_config_provider" xsi:type="object">Adyen\Payment\Model\Ui\AdyenPosCloudConfigProvider</item> </item>
<item name="adyen_apple_pay_config_provider" xsi:type="object">Adyen\Payment\Model\Ui\AdyenApplePayConfigProvider</item> <item name="adyen_hpp_config_provider" xsi:type="object">Adyen\Payment\Model\Ui\AdyenHppConfigProvider
</item>
<item name="adyen_sepa_config_provider" xsi:type="object">
Adyen\Payment\Model\Ui\AdyenSepaConfigProvider
</item>
<item name="adyen_boleto_config_provider" xsi:type="object">
Adyen\Payment\Model\Ui\AdyenBoletoConfigProvider
</item>
<item name="adyen_pos_cloud_config_provider" xsi:type="object">
Adyen\Payment\Model\Ui\AdyenPosCloudConfigProvider
</item>
<item name="adyen_apple_pay_config_provider" xsi:type="object">
Adyen\Payment\Model\Ui\AdyenApplePayConfigProvider
</item>
</argument> </argument>
</arguments> </arguments>
</type> </type>
......
<?php
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment module (https://www.adyen.com/)
*
* Copyright (c) 2015 Adyen BV (https://www.adyen.com/)
* See LICENSE.txt for license details.
*
* Author: Adyen <magento@adyen.com>
*/
// @codingStandardsIgnoreFile
?>
<?php
/**
* @see \Magento\Payment\Block\Info
*/
?>
<?php echo $block->escapeHtml($block->getMethod()->getTitle()) ?>
<?php
$_info = $this->getInfo();
$_isDemoMode = $block->isDemoMode();
?>
<?php if ($_pspReference = $_info->getAdditionalInformation('pspReference')):?>
<div>
<?php if($_isDemoMode): ?>
<?php echo __('Adyen PSP Reference: <a href="https://ca-test.adyen.com/ca/ca/accounts/showTx.shtml?pspReference=%1&txType=Payment" target="__blank">%1</a>', $block->escapeHtml($_pspReference), $block->escapeHtml($_pspReference)) ?>
<?php else: ?>
<?php echo __('Adyen PSP Reference: <a href="https://ca-live.adyen.com/ca/ca/accounts/showTx.shtml?pspReference=%1&txType=Payment" target="__blank">%1</a>', $block->escapeHtml($_pspReference), $block->escapeHtml($_pspReference)) ?>
<?php endif; ?>
</div>
<?php endif;?>
<?php if($_info->getAdditionalInformation('adyen_total_fraud_score') != ""): ?>
<?php echo __('Total fraud score: %1', $_info->getAdditionalInformation('adyen_total_fraud_score')) ?><br/>
<?php endif; ?>
<?php if ($_specificInfo = $block->getSpecificInformation()):?>
<table class="data-table admin__table-secondary">
<?php foreach ($_specificInfo as $_label => $_value):?>
<tr>
<th><?php echo $block->escapeHtml($_label)?>:</th>
<td><?php echo nl2br(implode("\n", $block->getValueAsArray($_value, true)))?></td>
</tr>
<?php endforeach; ?>
</table>
<?php endif;?>
<?php echo $block->getChildHtml()?>
<?xml version="1.0"?>
<!--
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment module (https://www.adyen.com/)
*
* Copyright (c) 2015 Adyen BV (https://www.adyen.com/)
* See LICENSE.txt for license details.
*
* Author: Adyen <magento@adyen.com>
*/
-->
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
<container name="root">
<block class="Adyen\Payment\Block\Redirect\Pos" name="adyen-pos-redirect-form" template="redirect/pos/form.phtml" cacheable="false"/>
</container>
</layout>
\ No newline at end of file
...@@ -64,9 +64,6 @@ ...@@ -64,9 +64,6 @@
<item name="adyen_apple_pay" xsi:type="array"> <item name="adyen_apple_pay" xsi:type="array">
<item name="isBillingAddressRequired" xsi:type="boolean">true</item> <item name="isBillingAddressRequired" xsi:type="boolean">true</item>
</item> </item>
<item name="adyen_pos" xsi:type="array">
<item name="isBillingAddressRequired" xsi:type="boolean">true</item>
</item>
<item name="adyen_pos_cloud" xsi:type="array"> <item name="adyen_pos_cloud" xsi:type="array">
<item name="isBillingAddressRequired" xsi:type="boolean">true</item> <item name="isBillingAddressRequired" xsi:type="boolean">true</item>
</item> </item>
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
$_info = $this->getInfo(); $_info = $this->getInfo();
?> ?>
<dl class="payment-method adyen_pos"> <dl class="payment-method adyen_paybymail">
<dt class="title"><?php echo $block->escapeHtml($block->getMethod()->getTitle()) ?></dt> <dt class="title"><?php echo $block->escapeHtml($block->getMethod()->getTitle()) ?></dt>
<dt><a target="_blank" href="<?php echo $this->getMethod()->getInfoInstance()->getAdditionalInformation('payment_url'); ?>"><?php echo __("Click here to pay for your purchase"); ?></a></dt> <dt><a target="_blank" href="<?php echo $this->getMethod()->getInfoInstance()->getAdditionalInformation('payment_url'); ?>"><?php echo __("Click here to pay for your purchase"); ?></a></dt>
</dl> </dl>
<?php
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment module (https://www.adyen.com/)
*
* Copyright (c) 2015 Adyen BV (https://www.adyen.com/)
* See LICENSE.txt for license details.
*
* Author: Adyen <magento@adyen.com>
*/
// @codingStandardsIgnoreFile
?>
<?php
$_info = $this->getInfo();
?>
<dl class="payment-method adyen_pos">
<?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?><br/>
<dt class="title"><?php echo $block->escapeHtml($block->getMethod()->getTitle()) ?></dt>
</dl>
<?php
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment module (https://www.adyen.com/)
*
* Copyright (c) 2015 Adyen BV (https://www.adyen.com/)
* See LICENSE.txt for license details.
*
* Author: Adyen <magento@adyen.com>
*/
?>
<html>
<head>
</head>
<body>
<a id="adyen-pos-launchlink" href="<?php echo $block->getLaunchLink(); ?>">Continue</a>
<script>
document.getElementById('adyen-pos-launchlink').click();
</script>
</body>
</html>
...@@ -48,10 +48,6 @@ define( ...@@ -48,10 +48,6 @@ define(
type: 'adyen_sepa', type: 'adyen_sepa',
component: 'Adyen_Payment/js/view/payment/method-renderer/adyen-sepa-method' component: 'Adyen_Payment/js/view/payment/method-renderer/adyen-sepa-method'
}, },
{
type: 'adyen_pos',
component: 'Adyen_Payment/js/view/payment/method-renderer/adyen-pos-method'
},
{ {
type: 'adyen_boleto', type: 'adyen_boleto',
component: 'Adyen_Payment/js/view/payment/method-renderer/adyen-boleto-method' component: 'Adyen_Payment/js/view/payment/method-renderer/adyen-boleto-method'
......
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment module (https://www.adyen.com/)
*
* Copyright (c) 2015 Adyen BV (https://www.adyen.com/)
* See LICENSE.txt for license details.
*
* Author: Adyen <magento@adyen.com>
*/
define(
[
'jquery',
'Magento_Checkout/js/view/payment/default',
'Magento_Checkout/js/model/payment/additional-validators',
'Magento_Checkout/js/model/full-screen-loader',
'Magento_Checkout/js/action/place-order',
'Magento_Checkout/js/model/quote'
],
function ($, Component, additionalValidators, fullScreenLoader, placeOrderAction, quote) {
'use strict';
return Component.extend({
defaults: {
template: 'Adyen_Payment/payment/pos-form'
},
initObservable: function () {
this._super()
.observe([]);
return this;
},
/** Redirect to adyen */
continueToAdyen: function () {
var self = this;
if (this.validate() && additionalValidators.validate()) {
//update payment method information if additional data was changed
this.isPlaceOrderActionAllowed(false);
fullScreenLoader.startLoader();
$.when(
placeOrderAction(this.getData(), this.messageContainer)
).fail(
function () {
self.isPlaceOrderActionAllowed(true);
}
).done(
function () {
self.afterPlaceOrder();
$.mage.redirect(
window.checkoutConfig.payment[quote.paymentMethod().method].redirectUrl
);
}
);
}
return false;
},
showLogo: function () {
return window.checkoutConfig.payment.adyen.showLogo;
},
validate: function () {
return true;
}
});
}
);
<!--
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment module (https://www.adyen.com/)
*
* Copyright (c) 2015 Adyen BV (https://www.adyen.com/)
* See LICENSE.txt for license details.
*
* Author: Adyen <magento@adyen.com>
*/
-->
<div class="payment-method" data-bind="css: {'_active': (getCode() == isChecked())}">
<div class="payment-method-title field choice">
<input type="radio"
name="payment[method]"
class="radio"
data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()"/>
<label data-bind="attr: {'for': getCode()}" class="label">
<!-- ko if: showLogo() -->
<div data-bind="attr: { 'class': 'adyen-sprite ' + getCode() }"></div>
<!--/ko-->
<span data-bind="text: getTitle()"></span>
</label>
</div>
<div class="payment-method-content">
<div class="payment-method-billing-address">
<!-- ko foreach: $parent.getRegion(getBillingAddressFormName()) -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
</div>
<!-- ko foreach: getRegion('messages') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
<fieldset class="fieldset" data-bind='attr: {id: "payment_form_" + getCode()}'>
<div class="payment-method-note">
<!-- ko text: $t('You will be redirected to the Adyen App.') --><!-- /ko -->
</div>
</fieldset>
<div class="checkout-agreements-block">
<!-- ko foreach: $parent.getRegion('before-place-order') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
</div>
<div class="actions-toolbar">
<div class="primary">
<button class="action primary checkout"
type="submit"
data-bind="click: continueToAdyen, enable: (getCode() == isChecked())"
disabled>
<span data-bind="text: $t('Continue to Adyen App')"></span>
</button>
</div>
</div>
</div>
</div>
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