bolt-magento2
bolt-magento2 copied to clipboard
Support saving credit card functionality for M2 API approach
Description
Currently, the saving credit card functionality doesn't work M2 API approach.
Cause: In the legacy approach, we added logic to save customer credit card in the leagcy hook request /rest/V1/bolt/boltpay/order/manage. However, on M2 API apporach, we didn't use the the leagcy hook request. So the saving credit card functionality didn't work
Solution: We add logic to save customer credit card in Bolt\Boltpay\Controller\ReceivedUrlTrait because M2 API apporach use this trait
See screenshot for testing: https://prnt.sc/-d6wsnvUf-2d
Fixes: https://app.asana.com/0/1204419514580775/1205873454199728
#changelog Support saving credit card functionality for M2 API approach
Type of change
- [ ] Bug fix (change which fixes an issue)
- [ ] New feature (change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How Has This Been Tested?
Please validate that you have tested your change in at least one of the following areas:
- [ ] Successfully tested locally (or docker image)
- [ ] Successfully tested on a staging or sandbox server
- [ ] Successfully tested on a merchant's staging server
For PR Reviewer
- [ ] Reviewed unit tests to make sure we are using real components rather than mocks as much as possible?
- [ ] For any major change (observer, new Bolt feature, core Magento interaction) we must add a feature switch, did you verify this?
Checklist:
- [ ] My code follows the style guidelines of this project.
- [ ] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] New and existing unit tests pass locally with my changes.
- [ ] I have created or modified unit tests to sufficiently cover my changes.
- [ ] I have added my ticket link and provided a changelog message.
Warnings | |
---|---|
:warning: | Please make sure to add new test or update existing tests |
Generated by :no_entry_sign: dangerJS
@vitaliyreznikov @garmashdev Can you review my PR?