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

docs(connector): update connector integration documentation #3041

Merged
merged 10 commits into from
Dec 19, 2023

Conversation

srujanchikke
Copy link
Contributor

Type of Change

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

Description

As add_connector.md was updated long time ago, This PR updates the add_connector.md file.

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?

No tests required as this is documentation related PR.

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
  • I added a CHANGELOG entry if applicable

@srujanchikke srujanchikke added A-connector-integration Area: Connector integration C-doc Category: Documentation updates S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Dec 4, 2023
@srujanchikke srujanchikke self-assigned this Dec 4, 2023
@srujanchikke srujanchikke requested a review from a team as a code owner December 4, 2023 06:12
@srujanchikke srujanchikke changed the title docs(connector): Update add_connector.md file docs(connector): update the add_connector.md document Dec 4, 2023
@srujanchikke srujanchikke changed the title docs(connector): update the add_connector.md document docs(connector): update integrating new connector documentation Dec 4, 2023
@srujanchikke srujanchikke changed the title docs(connector): update integrating new connector documentation docs(connector): update connector integration documentation Dec 4, 2023
Signed-off-by: chikke srujan <[email protected]>
add_connector.md Outdated Show resolved Hide resolved
add_connector.md Outdated Show resolved Hide resolved
add_connector.md Outdated Show resolved Hide resolved
add_connector.md Outdated Show resolved Hide resolved
add_connector.md Outdated Show resolved Hide resolved
add_connector.md Outdated Show resolved Hide resolved
add_connector.md Outdated Show resolved Hide resolved
add_connector.md Outdated Show resolved Hide resolved
add_connector.md Outdated Show resolved Hide resolved
add_connector.md Outdated Show resolved Hide resolved
SanchithHegde
SanchithHegde previously approved these changes Dec 5, 2023
add_connector.md Outdated
Comment on lines 351 to 353
let redirection_data = item.response.links.redirect.map(|href| {
services::RedirectForm::from((href.redirection_url, services::Method::Get))
});
Copy link
Member

Choose a reason for hiding this comment

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

Can we format the Rust code snippets included in this document?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

add_connector.md Outdated
```

**ConnectorIntegration :** For every api endpoint contains the url, using request transform and response transform and headers.
Within the `ConnectorIntegration` trait, you'll find the following methods implemented(below mentioned is example for authorized flow ):
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Within the `ConnectorIntegration` trait, you'll find the following methods implemented(below mentioned is example for authorized flow ):
Within the `ConnectorIntegration` trait, you'll find the following methods implemented (below mentioned is example for authorized flow):

add_connector.md Outdated
}
```

- `get_request_body` method calls transformers where hyperswitch payment request data is transformed into connector payment request .For constructing the request body have a function `log_and_get_request_body` that allows generic argument which is the struct that is passed as the body for connector integration, and a function that can be use to encode it into String. We log the request in this function, as the struct will be intact and the masked values will be masked.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- `get_request_body` method calls transformers where hyperswitch payment request data is transformed into connector payment request .For constructing the request body have a function `log_and_get_request_body` that allows generic argument which is the struct that is passed as the body for connector integration, and a function that can be use to encode it into String. We log the request in this function, as the struct will be intact and the masked values will be masked.
- `get_request_body` method calls transformers where hyperswitch payment request data is transformed into connector payment request. For constructing the request body have a function `log_and_get_request_body` that allows generic argument which is the struct that is passed as the body for connector integration, and a function that can be use to encode it into String. We log the request in this function, as the struct will be intact and the masked values will be masked.

Please ensure correct punctuation across the document.

@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Dec 19, 2023
Merged via the queue into main with commit ce5514e Dec 19, 2023
10 of 12 checks passed
@Gnanasundari24 Gnanasundari24 deleted the connector_doc branch December 19, 2023 08:22
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Dec 25, 2023
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-doc Category: Documentation updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants