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): [BITPAY] Fixed Currency Conversion #7378

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bsayak03
Copy link
Contributor

@bsayak03 bsayak03 commented Feb 25, 2025

Type of Change

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

Description

Changed currency from MinorUnit to FloatMajorUnit

Additional Changes

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

Motivation and Context

Issue Link : https://github.com/juspay/hyperswitch-cloud/issues/8621

How did you test it?

Postman Tests

-Request

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_vq4nNVowBOHmT3h8FYoeDtYV55oIY5tlGAoCeiUHdgm7YEnyFLTGUGI3AMAObHAJ' \
--header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \
--data '{
    "amount": 6540,
    "currency": "USD",
    "confirm": true,
    "profile_id": "pro_Mj45Ntp2QcUJHFKxvDfs",
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": { 
        "card": {
            "card_number": "4242424242424242",
            "card_exp_month": "03",
            "card_exp_year": "30",
            "card_holder_name": "joseph Doe",
            "card_cvc": "737"
        }
    }
}'

Redirection Screenshot
Screenshot 2025-02-25 at 7 58 49 PM

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

@bsayak03 bsayak03 self-assigned this Feb 25, 2025
@bsayak03 bsayak03 requested a review from a team as a code owner February 25, 2025 14:52
Copy link

semanticdiff-com bot commented Feb 25, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_connectors/src/connectors/bitpay.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/bitpay/transformers.rs  0% smaller

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants