Skip to content

Conversation

srujanchikke
Copy link
Contributor

@srujanchikke srujanchikke commented Nov 6, 2023

Type of Change

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

Description

Incase of minor unit if connector uses get_amount_as_string function , instead of directly converting amount-i64 to string we are checking the decimal unit by using function to_currency_lower_unit .This is will multiply the amount by 100 if connector accepts amount as string and minor .This pr will fix this issue .

Additional Changes

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

Motivation and Context

Incase of minor unit if connector uses get_amount_as_string function , instead of directly converting amount-i64 to string we are checking the decimal unit by using function to_currency_lower_unit .This is will multiply the amount by 100 if connector accepts amount as string and minor .This pr will fix this issue .

How did you test it?

Test cybersource amount conversion .

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

@srujanchikke srujanchikke added A-connector-integration Area: Connector integration C-bug Category: Bug S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Nov 6, 2023
@srujanchikke srujanchikke self-assigned this Nov 6, 2023
@srujanchikke srujanchikke requested a review from a team as a code owner November 6, 2023 09:44
@github-actions github-actions bot added the S-conventions-not-followed Status: This PR does not follow contributing guidelines label Nov 6, 2023
@srujanchikke srujanchikke changed the title fix(connector) : fix amount conversion incase of minor unit fix(connector): fix amount conversion incase of minor unit Nov 6, 2023
@github-actions github-actions bot removed the S-conventions-not-followed Status: This PR does not follow contributing guidelines label Nov 6, 2023
@preetamrevankar preetamrevankar added this pull request to the merge queue Nov 7, 2023
Merged via the queue into main with commit 34f5226 Nov 7, 2023
@preetamrevankar preetamrevankar deleted the currency_unit_fix branch November 7, 2023 07:38
@likhinbopanna likhinbopanna removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Nov 7, 2023
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.

5 participants