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: getPaymentInfo only returning one payment method #200

Merged
merged 11 commits into from
Jan 22, 2025

Conversation

iago1501
Copy link
Contributor

@iago1501 iago1501 commented Jan 9, 2025

What problem is this solving?

In orders where the bank invoice payment method wasn't the first payment of the first transaction, its information wasn't displayed on the order placed page

How should this be manually tested?

There are 2 use cases for this change:

  • Orders with a single transaction with multiple payments, in which one of them is a bank invoice and it isn't in the first position of the payments array;
  • Orders with multiple transactions in which one of them has a bank invoice payment, and this transaction isn't the first of the array.

Screenshots or example usage

Example of an order with a bank invoice in the second payment of the array, where its information is not displayed:
https://gaboulstore.myvtex.com/checkout/orderPlaced/?og=1486610500025
image

Example of the same order, but in a workspace with this change implemented:
https://iespinoza2--gaboulstore.myvtex.com/checkout/orderPlaced/?og=1486610500025
image

Just a disclaimer, since this bank invoice doesn't have a URL, I just removed this validation in the workspace because I didn't have any other example to test

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires change to documentation, which has been updated accordingly.

With this solution I think we might close: #199

@iago1501 iago1501 added the bug Something isn't working label Jan 9, 2025
@iago1501 iago1501 self-assigned this Jan 9, 2025
@iago1501 iago1501 requested review from a team as code owners January 9, 2025 17:31
@iago1501 iago1501 requested review from gabpaladino, vsseixaso and RodrigoTadeuF and removed request for a team January 9, 2025 17:31
@vtex-io-docs-bot
Copy link

vtex-io-docs-bot bot commented Jan 9, 2025

Beep boop 🤖

I noticed you didn't make any changes at the docs/ folder

  • There's nothing new to document 🤔
  • I'll do it later 😞

In order to keep track, I'll create an issue if you decide now is not a good time

  • I just updated 🎉🎉

Copy link
Contributor

vtex-io-ci-cd bot commented Jan 9, 2025

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@iago1501 iago1501 requested review from vmourac-vtex and removed request for a team, gabpaladino and RodrigoTadeuF January 9, 2025 17:31
react/package.json Dismissed Show dismissed Hide dismissed
react/package.json Dismissed Show dismissed Hide dismissed
react/package.json Dismissed Show dismissed Hide dismissed
react/package.json Dismissed Show dismissed Hide dismissed
react/package.json Dismissed Show dismissed Hide dismissed
react/package.json Dismissed Show dismissed Hide dismissed
react/package.json Dismissed Show dismissed Hide dismissed
react/package.json Dismissed Show dismissed Hide dismissed
react/package.json Dismissed Show dismissed Hide dismissed
react/package.json Dismissed Show dismissed Hide dismissed
@vtex-apps vtex-apps deleted a comment from github-actions bot Jan 9, 2025
@iago1501 iago1501 changed the title Fix/get payment info Fix: get payment info Jan 10, 2025
@iago1501 iago1501 changed the title Fix: get payment info Fix: getPaymentInfo only returning one payment method Jan 10, 2025
@iago1501 iago1501 requested a review from gabpaladino January 16, 2025 16:45
Copy link

@vsseixaso vsseixaso left a comment

Choose a reason for hiding this comment

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

In this workspace, bank invoice is the second element, is there a problem with this order?

image

@iago1501
Copy link
Contributor Author

In this workspace, bank invoice is the second element, is there a problem with this order?

image

This is literally what's causing the issue, when a payment method is split (bank invoice and gift card), bank invoice might be the second element. In the previous implementation, the bank invoice method wasn't recognized, in this new approach, since we now check all payment methods, now we are able to find it

@iago1501 iago1501 requested a review from vsseixaso January 21, 2025 16:29
@iago1501 iago1501 merged commit b0f6fc5 into master Jan 22, 2025
8 checks passed
@iago1501 iago1501 deleted the fix/getPaymentInfo branch January 22, 2025 14:30
Copy link
Contributor

vtex-io-ci-cd bot commented Jan 22, 2025

Your PR has been merged! App is being published. 🚀
Version 2.18.0 → 2.19.0

After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:

vtex deploy vtex.order-placed@2.19.0

After that your app will be updated on all accounts.

For more information on the deployment process check the docs. 📖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants