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

Fix/piwoo 288 fraud no retry #845

Merged
merged 3 commits into from
Oct 30, 2023
Merged

Fix/piwoo 288 fraud no retry #845

merged 3 commits into from
Oct 30, 2023

Conversation

mmaymo
Copy link
Collaborator

@mmaymo mmaymo commented Oct 20, 2023

Handles PIWOO-288

public function isMollieFraudException(\Mollie\Api\Exceptions\ApiException $e): bool
{
$isFraudCode = $e->getCode() === 422;
$isFraudMessage = strpos($e->getMessage(), 'The payment was declined due to suspected fraud') !== false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmaymo is this the only way to detect fraud? It could be a temporary solution, but they are returning 422 for too many scenarios. This can break any day.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, I will raise this next Monday. Thanks!

@mmaymo mmaymo merged commit a4f72f0 into develop Oct 30, 2023
4 checks passed
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.

2 participants