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 cancel action - empty orderId in details #34

Merged
merged 2 commits into from
Apr 19, 2024
Merged

Conversation

ropczan
Copy link
Contributor

@ropczan ropczan commented Apr 17, 2024

No description provided.

{
$response = $this->orderRequestService->retrieve($model->orderId(), PaymentHelper::getConfigKey($model, $payment));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here the orderId from the model was used, but it does not always have to exist, PaymentHelper::getOrderId tries to take the orderId from firstModel in the first place

$request->setModel($payment->getDetails());

$action->execute($request);
}
Copy link
Member

Choose a reason for hiding this comment

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

I can't see test with empty orderId in details and firstModel - we expect exception then. It's also nice to test this behavior

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@ropczan ropczan merged commit f2b5585 into main Apr 19, 2024
3 checks passed
@ropczan ropczan deleted the fix-cancel-payment branch April 19, 2024 09:04
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.

3 participants