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(webhooks): send stripe compatible webhooks for stripe compatible merchants #1986

Merged
merged 5 commits into from
Aug 23, 2023

Conversation

Abhicodes-crypto
Copy link
Contributor

@Abhicodes-crypto Abhicodes-crypto commented Aug 22, 2023

Type of Change

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

Description

Previously Webhooks were triggered when the payment status changes. The outgoing webhook was hyperswitch webhook.
In this PR , the outgoing webhook is converted to stripe compatible webhook based on metadata of merchant account.

Additional Changes

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

Slightly modifies the merchant_account api contract by adding the field '{"compatible_connector": "<Connector>"}' in metadata. The dashboard can add this field if required.

Motivation and Context

How did you test it?

Tested manually.
Created a merchant_account and updated the metadata to contain the field "compatible_connector": "stripe"
Created a payment and the webhook that was sent was stripe compatible.
image

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

@Abhicodes-crypto Abhicodes-crypto added A-core Area: Core flows S-waiting-on-review Status: This PR has been implemented and needs to be reviewed M-api-contract-changes Metadata: This PR involves API contract changes A-webhooks Area: Webhook flows labels Aug 22, 2023
@Abhicodes-crypto Abhicodes-crypto requested a review from a team as a code owner August 22, 2023 19:44
@Abhicodes-crypto Abhicodes-crypto self-assigned this Aug 22, 2023
@Abhicodes-crypto Abhicodes-crypto requested review from a team as code owners August 22, 2023 19:44
Narayanbhat166
Narayanbhat166 previously approved these changes Aug 23, 2023
@Narayanbhat166
Copy link
Member

please fix the failing checks

@inventvenkat inventvenkat added this pull request to the merge queue Aug 23, 2023
Merged via the queue into main with commit 36631ad Aug 23, 2023
11 of 13 checks passed
@inventvenkat inventvenkat deleted the compatible-webhooks-fix branch August 23, 2023 11:12
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows A-webhooks Area: Webhook flows M-api-contract-changes Metadata: This PR involves API contract changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants