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(connector): [BOA/CYB] Fix Metadata Error #3287

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

deepanshu-iiitu
Copy link
Contributor

@deepanshu-iiitu deepanshu-iiitu commented Jan 9, 2024

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Original PR: #3283

Some payments fail when merchant_defined_information is passed for the payment with data coming from merchant in payment requests metadata.

This was happening because hashmaps were being used to populate key,value pairs in merchantDefinedInformation due to which the order in which the (key,value) pairs gets inserted into merchantDefinedInformation was not fixed. Due to this for some payments there was a mismatch between the body used in generation of signature(for payments headers) and the body which was being passed in the actual request. This mismatch caused the connector to throw authentication error for those payments.

Note: This PR only contains the fix for BOA because Cybersource Metadata changes are not present in this version.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Testing can be done by creating a card/gpay/applepay payment and by passing the following metadata in PAYMENTS-CREATE:
"metadata": { "count_tickets": 1, "transaction_number": "5590043" }

You should then be able to see the metadata on BOA dashboard for that payment:
292885857-2693f174-0552-45a9-af42-6606e874231f

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

@deepanshu-iiitu deepanshu-iiitu requested a review from a team as a code owner January 9, 2024 06:11
@deepanshu-iiitu deepanshu-iiitu self-assigned this Jan 9, 2024
@deepanshu-iiitu deepanshu-iiitu added A-connector-integration Area: Connector integration C-bug Category: Bug labels Jan 9, 2024
@bernard-eugine bernard-eugine merged commit 3f89570 into hotfix-1.105.0 Jan 9, 2024
12 of 15 checks passed
@bernard-eugine bernard-eugine deleted the boa-meta-hotfix-1.105.0 branch January 9, 2024 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-connector-integration Area: Connector integration C-bug Category: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants