Skip to content

feat(connector): [BOA] Handle refund status 201 #4908

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

Merged
merged 1 commit into from
Jun 7, 2024
Merged

Conversation

deepanshu-iiitu
Copy link
Contributor

@deepanshu-iiitu deepanshu-iiitu commented Jun 7, 2024

Type of Change

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

Description

Refund Status in Bankofamerica refund response is returning a new value 201 along with errorInformation.reason as PROCESSOR_DECLINED which is being handled now.

Additional Changes

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

Motivation and Context

#4906

How did you test it?

We are unable to recreate the status "201" on BOA sandbox and hence only normal refund flow should be tested.

Refund Request:

curl --location 'http://localhost:8080/refunds' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: API_KEY_HERE' \
--data '{
  "payment_id": "pay_O9ziXsg3MNqO3z40T5G7",
  "amount": 1404,
  "reason": "Coumer returned product",
  "refund_type": "instant",
  "metadata": {
    "udf1": "value1",
    "new_customer": "true",
    "login_date": "2019-09-10T10:11:12Z"
  }
}'

Refund Response:

{
    "refund_id": "ref_d6SrGxAWUP3qn0jbXeLJ",
    "payment_id": "pay_O9ziXsg3MNqO3z40T5G7",
    "amount": 1404,
    "currency": "USD",
    "status": "pending",
    "reason": "Coumer returned product",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "error_message": null,
    "error_code": null,
    "created_at": "2024-06-07T08:48:26.104Z",
    "updated_at": "2024-06-07T08:48:26.104Z",
    "connector": "bankofamerica",
    "profile_id": "pro_p65lw9djOoJVaUd5BEwN",
    "merchant_connector_id": "mca_31kwy8X7BwWrWRLPDYe7",
    "charges": null
}

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

@deepanshu-iiitu deepanshu-iiitu added A-connector-integration Area: Connector integration C-bug Category: Bug labels Jun 7, 2024
@deepanshu-iiitu deepanshu-iiitu requested a review from a team as a code owner June 7, 2024 08:51
@deepanshu-iiitu deepanshu-iiitu self-assigned this Jun 7, 2024
@deepanshu-iiitu deepanshu-iiitu linked an issue Jun 7, 2024 that may be closed by this pull request
2 tasks
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Jun 7, 2024
Merged via the queue into main with commit 13fa7d5 Jun 7, 2024
16 checks passed
@Gnanasundari24 Gnanasundari24 deleted the boa-201-status branch June 7, 2024 10:07
deepanshu-iiitu added a commit that referenced this pull request Jun 7, 2024
deepanshu-iiitu added a commit that referenced this pull request Jun 7, 2024
pixincreate added a commit that referenced this pull request Jun 7, 2024
…o cypress-payout-fix

* 'main' of github.com:juspay/hyperswitch:
  feat(Cypress): Add routing test (#4768)
  feat(connector): [BOA] Handle refund status 201 (#4908)

* 'main' of github.com:juspay/hyperswitch:
  feat(Cypress): Add routing test (#4768)
  feat(connector): [BOA] Handle refund status 201 (#4908)
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.

[BUG] [BANKOFAMERICA] Handle refund status 201
4 participants