Skip to content

Conversation

@AlexandrosMor
Copy link
Contributor

@AlexandrosMor AlexandrosMor commented Nov 24, 2021

Summary

This pull request is about adding support for missing event codes. Each processor move the state or not based on the original state and the notification.

Tested scenarios

Extended the ProcessorFactory class

Fixed issue:

@sonarqubecloud
Copy link

Please retry analysis of this Pull-Request directly on SonarCloud.

@AlexandrosMor AlexandrosMor marked this pull request as ready for review November 30, 2021 09:43
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 21 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@AlexandrosMor AlexandrosMor marked this pull request as draft December 7, 2021 09:26
@michaelpaul
Copy link
Contributor

For cases where the payment state doesn't change we can introduce a new method in \Adyen\Webhook\Processor\Processor:

    protected function unchanged(string $event): string
    {
        $state = $this->initialState;
        $this->log('info', 'Processed ' . $event . ' notification.', [
            'eventCode' => $event,
            'originalState' => $state,
            'newState' => $state
        ]);
        return $state;
    }

@AlexandrosMor
Copy link
Contributor Author

Nice suggestion @michaelpaul , As we discussed I added the unchanged method

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 8, 2021

Please retry analysis of this Pull-Request directly on SonarCloud.

In case of modification.result cancel use the cancel processor
but in case of refund use the refund processor
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 16 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@AlexandrosMor AlexandrosMor merged commit 579ee76 into develop Dec 15, 2021
@AlexandrosMor AlexandrosMor deleted the PW-5725 branch December 15, 2021 11:09
@peterojo peterojo mentioned this pull request Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants