Skip to content

refactor(connector): added amount conversion framework for Mifinity#5460

Merged
Gnanasundari24 merged 4 commits intomainfrom
do-amount-conversion-for-mifinity
Aug 7, 2024
Merged

refactor(connector): added amount conversion framework for Mifinity#5460
Gnanasundari24 merged 4 commits intomainfrom
do-amount-conversion-for-mifinity

Conversation

@KiranKBR
Copy link
Contributor

@KiranKBR KiranKBR commented Jul 26, 2024

Type of Change

  • Refactoring

Description

This PR do amount conversion changes for Mifinity Connector and it accepts the amount in StringMajorUnit

Additional Changes

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

Motivation and Context

https://github.com/juspay/hyperswitch-cloud/issues/6148

How did you test it?

Payment Request:

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_WRjhnbKDoMkMK2LlnwS2EDjEP0wMGhJPgOOk1lPrQybpvCVcLVOLcNpATsbIzruw' \
--data-raw '{
    "amount": 1000,
    "currency": "EUR",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 1000,
    "customer_id": "StripeCustomer",
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://www.google.com/",
    "payment_method": "wallet",
    "payment_method_type": "mifinity",
    "payment_method_data": {
        "wallet": {
            "mifinity": {
                "destination_account_number": "5001000001223369",
                "date_of_birth": "2001-10-16"
            }
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "DE",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": "swangi@gmail.com"
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "DE",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }  
}'
image

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

@KiranKBR KiranKBR requested review from a team as code owners July 26, 2024 13:59
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Aug 7, 2024
Merged via the queue into main with commit c6a9607 Aug 7, 2024
@Gnanasundari24 Gnanasundari24 deleted the do-amount-conversion-for-mifinity branch August 7, 2024 07:44
pixincreate added a commit that referenced this pull request Aug 7, 2024
…e-connector-label-cypress

* 'main' of github.com:juspay/hyperswitch:
  feat(core): add support for payment links localization (#5530)
  refactor(router): refactor `merchant_connector_account` retrieve and delete v2 apis (#5528)
  feat(cypress): add core flow tests (#5546)
  feat(cypress): add mandates and refunds variation cases (#5513)
  feat(cypress): add configs for not overriding screenshots (#5524)
  refactor(business_profile): use concrete types for JSON fields (#5531)
  feat(customer_v2):  add customer create v2 endpoint  (#5444)
  refactor(connector): added amount conversion framework for Mifinity (#5460)
  refactor(connector): added amount conversion framework for Boku (#5459)
  chore(version): 2024.08.07.0
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.

5 participants