Closed beatrizmaselli closed 4 months ago
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)
[x] 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.
Your PR has been merged! App is being published. :rocket: Version 2.170.4 → 2.171.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.store-graphql@2.171.0
After that your app will be updated on all accounts.
For more information on the deployment process check the docs. :book:
What problem is this solving?
Cards saved at a profile using PII are not retrieved at my account.
The first problem is that the API to retrieve the
purchase-info
does not accept the alternativeKey param and it was calling the API with the unmasked path twice likeunmasked/unmasked
. So when this API was being called it was returning 404 even when the profile had already purchase infos saved to it.Ex:
http://portal.vtexcommercestable.com.br/api/storage/profile-system/profiles/beatriz.maselli@vtex.com/purchase-info/unmask?alternativeKey=email&useCase=MyAcocunts&onBehalfOf=user&an=dunnesstoresqa
This will return 404. ❌
Calling using the userId:
http://portal.vtexcommercestable.com.br/api/storage/profile-system/profiles/5f2e2bf9-13ba-4679-9ce4-5877fee681e6/purchase-info/unmask?useCase=MyAcocunts&onBehalfOf=user&an=dunnesstoresqa
The information is retrieve as expected. ✅
The second problem is that the service was not ready to deal with the format of the paymentsRawData for PII accounts.
Example PV1 account:
Example PV2 account:
To deal with this I added a new call to the LM to check if the context is PII or not to differentiate the format for the paymentsRawData.
How to test it?
Workspace
Screenshots or example usage:
Graphql returning payments:
How does this PR make you feel? :link: