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

feat(core): add support for webhook additional source verification call for paypal #2058

Merged
merged 23 commits into from
Sep 20, 2023

Conversation

srujanchikke
Copy link
Contributor

Type of Change

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

Description

Paypal needs additional verification call for webhook source verification . This pr adds support in webhooks flow for additional api call for source verification .

Additional Changes

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

Motivation and Context

Paypal needs additional verification call for webhook source verification . This pr adds support in webhooks flow for additional api call for source verification .

How did you test it?

Screenshot 2023-08-31 at 2 43 33 PM

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 A-core Area: Core flows S-waiting-on-review Status: This PR has been implemented and needs to be reviewed M-configuration-changes Metadata: This PR involves configuration changes labels Aug 31, 2023
@srujanchikke srujanchikke requested a review from a team as a code owner August 31, 2023 09:16
@srujanchikke srujanchikke self-assigned this Aug 31, 2023
@srujanchikke srujanchikke requested review from a team as code owners August 31, 2023 09:16
@github-actions github-actions bot added the S-conventions-not-followed Status: This PR does not follow contributing guidelines label Aug 31, 2023
@srujanchikke srujanchikke changed the title feat(core):add support for webhook additional source verification call for paypal feat(core): add support for webhook additional source verification call for paypal Aug 31, 2023
@github-actions github-actions bot removed the S-conventions-not-followed Status: This PR does not follow contributing guidelines label Aug 31, 2023
| PaypalWebhookEventType::CheckoutOrderProcessed => Ok(Self::Pending),
PaypalWebhookEventType::PaymentAuthorizationCreated => Ok(Self::Created),
PaypalWebhookEventType::PaymentCaptureRefunded => Ok(Self::Refunded),
_ => Err(errors::ConnectorError::WebhookEventTypeNotFound.into()),
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we throwing ConnectorError::WebhookEventTypeNotFound here? Please address it in other try_froms too

) -> CustomResult<String, errors::ConnectorError> {
let header_value = header
.get(key)
.ok_or(errors::ConnectorError::WebhookSourceVerificationFailed)?
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we consider adding logs here, because it's hard to trace if something fails here?

@ArjunKarthik ArjunKarthik added the S-needs-conflict-resolution Status: This PR needs conflicts to be resolved by the author label Sep 11, 2023
@srujanchikke srujanchikke requested a review from a team as a code owner September 12, 2023 11:05
SanchithHegde
SanchithHegde previously approved these changes Sep 20, 2023
@SanchithHegde SanchithHegde added this pull request to the merge queue Sep 20, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 20, 2023
Copy link
Contributor

@ArjunKarthik ArjunKarthik left a comment

Choose a reason for hiding this comment

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

Fix ci failures

@ArjunKarthik ArjunKarthik added the S-waiting-on-author Status: This PR is incomplete or needs to address review comments label Sep 20, 2023
@srujanchikke srujanchikke removed the S-waiting-on-author Status: This PR is incomplete or needs to address review comments label Sep 20, 2023
@srujanchikke
Copy link
Contributor Author

Fix ci failures

Done!

SanchithHegde
SanchithHegde previously approved these changes Sep 20, 2023
@ArjunKarthik ArjunKarthik added S-ready-for-merge S-waiting-on-approval Status: Review completed, awaiting for approvals from code-owners and removed S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Sep 20, 2023
@ArjunKarthik ArjunKarthik added this pull request to the merge queue Sep 20, 2023
Merged via the queue into main with commit 2a9e09d Sep 20, 2023
10 checks passed
@ArjunKarthik ArjunKarthik deleted the webhook_src_verify branch September 20, 2023 14:04
@SanchithHegde SanchithHegde removed S-ready-for-merge S-waiting-on-approval Status: Review completed, awaiting for approvals from code-owners labels Sep 24, 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 A-core Area: Core flows M-configuration-changes Metadata: This PR involves configuration changes
Projects
No open projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

4 participants