Skip to content

Commit

Permalink
Merge pull request #2518 from Adyen/develop
Browse files Browse the repository at this point in the history
Release 9.2.0
  • Loading branch information
khushboo-singhvi authored Feb 22, 2024
2 parents 51216d2 + ba281cb commit 3824691
Show file tree
Hide file tree
Showing 52 changed files with 2,803 additions and 544 deletions.
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
1 change: 0 additions & 1 deletion Controller/Adminhtml/Support/ConfigurationSettingsForm.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::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

0 comments on commit 3824691

Please sign in to comment.