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): [Braintree] Consume merchant_account_id and merchant_config_currency in payment requests #7445

Merged
merged 2 commits into from
Mar 6, 2025

Conversation

deepanshu-iiitu
Copy link
Contributor

@deepanshu-iiitu deepanshu-iiitu commented Mar 6, 2025

Type of Change

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

Description

Consume merchant_account_id and merchant_config_currency from payment requests for braintree.
[ORIGINAL PR]: #7408

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?

Payment:

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_yW2kCnhqMn1oIAK1ebcLiKtHRrevZEzL1uqFrIrn9O3ckmsXu8vunKf9GkcdoBaQ' \
--data-raw '{
  "amount": 6540,
  "currency": "USD",
  "confirm": true,
  "capture_method": "automatic",
  "capture_on": "2022-09-10T10:11:12Z",
  "amount_to_capture": 6540,
  "customer_id": "BraintreeCustomer",
  "email": "[email protected]",
  "name": "John Doe",
  "phone": "999999999",
  "phone_country_code": "+1",
  "description": "Its my first payment request",
  "authentication_type": "three_ds",
  "return_url": "https://google.com",
  "payment_method": "card",
  "payment_method_type": "credit",
  "payment_method_data": {
    "card": {
      "card_number": "4000000000001091",
      "card_exp_month": "12",
      "card_exp_year": "26",
      "card_holder_name": "CL BRW",
      "card_cvc": "123"
    }
  },
  "billing": {
    "address": {
      "line1": "1467",
      "line2": "Harrison Street",
      "line3": "Harrison Street",
      "city": "San Fransico",
      "state": "California",
      "zip": "94122",
      "country": "US",
      "first_name": "joseph",
      "last_name": "Doe"
    },
    "phone": {
      "number": "8056594427",
      "country_code": "+91"
    }
  },
  "shipping": {
    "address": {
      "line1": "1467",
      "line2": "Harrison Street",
      "line3": "Harrison Street",
      "city": "San Fransico",
      "state": "California",
      "zip": "94122",
      "country": "US",
      "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"
  }
}'

Subsequent Payments:

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_yW2kCnhqMn1oIAK1ebcLiKtHRrevZEzL1uqFrIrn9O3ckmsXu8vunKf9GkcdoBaQ' \
--data '{
    "amount": 6541,
    "currency": "USD",
    "capture_method": "automatic",
    "confirm": true,
    "customer_id": "BraintreeCustomer3",
    "recurring_details": {
        "type": "payment_method_id",
        "data": "pm_xxZMQfyR7pTe15LT4bQw"
    },
    "off_session": true
}'

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

…config_currency in payment requests (#7408)

Co-authored-by: Debarshi Gupta <[email protected]>
@deepanshu-iiitu deepanshu-iiitu requested review from a team as code owners March 6, 2025 11:30
@deepanshu-iiitu deepanshu-iiitu self-assigned this Mar 6, 2025
@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Mar 6, 2025
@deepanshu-iiitu deepanshu-iiitu added A-connector-integration Area: Connector integration C-refactor Category: Refactor labels Mar 6, 2025
Copy link
Contributor

@racnan racnan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dashboard changes looks okay.

@likhinbopanna likhinbopanna merged commit bf0b9bb into hotfix-2025.03.05.0 Mar 6, 2025
15 of 20 checks passed
@likhinbopanna likhinbopanna deleted the hfix2 branch March 6, 2025 12:31
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-refactor Category: Refactor M-api-contract-changes Metadata: This PR involves API contract changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] [BRAINTREE] Consume merchant_account_id and merchant_config_currency in payment requests
6 participants