We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit aa89f491 authored by Rik ter Beek's avatar Rik ter Beek

#67 Adyen CC and Adyen Oneclick are now using the Facade implementation

parent 482fd41f
......@@ -45,21 +45,29 @@ class Validate3d extends \Magento\Framework\App\Action\Action
*/
protected $_adyenHelper;
/**
* @var \Adyen\Payment\Model\Api\PaymentRequest
*/
protected $_paymentRequest;
/**
* Validate3d constructor.
*
* @param \Magento\Framework\App\Action\Context $context
* @param \Adyen\Payment\Logger\AdyenLogger $adyenLogger
* @param \Adyen\Payment\Helper\Data $adyenHelper
* @param \Adyen\Payment\Model\Api\PaymentRequest $paymentRequest
*/
public function __construct(
\Magento\Framework\App\Action\Context $context,
\Adyen\Payment\Logger\AdyenLogger $adyenLogger,
\Adyen\Payment\Helper\Data $adyenHelper
\Adyen\Payment\Helper\Data $adyenHelper,
\Adyen\Payment\Model\Api\PaymentRequest $paymentRequest
) {
parent::__construct($context);
$this->_adyenLogger = $adyenLogger;
$this->_adyenHelper = $adyenHelper;
$this->_paymentRequest = $paymentRequest;
}
/**
......@@ -93,7 +101,17 @@ class Validate3d extends \Magento\Framework\App\Action\Action
$order->getPayment()->setAdditionalInformation('paResponse', $requestPaRes);
try {
$result = $order->getPayment()->getMethodInstance()->authorise3d($order->getPayment());
/**
* Magento should allow this.
* https://github.com/magento/magento2/issues/5819
*/
// $result = $order->getPayment()->getMethodInstance()->executeCommand(
// 'authorise_3d',
// ['payment' => $order->getPayment(), 'amount' => $order->getGrandTotal()]
// );
// old fashion way:
$result = $this->_authorise3d($order->getPayment());
} catch (\Exception $e) {
$this->_adyenLogger->addAdyenResult("Process 3D secure payment was refused");
$result = 'Refused';
......@@ -134,6 +152,24 @@ class Validate3d extends \Magento\Framework\App\Action\Action
}
}
/**
* Called by validate3d controller when cc payment has 3D secure
*
* @param $payment
* @return mixed
* @throws \Exception
*/
protected function _authorise3d($payment)
{
try {
$response = $this->_paymentRequest->authorise3d($payment);
} catch(\Exception $e) {
throw $e;
}
$responseCode = $response['resultCode'];
return $responseCode;
}
/**
* Get order object
*
......
<?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\Request;
use Magento\Payment\Gateway\Request\BuilderInterface;
/**
* Payment Data Builder
*/
class Authorize3DSecureDataBuilder implements BuilderInterface
{
/**
* @var \Adyen\Payment\Helper\Data
*/
private $adyenHelper;
/**
* PaymentDataBuilder constructor.
*
* @param \Adyen\Payment\Helper\Data $adyenHelper
*/
public function __construct(\Adyen\Payment\Helper\Data $adyenHelper)
{
$this->adyenHelper = $adyenHelper;
}
/**
* @param array $buildSubject
* @return array
*/
public function build(array $buildSubject)
{
/** @var \Magento\Payment\Gateway\Data\PaymentDataObject $paymentDataObject */
$paymentDataObject = \Magento\Payment\Gateway\Helper\SubjectReader::readPayment($buildSubject);
$payment = $paymentDataObject->getPayment();
$md = $payment->getAdditionalInformation('md');
$paResponse = $payment->getAdditionalInformation('paResponse');
return [
"md" => $md,
"paResponse" => $paResponse,
];
}
}
\ No newline at end of file
......@@ -20,22 +20,27 @@
*
* Author: Adyen <magento@adyen.com>
*/
namespace Adyen\Payment\Gateway\Request;
namespace Adyen\Payment\Gateway\Config;
use Magento\Payment\Gateway\Request\BuilderInterface;
/**
* Class Config
* Payment Data Builder
*/
class SepaConfig extends \Magento\Payment\Gateway\Config\Config
class BrowserInfoDataBuilder implements BuilderInterface
{
const KEY_ACTIVE = 'active';
/**
* Get Payment configuration status
* @return bool
* @param array $buildSubject
* @return array
*/
public function isActive()
public function build(array $buildSubject)
{
return (bool) $this->getValue(self::KEY_ACTIVE);
return [
'browserInfo' =>
[
'userAgent' => $_SERVER['HTTP_USER_AGENT'],
'acceptHeader' => $_SERVER['HTTP_ACCEPT']
]
];
}
}
\ No newline at end of file
<?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\Request;
use Magento\Payment\Gateway\Request\BuilderInterface;
class CcAuthorizationDataBuilder implements BuilderInterface
{
/**
* @var \Adyen\Payment\Helper\Data
*/
private $adyenHelper;
/**
* @var \Magento\Framework\App\State
*/
private $appState;
/**
* CcAuthorizationDataBuilder constructor.
*
* @param \Adyen\Payment\Helper\Data $adyenHelper
* @param \Magento\Framework\Model\Context $context
*/
public function __construct(
\Adyen\Payment\Helper\Data $adyenHelper,
\Magento\Framework\Model\Context $context
) {
$this->adyenHelper = $adyenHelper;
$this->appState = $context->getAppState();
}
/**
* @param array $buildSubject
* @return mixed
*/
public function build(array $buildSubject)
{
/** @var \Magento\Payment\Gateway\Data\PaymentDataObject $paymentDataObject */
$paymentDataObject = \Magento\Payment\Gateway\Helper\SubjectReader::readPayment($buildSubject);
$payment = $paymentDataObject->getPayment();
$order = $paymentDataObject->getOrder();
$storeId = $order->getStoreId();
$request = [];
if ($this->adyenHelper->getAdyenCcConfigDataFlag('cse_enabled', $storeId)) {
$request['additionalData']['card.encrypted.json'] =
$payment->getAdditionalInformation("encrypted_data");
} else {
$requestCreditCardDetails = [
"expiryMonth" => $payment->getCcExpMonth(),
"expiryYear" => $payment->getCcExpYear(),
"holderName" => $payment->getCcOwner(),
"number" => $payment->getCcNumber(),
"cvc" => $payment->getCcCid(),
];
$cardDetails['card'] = $requestCreditCardDetails;
$request = array_merge($request, $cardDetails);
}
/**
* if MOTO for backend is enabled use MOTO as shopper interaction type
*/
$enableMoto = $this->adyenHelper->getAdyenCcConfigDataFlag('enable_moto', $storeId);
if ($this->appState->getAreaCode() === \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE &&
$enableMoto) {
$request['shopperInteraction'] = "Moto";
}
// if installments is set add it into the request
if ($payment->getAdditionalInformation('number_of_installments') &&
$payment->getAdditionalInformation('number_of_installments') > 0) {
$request['installments']['value'] = $payment->getAdditionalInformation('number_of_installments');
}
return $request;
}
}
\ No newline at end of file
......@@ -48,13 +48,11 @@ class CustomerDataBuilder implements BuilderInterface
$order = $paymentDataObject->getOrder();
$billingAddress = $order->getBillingAddress();
$customerEmail = $billingAddress->getEmail();
$shopperIp = $order->getRemoteIp();
$realOrderId = $order->getOrderIncrementId();
$customerId = $order->getCustomerId();
$shopperReference = (!empty($customerId)) ? $customerId : self::GUEST_ID . $realOrderId;
return [
"shopperIP" => $shopperIp,
"shopperEmail" => $customerEmail,
"shopperReference" => $shopperReference
];
......
<?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\Request;
use Magento\Payment\Gateway\Request\BuilderInterface;
/**
* Class CustomerDataBuilder
*/
class CustomerIpDataBuilder implements BuilderInterface
{
/**
* @param array $buildSubject
* @return array
*/
public function build(array $buildSubject)
{
/** @var \Magento\Payment\Gateway\Data\PaymentDataObject $paymentDataObject */
$paymentDataObject = \Magento\Payment\Gateway\Helper\SubjectReader::readPayment($buildSubject);
$order = $paymentDataObject->getOrder();
return ['shopperIP' => $order->getRemoteIp()];
}
}
<?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\Request;
use Magento\Payment\Gateway\Request\BuilderInterface;
class OneclickAuthorizationBuilder implements BuilderInterface
{
/**
* @var \Adyen\Payment\Helper\Data
*/
private $adyenHelper;
/**
* CaptureDataBuilder constructor.
*
* @param \Adyen\Payment\Helper\Data $adyenHelper
*/
public function __construct(\Adyen\Payment\Helper\Data $adyenHelper)
{
$this->adyenHelper = $adyenHelper;
}
/**
* @param array $buildSubject
* @return mixed
*/
public function build(array $buildSubject)
{
$request = [];
/** @var \Magento\Payment\Gateway\Data\PaymentDataObject $paymentDataObject */
$paymentDataObject = \Magento\Payment\Gateway\Helper\SubjectReader::readPayment($buildSubject);
$payment = $paymentDataObject->getPayment();
$recurringDetailReference = $payment->getAdditionalInformation("recurring_detail_reference");
if ($payment->getAdditionalInformation('customer_interaction')) {
$shopperInteraction = "Ecommerce";
} else {
$shopperInteraction = "ContAuth";
}
$request['selectedRecurringDetailReference'] = $recurringDetailReference;
$request['shopperInteraction'] = $shopperInteraction;
/*
* For recurring Ideal and Sofort needs to be converted to SEPA
* for this it is mandatory to set selectBrand to sepadirectdebit
*/
if (!$payment->getAdditionalInformation('customer_interaction')) {
if ($payment->getCcType() == "directEbanking" || $payment->getCcType() == "ideal") {
$request['selectedBrand'] = "sepadirectdebit";
}
}
return $request;
}
}
\ No newline at end of file
......@@ -57,16 +57,13 @@ class PaymentDataBuilder implements BuilderInterface
$orderCurrencyCode = $order->getCurrencyCode();
$amount = $order->getGrandTotalAmount();
$browserInfo = ['userAgent' => $_SERVER['HTTP_USER_AGENT'], 'acceptHeader' => $_SERVER['HTTP_ACCEPT']];
$amount = ['currency' => $orderCurrencyCode,
'value' => $this->adyenHelper->formatAmount($amount, $orderCurrencyCode)];
return [
"amount" => $amount,
"reference" => $order->getOrderIncrementId(),
"fraudOffset" => "0",
"browserInfo" => $browserInfo
"fraudOffset" => "0"
];
}
}
\ No newline at end of file
......@@ -73,7 +73,7 @@ class RecurringDataBuilder implements BuilderInterface
// set the recurring type
$recurringContractType = null;
if ($recurringType) {
if ($paymentMethodCode == \Adyen\Payment\Model\Method\Oneclick::METHOD_CODE) {
if ($paymentMethodCode == \Adyen\Payment\Model\Ui\AdyenOneclickConfigProvider::CODE) {
/*
* For ONECLICK look at the recurringPaymentType that the merchant
* has selected in Adyen ONECLICK settings
......@@ -83,7 +83,7 @@ class RecurringDataBuilder implements BuilderInterface
} else {
$recurringContractType = \Adyen\Payment\Model\RecurringType::RECURRING;
}
} else if ($paymentMethodCode == \Adyen\Payment\Model\Method\Cc::METHOD_CODE) {
} else if ($paymentMethodCode == \Adyen\Payment\Model\Ui\AdyenCcConfigProvider::CODE) {
if ($payment->getAdditionalInformation("store_cc") == "" &&
($recurringType == "ONECLICK,RECURRING" || $recurringType == "RECURRING")) {
$recurringContractType = \Adyen\Payment\Model\RecurringType::RECURRING;
......
......@@ -36,6 +36,7 @@ class SepaAuthorizationBuilder implements BuilderInterface
/** @var \Magento\Payment\Gateway\Data\PaymentDataObject $paymentDataObject */
$paymentDataObject = \Magento\Payment\Gateway\Helper\SubjectReader::readPayment($buildSubject);
$payment = $paymentDataObject->getPayment();
$request = [];
// set brand to sepa
$request['selectedBrand'] = "sepadirectdebit";
......
......@@ -43,8 +43,14 @@ class PaymentCommentHistoryHandler implements HandlerInterface
if (isset($response['resultCode'])) {
$responseCode = $response['resultCode'];
} else {
// try to get response from response key (used for modifications
if (isset($response['response'])) {
$responseCode = $response['response'];
} else {
$responseCode = "";
}
}
if (isset($response['pspReference'])) {
$pspReference = $response['pspReference'];
......
......@@ -27,6 +27,24 @@ use Magento\Payment\Gateway\Validator\AbstractValidator;
class GeneralResponseValidator extends AbstractValidator
{
/**
* @var Psr\Log\LoggerInterface
*/
private $logger;
/**
* GeneralResponseValidator constructor.
* @param ResultInterfaceFactory $resultFactory
* @param \Psr\Log\LoggerInterface $loggerInterface
*/
public function __construct(
\Magento\Payment\Gateway\Validator\ResultInterfaceFactory $resultFactory,
\Psr\Log\LoggerInterface $loggerInterface
) {
$this->logger = $loggerInterface;
parent::__construct($resultFactory);
}
/**
* @param array $validationSubject
* @return \Magento\Payment\Gateway\Validator\ResultInterface
......@@ -37,6 +55,7 @@ class GeneralResponseValidator extends AbstractValidator
$paymentDataObjectInterface = \Magento\Payment\Gateway\Helper\SubjectReader::readPayment($validationSubject);
$payment = $paymentDataObjectInterface->getPayment();
$payment->setAdditionalInformation('3dActive', false);
$isValid = true;
$errorMessages = [];
......@@ -46,20 +65,73 @@ class GeneralResponseValidator extends AbstractValidator
case "Authorised":
$payment->setAdditionalInformation('pspReference', $response['pspReference']);
break;
case "RedirectShopper":
$payment->setAdditionalInformation('3dActive', true);
$payment->setAdditionalInformation('pspReference', $response['pspReference']);
$issuerUrl = $response['issuerUrl'];
$paReq = $response['paRequest'];
$md = $response['md'];
if (!empty($paReq) && !empty($md) && !empty($issuerUrl)) {
$payment->setAdditionalInformation('issuerUrl', $response['issuerUrl']);
$payment->setAdditionalInformation('paRequest', $response['paRequest']);
$payment->setAdditionalInformation('md', $response['md']);
} else {
$isValid = false;
$errorMsg = __('3D secure is not valid.');
$this->logger->error($errorMsg);;
$errorMessages[] = $errorMsg;
}
break;
case "Refused":
$isValid = false;
if ($response['refusalReason']) {
$refusalReason = $response['refusalReason'];
switch($refusalReason) {
case "Transaction Not Permitted":
$errorMsg = __('The transaction is not permitted.');
break;
case "CVC Declined":
$errorMsg = __('Declined due to the Card Security Code(CVC) being incorrect. Please check your CVC code!');
break;
case "Restricted Card":
$errorMsg = __('The card is restricted.');
break;
case "803 PaymentDetail not found":
$errorMsg = __('The payment is REFUSED because the saved card is removed. Please try an other payment method.');
break;
case "Expiry month not set":
$errorMsg = __('The expiry month is not set. Please check your expiry month!');
break;
default:
$errorMsg = __('The payment is REFUSED.');
$this->_logger->critical($errorMsg);
$errorMessages[] = $errorMsg;
break;
}
} else {
$errorMsg = __('The payment is REFUSED.');
}
// exeption is to general
// $this->logger->critical($errorMsg);
// $errorMessages[] = $errorMsg;
// this will result the specific error
throw new \Magento\Framework\Exception\LocalizedException(__($errorMsg));
break;
default:
$isValid = false;
$errorMsg = __('Error with payment method please select different payment method.');
$this->_logger->critical($errorMsg);
$this->logger->critical($errorMsg);
$errorMessages[] = $errorMsg;
break;
}
} else {
$errorMsg = __('Error with payment method please select different payment method.');
$this->_logger->critical($errorMsg);
$this->logger->critical($errorMsg);
$errorMessages[] = $errorMsg;
}
......
......@@ -139,9 +139,11 @@ class PaymentMethods extends AbstractHelper
{
$paymentMethods = [];
$ccEnabled = $this->_config->getValue('payment/'.\Adyen\Payment\Model\Method\Cc::METHOD_CODE.'/active');
$ccEnabled = $this->_config->getValue('payment/'.\Adyen\Payment\Model\Ui\AdyenCcConfigProvider::CODE.'/active');
$ccTypes = array_keys($this->_adyenHelper->getCcTypesAltData());
$sepaEnabled = $this->_config->getValue('payment/'.\Adyen\Payment\Model\Method\Sepa::METHOD_CODE.'/active');
$sepaEnabled = $this->_config->getValue(
'payment/'.\Adyen\Payment\Model\Ui\AdyenSepaConfigProvider::CODE.'/active'
);
foreach ($this->_fetchHppMethods($store, $country) as $methodCode => $methodData) {
/*
......@@ -162,6 +164,7 @@ class PaymentMethods extends AbstractHelper
/**
* @param $store
* @param $country
* @return array
*/
protected function _fetchHppMethods($store, $country)
......@@ -240,6 +243,7 @@ class PaymentMethods extends AbstractHelper
return 10;
}
/**
* @param $store
* @return mixed
......
......@@ -47,11 +47,8 @@ class AdyenGenericConfigProvider implements ConfigProviderInterface
* @var string[]
*/
protected $_methodCodes = [
\Adyen\Payment\Model\Method\Cc::METHOD_CODE,
\Adyen\Payment\Model\Method\Hpp::METHOD_CODE,
\Adyen\Payment\Model\Method\Oneclick::METHOD_CODE,
\Adyen\Payment\Model\Method\Pos::METHOD_CODE,
// \Adyen\Payment\Model\Method\Sepa::METHOD_CODE,
\Adyen\Payment\Model\Method\Boleto::METHOD_CODE
];
......
......@@ -151,27 +151,8 @@ class PaymentRequest extends DataObject
// set the recurring type
$recurringContractType = null;
if ($recurringType) {
if ($paymentMethodCode == \Adyen\Payment\Model\Method\Oneclick::METHOD_CODE) {
/*
* For ONECLICK look at the recurringPaymentType that the merchant
* has selected in Adyen ONECLICK settings
*/
if ($payment->getAdditionalInformation('customer_interaction')) {
$recurringContractType = \Adyen\Payment\Model\RecurringType::ONECLICK;
} else {
$recurringContractType = \Adyen\Payment\Model\RecurringType::RECURRING;
}
} else if ($paymentMethodCode == \Adyen\Payment\Model\Method\Cc::METHOD_CODE) {
if ($payment->getAdditionalInformation("store_cc") == "" &&
($recurringType == "ONECLICK,RECURRING" || $recurringType == "RECURRING")) {
$recurringContractType = \Adyen\Payment\Model\RecurringType::RECURRING;
} elseif ($payment->getAdditionalInformation("store_cc") == "1") {
$recurringContractType = $recurringType;
}
} else {
$recurringContractType = $recurringType;
}
}
if ($recurringContractType) {
$recurring = ['contract' => $recurringContractType];
......@@ -225,31 +206,8 @@ class PaymentRequest extends DataObject
$recurringDetailReference = null;
// define the shopper interaction
if ($this->_appState->getAreaCode() === \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE &&
$paymentMethodCode == \Adyen\Payment\Model\Method\Cc::METHOD_CODE &&
$enableMoto) {
// if MOTO for backend is enabled use MOTO as shopper interaction type
$shopperInteraction = "Moto";
} else if ($paymentMethodCode == \Adyen\Payment\Model\Method\Oneclick::METHOD_CODE) {
$recurringDetailReference = $payment->getAdditionalInformation("recurring_detail_reference");
if ($payment->getAdditionalInformation('customer_interaction')) {
$shopperInteraction = "Ecommerce";
} else {
$shopperInteraction = "ContAuth";
}
/*
* For recurring Ideal and Sofort needs to be converted to SEPA
* for this it is mandatory to set selectBrand to sepadirectdebit
*/
if (!$payment->getAdditionalInformation('customer_interaction')) {
if ($payment->getCcType() == "directEbanking" || $payment->getCcType() == "ideal") {
$request['selectedBrand'] = "sepadirectdebit";
}
}
} else {
$shopperInteraction = "Ecommerce";
}
if ($shopperInteraction) {
$request['shopperInteraction'] = $shopperInteraction;
......@@ -264,43 +222,7 @@ class PaymentRequest extends DataObject
$request['selectedBrand'] = "sepadirectdebit";
}
if ($paymentMethodCode == \Adyen\Payment\Model\Method\Cc::METHOD_CODE ||
$paymentMethodCode == \Adyen\Payment\Model\Method\Oneclick::METHOD_CODE) {
// If cse is enabled add encrypted card date into request
if ($this->_adyenHelper->getAdyenCcConfigDataFlag('cse_enabled', $storeId)) {
$request['additionalData']['card.encrypted.json'] =
$payment->getAdditionalInformation("encrypted_data");
} else {
$requestCreditCardDetails = [
"expiryMonth" => $payment->getCcExpMonth(),
"expiryYear" => $payment->getCcExpYear(),
"holderName" => $payment->getCcOwner(),
"number" => $payment->getCcNumber(),
"cvc" => $payment->getCcCid(),
];
$cardDetails['card'] = $requestCreditCardDetails;
$request = array_merge($request, $cardDetails);
}
// if installments is set add it into the request
if ($payment->getAdditionalInformation('number_of_installments') &&
$payment->getAdditionalInformation('number_of_installments') > 0) {
$request['installments']['value'] = $payment->getAdditionalInformation('number_of_installments');
}
} elseif ($paymentMethodCode == \Adyen\Payment\Model\Method\Sepa::METHOD_CODE) {
// set brand to sepa
$request['selectedBrand'] = "sepadirectdebit";
// add bankDetails into request
$bankAccount = [
'iban' => $payment->getAdditionalInformation("iban"),
'ownerName' => $payment->getAdditionalInformation("account_name"),
'countryCode' => $payment->getAdditionalInformation("country")
];
$request['bankAccount'] = $bankAccount;
} elseif ($paymentMethodCode == \Adyen\Payment\Model\Method\Boleto::METHOD_CODE) {
if ($paymentMethodCode == \Adyen\Payment\Model\Method\Boleto::METHOD_CODE) {
$request['socialSecurityNumber'] = $payment->getAdditionalInformation("social_security_number");
......
This diff is collapsed.
......@@ -331,7 +331,11 @@ class Pos extends \Magento\Payment\Model\Method\AbstractMethod implements Gatewa
"&currency=".$currencyCode."&merchantReference=".$merchantReference. $recurringParams .
$receiptOrderLines . "&callback=".$callbackUrl . $extraParamaters;
$this->_adyenLogger->debug(print_r($launchlink, true));
// cash not working see ticket
// https://youtrack.is.adyen.com/issue/IOS-130#comment=102-20285
// . "&transactionType=CASH";
$this->_adyenLogger->addAdyenDebug(print_r($launchlink, true));
return $launchlink;
}
......
......@@ -21,21 +21,17 @@
* Author: Adyen <magento@adyen.com>
*/
namespace Adyen\Payment\Model;
namespace Adyen\Payment\Model\Ui;
use Magento\Payment\Model\CcGenericConfigProvider;
use Magento\Checkout\Model\ConfigProviderInterface;
use Magento\Payment\Helper\Data as PaymentHelper;
use Magento\Framework\View\Asset\Source as Source;
use \Magento\Payment\Gateway\Config\Config as Config;
class AdyenCcConfigProvider extends CcGenericConfigProvider
class AdyenCcConfigProvider implements ConfigProviderInterface
{
/**
* @var string[]
*/
protected $_methodCodes = [
\Adyen\Payment\Model\Method\Cc::METHOD_CODE
];
const CODE = 'adyen_cc';
/**
* @var PaymentHelper
......@@ -52,24 +48,49 @@ class AdyenCcConfigProvider extends CcGenericConfigProvider
*/
protected $_assetSource;
/**
* Request object
*
* @var \Magento\Framework\App\RequestInterface
*/
protected $_request;
/**
* @var \Magento\Framework\UrlInterface
*/
protected $_urlBuilder;
/**
* @var \Magento\Payment\Model\CcConfig
*/
private $ccConfig;
/**
* AdyenCcConfigProvider constructor.
*
* @param \Magento\Payment\Model\CcConfig $ccConfig
* @param PaymentHelper $paymentHelper
* @param \Adyen\Payment\Helper\Data $adyenHelper
* @param \Magento\Framework\App\RequestInterface $request
* @param \Magento\Framework\UrlInterface $urlBuilder
* @param Source $assetSource
* @param \Magento\Payment\Model\CcConfig $ccConfig
* @param Config $config
*/
public function __construct(
\Magento\Payment\Model\CcConfig $ccConfig,
PaymentHelper $paymentHelper,
\Adyen\Payment\Helper\Data $adyenHelper,
Source $assetSource
\Magento\Framework\App\RequestInterface $request,
\Magento\Framework\UrlInterface $urlBuilder,
Source $assetSource,
\Magento\Payment\Model\CcConfig $ccConfig
) {
parent::__construct($ccConfig, $paymentHelper, $this->_methodCodes);
$this->_paymentHelper = $paymentHelper;
$this->_adyenHelper = $adyenHelper;
$this->_request = $request;
$this->_urlBuilder = $urlBuilder;
$this->_assetSource = $assetSource;
$this->ccConfig = $ccConfig;
}
/**
......@@ -77,10 +98,30 @@ class AdyenCcConfigProvider extends CcGenericConfigProvider
*/
public function getConfig()
{
$config = parent::getConfig();
// set to active
$config = [
'payment' => [
self::CODE => [
'isActive' => true,
'redirectUrl' => $this->_urlBuilder->getUrl(
'adyen/process/validate3d/', ['_secure' => $this->_getRequest()->isSecure()])
]
]
];
$methodCode = self::CODE;
foreach ($this->_methodCodes as $code) {
if ($this->methods[$code]->isAvailable()) {
$config = array_merge_recursive($config, [
'payment' => [
'ccform' => [
'availableTypes' => [$methodCode => $this->getCcAvailableTypes($methodCode)],
'months' => [$methodCode => $this->getCcMonths()],
'years' => [$methodCode => $this->getCcYears()],
'hasVerification' => [$methodCode => $this->hasVerification($methodCode)],
'cvvImageUrl' => [$methodCode => $this->getCvvImageUrl()]
]
]
]);
$demoMode = $this->_adyenHelper->getAdyenAbstractConfigDataFlag('demo_mode');
......@@ -117,8 +158,6 @@ class AdyenCcConfigProvider extends CcGenericConfigProvider
} else {
$config['payment']['adyenCc']['installments'] = [];
}
}
}
return $config;
}
......@@ -133,7 +172,7 @@ class AdyenCcConfigProvider extends CcGenericConfigProvider
{
$types = [];
$ccTypes = $this->_adyenHelper->getAdyenCcTypes();
$availableTypes = $this->methods[$methodCode]->getConfigData('cctypes');
$availableTypes = $this->_adyenHelper->getAdyenCcConfigData('cctypes');
if ($availableTypes) {
$availableTypes = explode(',', $availableTypes);
foreach (array_keys($ccTypes) as $code) {
......@@ -171,4 +210,55 @@ class AdyenCcConfigProvider extends CcGenericConfigProvider
}
return $icons;
}
/**
* Retrieve credit card expire months
*
* @return array
*/
protected function getCcMonths()
{
return $this->ccConfig->getCcMonths();
}
/**
* Retrieve credit card expire years
*
* @return array
*/
protected function getCcYears()
{
return $this->ccConfig->getCcYears();
}
/**
* Has verification is always true
*
* @return bool
*/
protected function hasVerification()
{
return $this->_adyenHelper->getAdyenCcConfigData('useccv');
}
/**
* Retrieve CVV tooltip image url
*
* @return string
*/
protected function getCvvImageUrl()
{
return $this->ccConfig->getCvvImageUrl();
}
/**
* Retrieve request object
*
* @return \Magento\Framework\App\RequestInterface
*/
protected function _getRequest()
{
return $this->_request;
}
}
\ No newline at end of file
......@@ -21,40 +21,31 @@
* Author: Adyen <magento@adyen.com>
*/
namespace Adyen\Payment\Model;
namespace Adyen\Payment\Model\Ui;
use Magento\Payment\Model\CcGenericConfigProvider;
use Magento\Checkout\Model\ConfigProviderInterface;
use Magento\Payment\Helper\Data as PaymentHelper;
class AdyenOneclickConfigProvider extends CcGenericConfigProvider
class AdyenOneclickConfigProvider implements ConfigProviderInterface
{
const CODE = 'adyen_oneclick';
/**
* @var Config
*/
protected $config;
/**
* @var string[]
*/
protected $_methodCodes = [
\Adyen\Payment\Model\Method\Oneclick::METHOD_CODE
];
/**
* @var \Magento\Payment\Model\Method\AbstractMethod[]
*/
protected $methods = [];
/**
* @var PaymentHelper
* @var \Adyen\Payment\Helper\Data
*/
protected $_paymentHelper;
protected $_adyenHelper;
/**
* @var \Adyen\Payment\Helper\Data
* @var \Magento\Framework\App\RequestInterface
*/
protected $_adyenHelper;
protected $_request;
/**
* @var \Magento\Customer\Model\Session
......@@ -67,42 +58,46 @@ class AdyenOneclickConfigProvider extends CcGenericConfigProvider
protected $_session;
/**
* @var \Magento\Framework\App\State
* @var \Magento\Store\Model\StoreManagerInterface
*/
protected $_appState;
protected $_storeManager;
/**
* @var \Magento\Store\Model\StoreManagerInterface
* @var \Magento\Framework\UrlInterface
*/
protected $_storeManager;
protected $_urlBuilder;
/**
* @var \Magento\Payment\Model\CcConfig
*/
private $ccConfig;
/**
* AdyenOneclickConfigProvider constructor.
*
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Payment\Model\CcConfig $ccConfig
* @param PaymentHelper $paymentHelper
* @param \Adyen\Payment\Helper\Data $adyenHelper
* @param \Magento\Framework\App\RequestInterface $request
* @param \Magento\Customer\Model\Session $customerSession
* @param \Magento\Checkout\Model\Session $session
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\UrlInterface $urlBuilder
*/
public function __construct(
\Magento\Framework\Model\Context $context,
\Magento\Payment\Model\CcConfig $ccConfig,
PaymentHelper $paymentHelper,
\Adyen\Payment\Helper\Data $adyenHelper,
\Magento\Framework\App\RequestInterface $request,
\Magento\Customer\Model\Session $customerSession,
\Magento\Checkout\Model\Session $session,
\Magento\Store\Model\StoreManagerInterface $storeManager
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Framework\UrlInterface $urlBuilder,
\Magento\Payment\Model\CcConfig $ccConfig
) {
parent::__construct($ccConfig, $paymentHelper, $this->_methodCodes);
$this->_paymentHelper = $paymentHelper;
$this->_adyenHelper = $adyenHelper;
$this->_request = $request;
$this->_customerSession = $customerSession;
$this->_session = $session;
$this->_appState = $context->getAppState();
$this->_storeManager = $storeManager;
$this->_urlBuilder = $urlBuilder;
$this->ccConfig = $ccConfig;
}
/**
......@@ -110,7 +105,30 @@ class AdyenOneclickConfigProvider extends CcGenericConfigProvider
*/
public function getConfig()
{
$config = parent::getConfig();
// set to active
$config = [
'payment' => [
self::CODE => [
'isActive' => true,
'redirectUrl' => $this->_urlBuilder->getUrl(
'adyen/process/validate3d/', ['_secure' => $this->_getRequest()->isSecure()])
]
]
];
$methodCode = self::CODE;
$config = array_merge_recursive($config, [
'payment' => [
'ccform' => [
'availableTypes' => [$methodCode => $this->getCcAvailableTypes($methodCode)],
'months' => [$methodCode => $this->getCcMonths()],
'years' => [$methodCode => $this->getCcYears()],
'hasVerification' => [$methodCode => $this->hasVerification($methodCode)],
'cvvImageUrl' => [$methodCode => $this->getCvvImageUrl()]
]
]
]);
$demoMode = $this->_adyenHelper->getAdyenAbstractConfigDataFlag('demo_mode');
......@@ -134,9 +152,6 @@ class AdyenOneclickConfigProvider extends CcGenericConfigProvider
$config['payment']['adyenOneclick']['generationTime'] = date("c");
$config['payment']['adyenOneclick']['canCreateBillingAgreement'] = $canCreateBillingAgreement;
foreach ($this->_methodCodes as $code) {
if ($this->methods[$code]->isAvailable()) {
$recurringContractType = $this->_getRecurringContractType();
$config['payment'] ['adyenOneclick']['billingAgreements'] = $this->getAdyenOneclickPaymentMethods();
......@@ -145,8 +160,7 @@ class AdyenOneclickConfigProvider extends CcGenericConfigProvider
} else {
$config['payment'] ['adyenOneclick']['hasCustomerInteraction'] = false;
}
}
}
return $config;
}
......@@ -163,7 +177,12 @@ class AdyenOneclickConfigProvider extends CcGenericConfigProvider
$grandTotal = $this->_getQuote()->getGrandTotal();
$recurringType = $this->_getRecurringContractType();
$billingAgreements = $this->_adyenHelper->getOneClickPaymentMethods($customerId, $storeId, $grandTotal, $recurringType);
$billingAgreements = $this->_adyenHelper->getOneClickPaymentMethods(
$customerId,
$storeId,
$grandTotal,
$recurringType
);
}
return $billingAgreements;
}
......@@ -183,4 +202,80 @@ class AdyenOneclickConfigProvider extends CcGenericConfigProvider
{
return $this->_session->getQuote();
}
/**
* Retrieve availables credit card types
*
* @param string $methodCode
* @return array
*/
protected function getCcAvailableTypes($methodCode)
{
$types = [];
$ccTypes = $this->_adyenHelper->getAdyenCcTypes();
$availableTypes = $this->_adyenHelper->getAdyenCcConfigData('cctypes');
if ($availableTypes) {
$availableTypes = explode(',', $availableTypes);
foreach (array_keys($ccTypes) as $code) {
if (in_array($code, $availableTypes)) {
$types[$code] = $ccTypes[$code]['name'];
}
}
}
return $types;
}
/**
* Retrieve credit card expire months
*
* @return array
*/
protected function getCcMonths()
{
return $this->ccConfig->getCcMonths();
}
/**
* Retrieve credit card expire years
*
* @return array
*/
protected function getCcYears()
{
return $this->ccConfig->getCcYears();
}
/**
* Has verification is always true
*
* @return bool
*/
protected function hasVerification()
{
return $this->_adyenHelper->getAdyenCcConfigData('useccv');
}
/**
* Retrieve CVV tooltip image url
*
* @return string
*/
protected function getCvvImageUrl()
{
return $this->ccConfig->getCvvImageUrl();
}
/**
* Retrieve request object
*
* @return \Magento\Framework\App\RequestInterface
*/
protected function _getRequest()
{
return $this->_request;
}
}
\ No newline at end of file
<?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\Observer;
use Magento\Framework\Event\Observer;
use Magento\Payment\Observer\AbstractDataAssignObserver;
use Magento\Quote\Api\Data\PaymentInterface;
/**
* Class DataAssignObserver
*/
class AdyenCcDataAssignObserver extends AbstractDataAssignObserver
{
const CC_TYPE = 'cc_type';
const ENCRYPTED_DATA = 'encrypted_data';
const NUMBER_OF_INSTALLMENTS = 'number_of_installments';
const STORE_CC = 'store_cc';
/**
* @var array
*/
protected $additionalInformationList = [
self::CC_TYPE,
self::ENCRYPTED_DATA,
self::NUMBER_OF_INSTALLMENTS,
self::STORE_CC
];
/**
* @param Observer $observer
* @return void
*/
public function execute(Observer $observer)
{
$data = $this->readDataArgument($observer);
$additionalData = $data->getData(PaymentInterface::KEY_ADDITIONAL_DATA);
if (!is_array($additionalData)) {
return;
}
$paymentInfo = $this->readPaymentModelArgument($observer);
// set ccType
$paymentInfo->setCcType($additionalData['cc_type']);
foreach ($this->additionalInformationList as $additionalInformationKey) {
if (isset($additionalData[$additionalInformationKey])) {
$paymentInfo->setAdditionalInformation(
$additionalInformationKey,
$additionalData[$additionalInformationKey]
);
}
}
}
}
......@@ -20,87 +20,95 @@
*
* Author: Adyen <magento@adyen.com>
*/
namespace Adyen\Payment\Observer;
namespace Adyen\Payment\Model\Method;
use Magento\Framework\Webapi\Exception;
use Magento\Framework\Event\Observer;
use Magento\Payment\Observer\AbstractDataAssignObserver;
use Magento\Quote\Api\Data\PaymentInterface;
/**
* Adyen CreditCard payment method
* @SuppressWarnings(PHPMD.ExcessivePublicCount)
* @SuppressWarnings(PHPMD.TooManyFields)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* Class DataAssignObserver
*/
class Oneclick extends \Adyen\Payment\Model\Method\Cc
class AdyenOneclickDataAssignObserver extends AbstractDataAssignObserver
{
const METHOD_CODE = 'adyen_oneclick';
const RECURRING_DETAIL_REFERENCE = 'recurring_detail_reference';
const ENCRYPTED_DATA = 'encrypted_data';
const NUMBER_OF_INSTALLMENTS = 'number_of_installments';
/**
* @var string
* @var array
*/
protected $_code = self::METHOD_CODE;
protected $additionalInformationList = [
self::RECURRING_DETAIL_REFERENCE,
self::ENCRYPTED_DATA,
self::NUMBER_OF_INSTALLMENTS
];
/**
* @var string
* @var \Adyen\Payment\Helper\Data
*/
protected $_formBlockType = 'Adyen\Payment\Block\Form\Oneclick';
private $adyenHelper;
/**
* @var string
* @var \Magento\Framework\App\State
*/
protected $_infoBlockType = 'Adyen\Payment\Block\Info\Oneclick';
private $appState;
/**
* Assign data to info model instance
*
* @param \Magento\Framework\DataObject|mixed $data
* @return $this
* @throws \Magento\Framework\Exception\LocalizedException
* AdyenCcDataAssignObserver constructor.
* @param \Adyen\Payment\Helper\Data $adyenHelper
*/
public function assignData(\Magento\Framework\DataObject $data)
{
public function __construct(
\Adyen\Payment\Helper\Data $adyenHelper,
\Magento\Framework\Model\Context $context
) {
$this->adyenHelper = $adyenHelper;
$this->appState = $context->getAppState();
if (!$data instanceof \Magento\Framework\DataObject) {
$data = new \Magento\Framework\DataObject($data);
}
$additionalData = $data->getAdditionalData();
$infoInstance = $this->getInfoInstance();
// get from variant magento code for creditcard type and set this in ccType
$variant = $additionalData['variant'];
$ccType = $this->_adyenHelper->getMagentoCreditCartType($variant);
$infoInstance->setCcType($ccType);
/**
* @param Observer $observer
* @return void
*/
public function execute(Observer $observer)
{
$data = $this->readDataArgument($observer);
// save value remember details checkbox
$infoInstance->setAdditionalInformation('recurring_detail_reference',
$additionalData['recurring_detail_reference']);
$additionalData = $data->getData(PaymentInterface::KEY_ADDITIONAL_DATA);
if (!is_array($additionalData)) {
return;
}
$recurringPaymentType = $this->getRecurringPaymentType();
if ($recurringPaymentType == \Adyen\Payment\Model\RecurringType::ONECLICK) {
$customerInteraction = true;
$paymentInfo = $this->readPaymentModelArgument($observer);
// retrieve cse key
if ($this->_adyenHelper->getAdyenCcConfigDataFlag('cse_enabled')) {
if (isset($additionalData['encrypted_data'])) {
$infoInstance->setAdditionalInformation('encrypted_data', $additionalData['encrypted_data']);
} else {
throw new \Magento\Framework\Exception\LocalizedException(__('Card encryption failed'));
// set ccType
$variant = $additionalData['variant'];
$ccType = $this->adyenHelper->getMagentoCreditCartType($variant);
$paymentInfo->setCcType($ccType);
foreach ($this->additionalInformationList as $additionalInformationKey) {
if (isset($additionalData[$additionalInformationKey])) {
$paymentInfo->setAdditionalInformation(
$additionalInformationKey,
$additionalData[$additionalInformationKey]
);
}
}
// set customerInteraction
$recurringContractType = $this->getRecurringPaymentType();
if ($recurringContractType == \Adyen\Payment\Model\RecurringType::ONECLICK) {
$paymentInfo->setAdditionalInformation('customer_interaction', true);
} else {
$customerInteraction = false;
$paymentInfo->setAdditionalInformation('customer_interaction', false);
}
$infoInstance->setAdditionalInformation('customer_interaction', $customerInteraction);
// set number of installements
if (isset($additionalData['number_of_installments'])) {
$infoInstance->setAdditionalInformation('number_of_installments',
$additionalData['number_of_installments']);
}
// set ccType
$variant = $additionalData['variant'];
$ccType = $this->adyenHelper->getMagentoCreditCartType($variant);
$paymentInfo->setAdditionalInformation('cc_type', $ccType);
return $this;
}
/**
......@@ -112,33 +120,10 @@ class Oneclick extends \Adyen\Payment\Model\Method\Cc
public function getRecurringPaymentType()
{
// For admin always use Recurring
if ($this->_appState->getAreaCode() === \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) {
if ($this->appState->getAreaCode() === \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) {
return \Adyen\Payment\Model\RecurringType::RECURRING;
} else {
return $this->_adyenHelper->getAdyenOneclickConfigData('recurring_payment_type');
}
}
/**
* @param \Adyen\Payment\Model\Billing\Agreement $agreement
* @return $this
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function updateBillingAgreementStatus(\Adyen\Payment\Model\Billing\Agreement $agreement)
{
$targetStatus = $agreement->getStatus();
if ($targetStatus == \Magento\Paypal\Model\Billing\Agreement::STATUS_CANCELED) {
try {
$this->_paymentRequest->disableRecurringContract(
$agreement->getReferenceId(),
$agreement->getCustomerReference(),
$agreement->getStoreId()
);
} catch(Exception $e) {
throw new \Magento\Framework\Exception\LocalizedException(__('Failed to disable this contract'));
}
return $this->adyenHelper->getAdyenOneclickConfigData('recurring_payment_type');
}
return $this;
}
}
......@@ -38,7 +38,7 @@
</adyen_abstract>
<adyen_cc>
<active>1</active>
<model>Adyen\Payment\Model\Method\Cc</model>
<model>AdyenPaymentCcFacade</model>
<title>Adyen CreditCard</title>
<allowspecific>0</allowspecific>
<sort_order>2</sort_order>
......@@ -47,17 +47,43 @@
<cse_enabled>1</cse_enabled>
<enable_moto>0</enable_moto>
<payment_action>authorize</payment_action>
<is_gateway>1</is_gateway>
<can_use_checkout>1</can_use_checkout>
<can_authorize>1</can_authorize>
<can_authorize_3d>1</can_authorize_3d>
<can_capture>1</can_capture>
<can_capture_partial>1</can_capture_partial>
<can_use_internal>1</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_cc>
<adyen_oneclick>
<active>1</active>
<model>Adyen\Payment\Model\Method\Oneclick</model>
<model>AdyenPaymentOneclickFacade</model>
<title>Adyen OneClick</title>
<allowspecific>0</allowspecific>
<sort_order>1</sort_order>
<cctypes>AE,VI,MC,DI</cctypes> <!-- important to show the payment method isAvailabe()-->
<recurring_payment_type>ONECLICK</recurring_payment_type>
<payment_action>authorize</payment_action>
<useccv>1</useccv>
<cse_enabled>1</cse_enabled>
<enable_moto>0</enable_moto>
<payment_action>authorize</payment_action>
<is_gateway>1</is_gateway>
<can_use_checkout>1</can_use_checkout>
<can_authorize>1</can_authorize>
<can_authorize_3d>1</can_authorize_3d>
<can_capture>1</can_capture>
<can_capture_partial>1</can_capture_partial>
<can_use_internal>1</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_oneclick>
<adyen_hpp>
......@@ -77,7 +103,7 @@
</adyen_hpp>
<adyen_sepa>
<active>0</active>
<model>AdyenSepaFacade</model>
<model>AdyenPaymentSepaFacade</model>
<title>Sepa Direct Debit</title>
<allowspecific>0</allowspecific>
<sort_order>4</sort_order>
......
This diff is collapsed.
......@@ -23,6 +23,12 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<event name="payment_method_assign_data_adyen_cc">
<observer name="adyen_cc_gateway_data_assign" instance="Adyen\Payment\Observer\AdyenCcDataAssignObserver" />
</event>
<event name="payment_method_assign_data_adyen_oneclick">
<observer name="adyen_cc_gateway_data_assign" instance="Adyen\Payment\Observer\AdyenOneclickDataAssignObserver" />
</event>
<event name="payment_method_assign_data_adyen_sepa">
<observer name="adyen_sepa_gateway_data_assign" instance="Adyen\Payment\Observer\AdyenSepaDataAssignObserver" />
</event>
......
......@@ -28,8 +28,8 @@
<arguments>
<argument name="configProviders" xsi:type="array">
<item name="adyen_generic_config_provider" xsi:type="object">Adyen\Payment\Model\AdyenGenericConfigProvider</item>
<item name="adyen_cc_config_provider" xsi:type="object">Adyen\Payment\Model\AdyenCcConfigProvider</item>
<item name="adyen_oneclick_config_provider" xsi:type="object">Adyen\Payment\Model\AdyenOneclickConfigProvider</item>
<item name="adyen_cc_config_provider" xsi:type="object">Adyen\Payment\Model\Ui\AdyenCcConfigProvider</item>
<item name="adyen_oneclick_config_provider" xsi:type="object">Adyen\Payment\Model\Ui\AdyenOneclickConfigProvider</item>
<item name="adyen_hpp_config_provider" xsi:type="object">Adyen\Payment\Model\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\AdyenBoletoConfigProvider</item>
......
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