Skip to content

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

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

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

[ORIGINAL PR: https://github.com//pull/4908 ]
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 requested a review from a team as a code owner June 7, 2024 10:14
@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
@deepanshu-iiitu deepanshu-iiitu added A-connector-integration Area: Connector integration C-bug Category: Bug labels Jun 7, 2024
@deepanshu-iiitu deepanshu-iiitu changed the title feat(connector): [BOA] Handle refund status 201 (#4908) feat(connector): [BOA] Handle refund status 201 Jun 7, 2024
@Gnanasundari24 Gnanasundari24 merged commit fdff861 into hotfix-2024.05.31.1 Jun 7, 2024
16 of 19 checks passed
@Gnanasundari24 Gnanasundari24 deleted the boa-201-hotfix branch June 7, 2024 10:59
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