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(connector): [Authorizedotnet]Fix webhooks #1261

Merged
merged 11 commits into from
May 25, 2023

Conversation

srujanchikke
Copy link
Contributor

@srujanchikke srujanchikke commented May 24, 2023

Type of Change

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

Description

Fix Webhooks for authorizedotnet

status mapping reference : https://developer.authorize.net/api/reference/features/webhooks.html#Event_Types_and_Payloads

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?

Payment
Screenshot 2023-05-25 at 12 12 45 AM
outgoing webhook for previous payment
Screenshot 2023-05-25 at 12 11 19 AM
Refund
Screenshot 2023-05-25 at 12 12 15 AM
outgoing Webhook for previously refunded transaction
Screenshot 2023-05-25 at 12 11 19 AM

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

Signed-off-by: chikke srujan <[email protected]>
Signed-off-by: chikke srujan <[email protected]>
@srujanchikke srujanchikke added A-connector-integration Area: Connector integration C-bug Category: Bug S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels May 24, 2023
@srujanchikke srujanchikke self-assigned this May 24, 2023
@srujanchikke srujanchikke requested review from a team, jarnura and ashokkjag as code owners May 24, 2023 19:25
jarnura
jarnura previously approved these changes May 25, 2023
Signed-off-by: chikke srujan <[email protected]>
impl From<AuthorizedotnetWebhookEvent> for SyncStatus {
fn from(event_type: AuthorizedotnetWebhookEvent) -> Self {
match event_type {
AuthorizedotnetWebhookEvent::AuthorizationCreated => Self::AuthorizedPendingCapture,
Copy link
Contributor

Choose a reason for hiding this comment

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

as discussed please map the status accordingly

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!

@jagan-jaya jagan-jaya enabled auto-merge May 25, 2023 07:45
@jagan-jaya jagan-jaya added this pull request to the merge queue May 25, 2023
@srujanchikke srujanchikke removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label May 25, 2023
Merged via the queue into main with commit 776c833 May 25, 2023
@SanchithHegde SanchithHegde deleted the fix_webhooks_for_authorizedotnet branch May 25, 2023 10:09
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.

4 participants