Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 9.2.0 #2518

Merged
merged 16 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/docker-compose.e2e.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3'
services:
playwright:
image: mcr.microsoft.com/playwright:v1.40.1-focal
image: mcr.microsoft.com/playwright:v1.41.2-focal
shm_size: 1gb
ipc: host
cap_add:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
MAGENTO_PASSWORD: ${{ secrets.MAGENTO_PASSWORD }}

- name: Code Sniffer
run: vendor/bin/phpcs --extensions=php,phtml --error-severity=10 --ignore-annotations
run: vendor/bin/phpcs .

- name: Run PHPUnit
run: vendor/bin/phpunit --coverage-clover=build/clover.xml --log-junit=build/tests-log.xml -c Test/phpunit.xml Test/Unit
Expand Down
29 changes: 29 additions & 0 deletions Api/TokenDeactivateInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**
*
* Adyen Payment Module
*
* Copyright (c) 2024 Adyen N.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*
* Author: Adyen <[email protected]>
*/

namespace Adyen\Payment\Api;

/**
* Interface for deactivating the recurring tokens
*/
interface TokenDeactivateInterface
{
/**
* Deactivate a payment token.
*
* @param string $paymentToken
* @param string $paymentMethodCode
* @param int $customerId
* @return bool
*/
public function deactivateToken(string $paymentToken, string $paymentMethodCode, int $customerId): bool;
}
11 changes: 2 additions & 9 deletions Block/Checkout/Multishipping/Success.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@

class Success extends \Magento\Multishipping\Block\Checkout\Success
{
const ACTION_REQUIRED_STATUSES = [
PaymentResponseHandler::REDIRECT_SHOPPER,
PaymentResponseHandler::IDENTIFY_SHOPPER,
PaymentResponseHandler::CHALLENGE_SHOPPER,
PaymentResponseHandler::PENDING
];

/**
* @var bool
*/
Expand Down Expand Up @@ -122,7 +115,7 @@ public function __construct(
public function renderAction()
{
foreach ($this->paymentResponseEntities as $paymentResponseEntity) {
if (in_array($paymentResponseEntity['result_code'], self::ACTION_REQUIRED_STATUSES)) {
if (in_array($paymentResponseEntity['result_code'], PaymentResponseHandler::ACTION_REQUIRED_STATUSES)) {
return true;
}
}
Expand Down Expand Up @@ -189,7 +182,7 @@ private function setOrderInfo($orderIds)
public function getIsPaymentCompleted(int $orderId)
{
// TODO check for all completed responses, not only Authorised, Refused, Pending or PresentToShopper
return !in_array($this->ordersInfo[$orderId]['resultCode'], self::ACTION_REQUIRED_STATUSES);
return !in_array($this->ordersInfo[$orderId]['resultCode'], PaymentResponseHandler::ACTION_REQUIRED_STATUSES);
}

public function getPaymentButtonLabel(int $orderId)
Expand Down
1 change: 0 additions & 1 deletion Block/Form/Moto.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ public function getAmount()
$amount = array("value" => $value, "currency" => $currenyCode);

return json_encode($amount);

} catch (\Throwable $e) {
$this->adyenLogger->error(
'There was an error fetching the amount for checkout component config: ' . $e->getMessage()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public function execute()
];
$this->supportFormHelper->handleSubmit($formData, self::CONFIGURATION_SETTINGS_EMAIL_TEMPLATE);
return $this->_redirect('*/*/success');

} catch (\Exception $e) {
$this->messageManager->addErrorMessage(__('Unable to send support message. '
. $e->getMessage()));
Expand Down
1 change: 0 additions & 1 deletion Controller/Adminhtml/Support/OrderProcessingForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public function execute()
];
$this->supportFormHelper->handleSubmit($formData, self::ORDER_PROCESSING);
return $this->_redirect('*/*/success');

} catch (\Exception $e) {
$this->messageManager->addErrorMessage(__('Unable to send support message. '
. $e->getMessage()));
Expand Down
1 change: 0 additions & 1 deletion Controller/Adminhtml/Support/OtherTopicsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public function execute()
$this->supportFormHelper->handleSubmit($formData, self::OTHER_TOPICS);

return $this->_redirect('*/*/success');

} catch (\Exception $e) {
$this->messageManager->addErrorMessage(__('Unable to send support message. '
. $e->getMessage()));
Expand Down
Loading
Loading