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 9063aa5a authored by Rik ter Beek's avatar Rik ter Beek Committed by GitHub

Merge pull request #109 from Adyen/develop

Merge 'develop' into master
parents 2e4de85c 7a7741c9
...@@ -27,10 +27,6 @@ use Symfony\Component\Config\Definition\Exception\Exception; ...@@ -27,10 +27,6 @@ use Symfony\Component\Config\Definition\Exception\Exception;
class Pos extends \Magento\Payment\Block\Form class Pos extends \Magento\Payment\Block\Form
{ {
/**
* quest prefix
*/
const GUEST_ID = 'customer_';
protected $_orderFactory; protected $_orderFactory;
/** /**
...@@ -118,13 +114,13 @@ class Pos extends \Magento\Payment\Block\Form ...@@ -118,13 +114,13 @@ class Pos extends \Magento\Payment\Block\Form
$currencyCode = $orderCurrencyCode; $currencyCode = $orderCurrencyCode;
$paymentAmount = $amount; $paymentAmount = $amount;
$merchantReference = $realOrderId; $merchantReference = $realOrderId;
$shopperReference = (!empty($customerId)) ? $customerId : self::GUEST_ID . $realOrderId;
$shopperEmail = $shopperEmail;
$recurringParams = ""; $recurringParams = "";
if ($this->_order->getPayment()->getAdditionalInformation("store_cc") != "") { if ($this->_order->getPayment()->getAdditionalInformation("store_cc") != ""
&& $customerId > 0
) {
$recurringParams = "&recurringContract=" . urlencode($recurringContract) . "&shopperReference=" . $recurringParams = "&recurringContract=" . urlencode($recurringContract) . "&shopperReference=" .
urlencode($shopperReference) . "&shopperEmail=" . urlencode($shopperEmail); urlencode($customerId) . "&shopperEmail=" . urlencode($shopperEmail);
} }
$receiptOrderLines = ""; $receiptOrderLines = "";
......
...@@ -28,11 +28,6 @@ use Symfony\Component\Config\Definition\Exception\Exception; ...@@ -28,11 +28,6 @@ use Symfony\Component\Config\Definition\Exception\Exception;
class Redirect extends \Magento\Payment\Block\Form class Redirect extends \Magento\Payment\Block\Form
{ {
/**
* quest prefix
*/
const GUEST_ID = 'customer_';
/** /**
* @var \Magento\Sales\Model\OrderFactory * @var \Magento\Sales\Model\OrderFactory
*/ */
...@@ -233,8 +228,11 @@ class Redirect extends \Magento\Payment\Block\Form ...@@ -233,8 +228,11 @@ class Redirect extends \Magento\Payment\Block\Form
$recurringType = "RECURRING"; $recurringType = "RECURRING";
} }
$formFields['recurringContract'] = $recurringType; if ($customerId > 0) {
$formFields['shopperReference'] = (!empty($customerId)) ? $customerId : self::GUEST_ID . $realOrderId; $formFields['recurringContract'] = $recurringType;
$formFields['shopperReference'] = $customerId;
}
//blocked methods //blocked methods
$formFields['blockedMethods'] = ""; $formFields['blockedMethods'] = "";
...@@ -441,18 +439,12 @@ class Redirect extends \Magento\Payment\Block\Form ...@@ -441,18 +439,12 @@ class Redirect extends \Magento\Payment\Block\Form
$item->getPrice(), $item->getPrice(),
$currency $currency
) : $this->_adyenHelper->formatAmount($item->getTaxAmount(), $currency); ) : $this->_adyenHelper->formatAmount($item->getTaxAmount(), $currency);
// $product = $item->getProduct();
// Calculate vat percentage // Calculate vat percentage
$percentageMinorUnits = $this->_adyenHelper->getMinorUnitTaxPercent($item->getTaxPercent()); $percentageMinorUnits = $this->_adyenHelper->getMinorUnitTaxPercent($item->getTaxPercent());
$formFields['openinvoicedata.' . $linename . '.itemVatPercentage'] = $percentageMinorUnits; $formFields['openinvoicedata.' . $linename . '.itemVatPercentage'] = $percentageMinorUnits;
$formFields['openinvoicedata.' . $linename . '.numberOfItems'] = (int) $item->getQtyOrdered(); $formFields['openinvoicedata.' . $linename . '.numberOfItems'] = (int) $item->getQtyOrdered();
if ($this->_order->getPayment()->getAdditionalInformation( if ($this->_order->getPayment()->getAdditionalInformation(
\Adyen\Payment\Observer\AdyenHppDataAssignObserver::BRAND_CODE) == "klarna" \Adyen\Payment\Observer\AdyenHppDataAssignObserver::BRAND_CODE) == "klarna"
) { ) {
...@@ -460,6 +452,11 @@ class Redirect extends \Magento\Payment\Block\Form ...@@ -460,6 +452,11 @@ class Redirect extends \Magento\Payment\Block\Form
} else { } else {
$formFields['openinvoicedata.' . $linename . '.vatCategory'] = "None"; $formFields['openinvoicedata.' . $linename . '.vatCategory'] = "None";
} }
if ($item->getSku() != "") {
$formFields['openinvoicedata.' . $linename . '.itemId'] = $item->getSku();
}
} }
$formFields['openinvoicedata.refundDescription'] = "Refund / Correction for ".$formFields['merchantReference']; $formFields['openinvoicedata.refundDescription'] = "Refund / Correction for ".$formFields['merchantReference'];
......
...@@ -29,11 +29,6 @@ use Magento\Payment\Gateway\CommandInterface; ...@@ -29,11 +29,6 @@ use Magento\Payment\Gateway\CommandInterface;
class PayByMailCommand implements CommandInterface class PayByMailCommand implements CommandInterface
{ {
/**
* quest prefix
*/
const GUEST_ID = 'customer_';
/** /**
* @var \Adyen\Payment\Helper\Data * @var \Adyen\Payment\Helper\Data
*/ */
...@@ -190,10 +185,7 @@ class PayByMailCommand implements CommandInterface ...@@ -190,10 +185,7 @@ class PayByMailCommand implements CommandInterface
$formFields['shopperEmail'] = $shopperEmail; $formFields['shopperEmail'] = $shopperEmail;
// recurring // recurring
$recurringType = trim($this->_adyenHelper->getAdyenAbstractConfigData('recurring_type')); $recurringType = trim($this->_adyenHelper->getAdyenAbstractConfigData('recurring_type'));
$formFields['recurringContract'] = $recurringType;
$sessionValidity = $this->_adyenHelper->getAdyenPayByMailConfigData('session_validity'); $sessionValidity = $this->_adyenHelper->getAdyenPayByMailConfigData('session_validity');
if ($sessionValidity == "") { if ($sessionValidity == "") {
...@@ -201,7 +193,11 @@ class PayByMailCommand implements CommandInterface ...@@ -201,7 +193,11 @@ class PayByMailCommand implements CommandInterface
} }
$formFields['sessionValidity'] = date("c", strtotime("+". $sessionValidity. " days")); $formFields['sessionValidity'] = date("c", strtotime("+". $sessionValidity. " days"));
$formFields['shopperReference'] = (!empty($customerId)) ? $customerId : self::GUEST_ID . $realOrderId;
if ($customerId > 0) {
$formFields['recurringContract'] = $recurringType;
$formFields['shopperReference'] = $customerId;
}
// Sort the array by key using SORT_STRING order // Sort the array by key using SORT_STRING order
ksort($formFields, SORT_STRING); ksort($formFields, SORT_STRING);
......
...@@ -29,10 +29,6 @@ use Magento\Payment\Gateway\Request\BuilderInterface; ...@@ -29,10 +29,6 @@ use Magento\Payment\Gateway\Request\BuilderInterface;
*/ */
class CustomerDataBuilder implements BuilderInterface class CustomerDataBuilder implements BuilderInterface
{ {
/**
* quest prefix
*/
const GUEST_ID = 'customer_';
/** /**
* Add shopper data into request * Add shopper data into request
...@@ -42,19 +38,22 @@ class CustomerDataBuilder implements BuilderInterface ...@@ -42,19 +38,22 @@ class CustomerDataBuilder implements BuilderInterface
*/ */
public function build(array $buildSubject) public function build(array $buildSubject)
{ {
$result = [];
/** @var \Magento\Payment\Gateway\Data\PaymentDataObject $paymentDataObject */ /** @var \Magento\Payment\Gateway\Data\PaymentDataObject $paymentDataObject */
$paymentDataObject = \Magento\Payment\Gateway\Helper\SubjectReader::readPayment($buildSubject); $paymentDataObject = \Magento\Payment\Gateway\Helper\SubjectReader::readPayment($buildSubject);
$order = $paymentDataObject->getOrder(); $order = $paymentDataObject->getOrder();
$billingAddress = $order->getBillingAddress(); $billingAddress = $order->getBillingAddress();
$customerEmail = $billingAddress->getEmail(); $customerEmail = $billingAddress->getEmail();
$realOrderId = $order->getOrderIncrementId();
$customerId = $order->getCustomerId(); $customerId = $order->getCustomerId();
$shopperReference = (!empty($customerId)) ? $customerId : self::GUEST_ID . $realOrderId;
return [ if ($customerId > 0) {
"shopperEmail" => $customerEmail, $result['shopperReference'] = $customerId;
"shopperReference" => $shopperReference }
];
$result ['shopperEmail'] = $customerEmail;
return $result;
} }
} }
...@@ -63,6 +63,7 @@ class RecurringDataBuilder implements BuilderInterface ...@@ -63,6 +63,7 @@ class RecurringDataBuilder implements BuilderInterface
$payment = $paymentDataObject->getPayment(); $payment = $paymentDataObject->getPayment();
// Needs to change when oneclick,cc using facade impl. // Needs to change when oneclick,cc using facade impl.
$paymentMethodCode = $payment->getMethodInstance()->getCode(); $paymentMethodCode = $payment->getMethodInstance()->getCode();
$customerId = $payment->getOrder()->getCustomerId();
$storeId = null; $storeId = null;
if ($this->appState->getAreaCode() === \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) { if ($this->appState->getAreaCode() === \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) {
...@@ -95,7 +96,8 @@ class RecurringDataBuilder implements BuilderInterface ...@@ -95,7 +96,8 @@ class RecurringDataBuilder implements BuilderInterface
} }
} }
if ($recurringContractType) { // only when recurringContractType is set and when a customer is loggedIn
if ($recurringContractType && $customerId > 0) {
$recurring = ['contract' => $recurringContractType]; $recurring = ['contract' => $recurringContractType];
$result['recurring'] = $recurring; $result['recurring'] = $recurring;
} }
......
...@@ -58,8 +58,6 @@ class PaymentRequest extends DataObject ...@@ -58,8 +58,6 @@ class PaymentRequest extends DataObject
*/ */
protected $_appState; protected $_appState;
const GUEST_ID = 'customer_';
/** /**
* PaymentRequest constructor. * PaymentRequest constructor.
* *
......
...@@ -35,7 +35,6 @@ class Cron ...@@ -35,7 +35,6 @@ class Cron
*/ */
protected $_logger; protected $_logger;
/** /**
* @var Resource\Notification\CollectionFactory * @var Resource\Notification\CollectionFactory
*/ */
...@@ -176,6 +175,8 @@ class Cron ...@@ -176,6 +175,8 @@ class Cron
* @param Billing\AgreementFactory $billingAgreementFactory * @param Billing\AgreementFactory $billingAgreementFactory
* @param Resource\Billing\Agreement\CollectionFactory $billingAgreementCollectionFactory * @param Resource\Billing\Agreement\CollectionFactory $billingAgreementCollectionFactory
* @param Api\PaymentRequest $paymentRequest * @param Api\PaymentRequest $paymentRequest
* @param Order\PaymentFactory $adyenOrderPaymentFactory
* @param Resource\Order\Payment\CollectionFactory $adyenOrderPaymentCollectionFactory
*/ */
public function __construct( public function __construct(
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
...@@ -461,7 +462,9 @@ class Cron ...@@ -461,7 +462,9 @@ class Cron
// If notification is pending status and pending status is set add the status change to the comment history // If notification is pending status and pending status is set add the status change to the comment history
if ($this->_eventCode == Notification::PENDING) { if ($this->_eventCode == Notification::PENDING) {
$pendingStatus = $this->_getConfigData('pending_status', 'adyen_abstract', $this->_order->getStoreId()); $pendingStatus = $this->_getConfigData(
'pending_status', 'adyen_abstract', $this->_order->getStoreId()
);
if ($pendingStatus != "") { if ($pendingStatus != "") {
$this->_order->addStatusHistoryComment($comment, $pendingStatus); $this->_order->addStatusHistoryComment($comment, $pendingStatus);
$this->_adyenLogger->addAdyenNotificationCronjob( $this->_adyenLogger->addAdyenNotificationCronjob(
...@@ -598,7 +601,9 @@ class Cron ...@@ -598,7 +601,9 @@ class Cron
*/ */
protected function _holdCancelOrder($ignoreHasInvoice) protected function _holdCancelOrder($ignoreHasInvoice)
{ {
$orderStatus = $this->_getConfigData('payment_cancelled', 'adyen_abstract', $this->_order->getStoreId()); $orderStatus = $this->_getConfigData(
'payment_cancelled', 'adyen_abstract', $this->_order->getStoreId()
);
// check if order has in invoice only cancel/hold if this is not the case // check if order has in invoice only cancel/hold if this is not the case
if ($ignoreHasInvoice || !$this->_order->hasInvoices()) { if ($ignoreHasInvoice || !$this->_order->hasInvoices()) {
...@@ -664,8 +669,7 @@ class Cron ...@@ -664,8 +669,7 @@ class Cron
$isBankTransfer = $this->_isBankTransfer(); $isBankTransfer = $this->_isBankTransfer();
if ($isBankTransfer || $this->_paymentMethod == 'sepadirectdebit') { if ($isBankTransfer || $this->_paymentMethod == 'sepadirectdebit') {
if (!$this->_order->getEmailSent()) { if (!$this->_order->getEmailSent()) {
$this->_orderSender->send($this->_order); $this->_sendOrderMail();
$this->_adyenLogger->addAdyenNotificationCronjob('Send orderconfirmation email to shopper');
} }
} }
} }
...@@ -969,9 +973,9 @@ class Cron ...@@ -969,9 +973,9 @@ class Cron
if ($this->_paymentMethod != "adyen_boleto") { if ($this->_paymentMethod != "adyen_boleto") {
// send order confirmation mail after invoice creation so merchant can add invoicePDF to this mail // send order confirmation mail after invoice creation so merchant can add invoicePDF to this mail
if (!$this->_order->getEmailSent()) { if (!$this->_order->getEmailSent()) {
$this->_orderSender->send($this->_order); $this->_sendOrderMail();
$this->_adyenLogger->addAdyenNotificationCronjob('Send orderconfirmation email to shopper');
} }
} }
if (($this->_paymentMethod == "c_cash" && if (($this->_paymentMethod == "c_cash" &&
...@@ -983,12 +987,34 @@ class Cron ...@@ -983,12 +987,34 @@ class Cron
} }
} }
/**
* Send order Mail
*
* @return void
*/
private function _sendOrderMail()
{
try {
$this->_orderSender->send($this->_order);
$this->_adyenLogger->addAdyenNotificationCronjob('Send orderconfirmation email to shopper');
} catch(\Exception $exception) {
$this->_adyenLogger->addAdyenNotificationCronjob(
"Exception in Send Mail in Magento. This is an issue in the the core of Magento" .
$exception->getMessage()
);
}
}
/** /**
* Set status on authorisation * Set status on authorisation
*
* @return void
*/ */
private function _setPrePaymentAuthorized() private function _setPrePaymentAuthorized()
{ {
$status = $this->_getConfigData('payment_pre_authorized', 'adyen_abstract', $this->_order->getStoreId()); $status = $this->_getConfigData(
'payment_pre_authorized', 'adyen_abstract', $this->_order->getStoreId()
);
// only do this if status in configuration is set // only do this if status in configuration is set
if (!empty($status)) { if (!empty($status)) {
...@@ -1003,6 +1029,7 @@ class Cron ...@@ -1003,6 +1029,7 @@ class Cron
/** /**
* @throws Exception * @throws Exception
* @return void
*/ */
protected function _prepareInvoice() protected function _prepareInvoice()
{ {
...@@ -1084,8 +1111,12 @@ class Cron ...@@ -1084,8 +1111,12 @@ class Cron
{ {
// validate if payment methods allowes manual capture // validate if payment methods allowes manual capture
if ($this->_manualCaptureAllowed()) { if ($this->_manualCaptureAllowed()) {
$captureMode = trim($this->_getConfigData('capture_mode', 'adyen_abstract', $this->_order->getStoreId())); $captureMode = trim($this->_getConfigData(
$sepaFlow = trim($this->_getConfigData('sepa_flow', 'adyen_abstract', $this->_order->getStoreId())); 'capture_mode', 'adyen_abstract', $this->_order->getStoreId())
);
$sepaFlow = trim($this->_getConfigData(
'sepa_flow', 'adyen_abstract', $this->_order->getStoreId())
);
$_paymentCode = $this->_paymentMethodCode(); $_paymentCode = $this->_paymentMethodCode();
$captureModeOpenInvoice = $this->_getConfigData( $captureModeOpenInvoice = $this->_getConfigData(
'auto_capture_openinvoice', 'adyen_abstract', $this->_order->getStoreId() 'auto_capture_openinvoice', 'adyen_abstract', $this->_order->getStoreId()
...@@ -1210,7 +1241,8 @@ class Cron ...@@ -1210,7 +1241,8 @@ class Cron
/** /**
* @return bool * @return bool
*/ */
protected function _isBankTransfer() { protected function _isBankTransfer()
{
if (strlen($this->_paymentMethod) >= 12 && substr($this->_paymentMethod, 0, 12) == "bankTransfer") { if (strlen($this->_paymentMethod) >= 12 && substr($this->_paymentMethod, 0, 12) == "bankTransfer") {
$isBankTransfer = true; $isBankTransfer = true;
} else { } else {
...@@ -1224,7 +1256,9 @@ class Cron ...@@ -1224,7 +1256,9 @@ class Cron
*/ */
protected function _getFraudManualReviewStatus() protected function _getFraudManualReviewStatus()
{ {
return $this->_getConfigData('fraud_manual_review_status', 'adyen_abstract', $this->_order->getStoreId()); return $this->_getConfigData(
'fraud_manual_review_status', 'adyen_abstract', $this->_order->getStoreId()
);
} }
/** /**
...@@ -1238,7 +1272,8 @@ class Cron ...@@ -1238,7 +1272,8 @@ class Cron
} }
/** /**
* @param $orderAmount * @param int $paymentId
* @param string $orderCurrencyCode
* @return bool * @return bool
*/ */
protected function _isTotalAmount($paymentId, $orderCurrencyCode) protected function _isTotalAmount($paymentId, $orderCurrencyCode)
...@@ -1255,10 +1290,15 @@ class Cron ...@@ -1255,10 +1290,15 @@ class Cron
->create() ->create()
->getTotalAmount($paymentId); ->getTotalAmount($paymentId);
if($res && isset($res[0]) && is_array($res[0])) { if ($res && isset($res[0]) && is_array($res[0])) {
$amount = $res[0]['total_amount']; $amount = $res[0]['total_amount'];
$orderAmount = $this->_adyenHelper->formatAmount($amount, $orderCurrencyCode); $orderAmount = $this->_adyenHelper->formatAmount($amount, $orderCurrencyCode);
$this->_adyenLogger->addAdyenNotificationCronjob(sprintf('The grandtotal amount is %s and the total order amount that is authorised is: %s', $grandTotal, $orderAmount)); $this->_adyenLogger->addAdyenNotificationCronjob(
sprintf('The grandtotal amount is %s and the total order amount that is authorised is: %s',
$grandTotal,
$orderAmount
)
);
if ($grandTotal == $orderAmount) { if ($grandTotal == $orderAmount) {
$this->_adyenLogger->addAdyenNotificationCronjob('AUTHORISATION has the full amount'); $this->_adyenLogger->addAdyenNotificationCronjob('AUTHORISATION has the full amount');
...@@ -1276,6 +1316,7 @@ class Cron ...@@ -1276,6 +1316,7 @@ class Cron
/** /**
* @throws Exception * @throws Exception
* @throws \Magento\Framework\Exception\LocalizedException * @throws \Magento\Framework\Exception\LocalizedException
* @return void
*/ */
protected function _createInvoice() protected function _createInvoice()
{ {
...@@ -1360,12 +1401,16 @@ class Cron ...@@ -1360,12 +1401,16 @@ class Cron
$this->_createInvoice(); $this->_createInvoice();
} }
$status = $this->_getConfigData('payment_authorized', 'adyen_abstract', $this->_order->getStoreId()); $status = $this->_getConfigData(
'payment_authorized', 'adyen_abstract', $this->_order->getStoreId()
);
// virtual order can have different status // virtual order can have different status
if ($this->_order->getIsVirtual()) { if ($this->_order->getIsVirtual()) {
$this->_adyenLogger->addAdyenNotificationCronjob('Product is a virtual product'); $this->_adyenLogger->addAdyenNotificationCronjob('Product is a virtual product');
$virtualStatus = $this->_getConfigData('payment_authorized_virtual'); $virtualStatus = $this->_getConfigData(
'payment_authorized_virtual', 'adyen_abstract', $this->_order->getStoreId()
);
if ($virtualStatus != "") { if ($virtualStatus != "") {
$status = $virtualStatus; $status = $virtualStatus;
} }
...@@ -1389,11 +1434,15 @@ class Cron ...@@ -1389,11 +1434,15 @@ class Cron
$paidAmount = floatval(trim($paidAmount)); $paidAmount = floatval(trim($paidAmount));
if ($paidAmount > $orginalAmount) { if ($paidAmount > $orginalAmount) {
$overpaidStatus = $this->_getConfigData('order_overpaid_status', 'adyen_boleto'); $overpaidStatus = $this->_getConfigData(
'order_overpaid_status', 'adyen_boleto', $this->_order->getStoreId()
);
// check if there is selected a status if not fall back to the default // check if there is selected a status if not fall back to the default
$status = (!empty($overpaidStatus)) ? $overpaidStatus : $status; $status = (!empty($overpaidStatus)) ? $overpaidStatus : $status;
} else { } else {
$underpaidStatus = $this->_getConfigData('order_underpaid_status', 'adyen_boleto'); $underpaidStatus = $this->_getConfigData(
'order_underpaid_status', 'adyen_boleto', $this->_order->getStoreId()
);
// check if there is selected a status if not fall back to the default // check if there is selected a status if not fall back to the default
$status = (!empty($underpaidStatus)) ? $underpaidStatus : $status; $status = (!empty($underpaidStatus)) ? $underpaidStatus : $status;
} }
......
# Adyen_Magento2 # Adyen_Magento2
Adyen Payment plugin for Magento2 Adyen Payment plugin for Magento2
## Install with Composer ## ## Installation ##
composer require adyen/module-payment ```
bin/composer require adyen/module-payment
bin/magento module:enable Adyen_Payment
bin/magento setup:upgrade
```
## Manual ## ## Manual ##
<a href="https://docs.adyen.com/developers/magento#magento2integration" target="_blank">https://docs.adyen.com/developers/magento#magento2integration</a> <a href="https://docs.adyen.com/developers/magento#magento2integration" target="_blank">https://docs.adyen.com/developers/magento#magento2integration</a>
......
...@@ -34,7 +34,6 @@ use Magento\Framework\Setup\SchemaSetupInterface; ...@@ -34,7 +34,6 @@ use Magento\Framework\Setup\SchemaSetupInterface;
class UpgradeSchema implements UpgradeSchemaInterface class UpgradeSchema implements UpgradeSchemaInterface
{ {
const ADYEN_ORDER_PAYMENT = 'adyen_order_payment'; const ADYEN_ORDER_PAYMENT = 'adyen_order_payment';
/** /**
...@@ -56,11 +55,18 @@ class UpgradeSchema implements UpgradeSchemaInterface ...@@ -56,11 +55,18 @@ class UpgradeSchema implements UpgradeSchemaInterface
$this->updateSchemaVersion200($setup); $this->updateSchemaVersion200($setup);
} }
if (version_compare($context->getVersion(), '2.0.4', '<')) {
$this->updateSchemaVersion204($setup);
}
$setup->endSetup(); $setup->endSetup();
} }
/** /**
* Upgrade to 1.0.0.1
*
* @param SchemaSetupInterface $setup * @param SchemaSetupInterface $setup
* @return void
*/ */
public function updateSchemaVersion1001(SchemaSetupInterface $setup) public function updateSchemaVersion1001(SchemaSetupInterface $setup)
{ {
...@@ -92,7 +98,10 @@ class UpgradeSchema implements UpgradeSchemaInterface ...@@ -92,7 +98,10 @@ class UpgradeSchema implements UpgradeSchemaInterface
} }
/** /**
* Upgrade to 1.0.0.2
*
* @param SchemaSetupInterface $setup * @param SchemaSetupInterface $setup
* @return void
*/ */
public function updateSchemaVersion1002(SchemaSetupInterface $setup) public function updateSchemaVersion1002(SchemaSetupInterface $setup)
{ {
...@@ -110,7 +119,10 @@ class UpgradeSchema implements UpgradeSchemaInterface ...@@ -110,7 +119,10 @@ class UpgradeSchema implements UpgradeSchemaInterface
} }
/** /**
* Upgrade to 2.0.0
*
* @param SchemaSetupInterface $setup * @param SchemaSetupInterface $setup
* @return void
*/ */
public function updateSchemaVersion200(SchemaSetupInterface $setup) public function updateSchemaVersion200(SchemaSetupInterface $setup)
{ {
...@@ -224,4 +236,30 @@ class UpgradeSchema implements UpgradeSchemaInterface ...@@ -224,4 +236,30 @@ class UpgradeSchema implements UpgradeSchemaInterface
); );
} }
/**
* Upgrade to 2.0.4
* Update entity_id in notification from smallint to integer
*
* @param SchemaSetupInterface $setup
* @return void
*/
public function updateSchemaVersion204(SchemaSetupInterface $setup)
{
$connection = $setup->getConnection();
$tableName = $setup->getTable('adyen_notification');
$connection->changeColumn(
$tableName,
'entity_id',
'entity_id',
[
'type' => Table::TYPE_INTEGER,
'nullable' => false,
'primary' => true,
'identity' => true,
'unsigned' => true,
'comment' => 'Adyen Notification Entity ID'
]
);
}
} }
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "adyen/module-payment", "name": "adyen/module-payment",
"description": "Official Magento2 Plugin to connect to Payment Service Provider Adyen.", "description": "Official Magento2 Plugin to connect to Payment Service Provider Adyen.",
"type": "magento2-module", "type": "magento2-module",
"version": "2.0.3", "version": "2.0.4",
"license": [ "license": [
"OSL-3.0", "OSL-3.0",
"AFL-3.0" "AFL-3.0"
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
--> -->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Adyen_Payment" setup_version="2.0.3"> <module name="Adyen_Payment" setup_version="2.0.4">
<sequence> <sequence>
<module name="Magento_Sales"/> <module name="Magento_Sales"/>
<module name="Magento_Quote"/> <module name="Magento_Quote"/>
......
...@@ -33,7 +33,6 @@ $_info = $this->getInfo(); ...@@ -33,7 +33,6 @@ $_info = $this->getInfo();
<dl class="payment-method adyen_hpp"> <dl class="payment-method adyen_hpp">
<?php if($paymentSelectionOnAdyen): ?> <?php if($paymentSelectionOnAdyen): ?>
<?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?><br/>
<dt class="title"><?php echo $block->escapeHtml($block->getMethod()->getTitle()) ?></dt> <dt class="title"><?php echo $block->escapeHtml($block->getMethod()->getTitle()) ?></dt>
<?php else: ?> <?php else: ?>
......
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