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

23942 - If transaction is already completed jump directly to redirect url #3087

Merged
merged 5 commits into from
Oct 23, 2024

Conversation

seeker25
Copy link
Collaborator

@seeker25 seeker25 commented Oct 21, 2024

bcgov/entity#23942
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the sbc-auth license (Apache 2.0).

@seeker25
Copy link
Collaborator Author

I'm seeing security implications due to this, have to think about it before merging

@seeker25 seeker25 changed the title If transaction is already completed jump directly to redirect url 23942 - If transaction is already completed jump directly to redirect url Oct 21, 2024
@seeker25
Copy link
Collaborator Author

Needs bcgov/sbc-pay#1794

Copy link
Collaborator

@ochiu ochiu left a comment

Choose a reason for hiding this comment

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

Looks good.

Copy link

sonarcloud bot commented Oct 23, 2024

if (error.response.data && error.response.data.type === 'INVALID_TRANSACTION') {
// Transaction is already completed. Show as a modal.
if (error.response.data && ['COMPLETED_PAYMENT', 'INVALID_TRANSACTION'].includes(error.response.data.type)) {
// Skip PAYBC, take directly to the "clients redirect url", this avoids transaction already done error.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

@seeker25 seeker25 merged commit 201fce7 into bcgov:main Oct 23, 2024
9 of 11 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