bolt-magento2 icon indicating copy to clipboard operation
bolt-magento2 copied to clipboard

Support saving credit card functionality for M2 API approach

Open johnmccombs1 opened this issue 1 year ago • 2 comments

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.

johnmccombs1 avatar Nov 03 '23 20:11 johnmccombs1

Warnings
:warning: Please make sure to add new test or update existing tests

Generated by :no_entry_sign: dangerJS

peril-bolt[bot] avatar Nov 03 '23 20:11 peril-bolt[bot]

@vitaliyreznikov @garmashdev Can you review my PR?

thanhnd0905 avatar Dec 08 '23 19:12 thanhnd0905