generated from saleor/saleor-app-payment-template
-
Notifications
You must be signed in to change notification settings - Fork 0
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: authorize webhooks #57
Merged
Merged
Changes from 27 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
38ebc07
chore: :construction_worker: change ports on dev
peelar 75e03f4
Update @types/node to version 20.10.4
peelar a6e7ab8
Add signature key to app config and authorize-net config
peelar 085966f
Add webhooks to provider configuration
peelar 9f5d1b3
Add createAuthorizeWebhooksFetch function for Authorize.net webhooks …
peelar 879fb5a
Add AuthorizeNetWebhooksClient and refactor webhooks with AppInitializer
peelar bb503ba
refactor: :recycle: break up app-initializer
peelar 3f8a739
Refactor webhook registration and resolve app configuration
peelar e70f5cc
Rename AuthorizeWebhookInitializer -> AuthorizeWebhookManager
peelar c54a4c7
extract AuthorizeWebhookVerifier; merge app-configurator
peelar c296c71
Move around
peelar f230656
Update transaction webhook log messages
peelar f33f36a
Move AuthorizeNetWebhookManager class
peelar ad7bccf
Fix various bugs and refactor code
peelar e14ec6e
Add new webhook event for priorAuthCapture
peelar 7a77a4d
Refactor webhook signature verification and parsing
peelar 8012654
Refactor createTransaction method in CreateTransactionClient
peelar 4f90ee9
Remove logger.trace statement in TransactionInitializeSessionService
peelar 0592da7
Update AuthorizeNetWebhookManager eventTypes
peelar 8bc8503
Add Transaction GraphQL fragment
peelar 88ee402
Add synchronized transaction functionality
peelar e4f3784
Refactor hosted payment page settings, hide order details
peelar 53801ef
Refactor authorize-net-config and saleor-transaction-id-converter
peelar c63097b
Update README.md with Checkout UI instructions
peelar 5dd7355
add comment
peelar 3cec9d2
cleanup
peelar 9c2e467
fix test
peelar c6e645a
build: :construction_worker: add changeset
peelar a868e7e
Update env.mjs file with required variables
peelar 18b9826
Add micro package and its dependencies
peelar f92db39
Make webhook verification work
peelar 9bbd123
address pr feedback
peelar a0db74e
Update amount in transaction initialize session webhook
peelar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
Important: | ||
|
||
- Checkout UI relies on "Authorize transactions instead of charging" in the Saleor Dashboard -> Configuration -> Channels -> [channel] settings. | ||
- The `example` Checkout UI relies on the "Authorize transactions instead of charging" setting in the Saleor Dashboard -> Configuration -> Channels -> [channel] settings. | ||
|
||
- The Saleor transaction id is stored in Authorize transaction `order.description`. Ideally, we would store it in `refId` but that field is max. 20 characters long and the Saleor transaction id is longer than that. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
fragment Transaction on TransactionItem { | ||
id | ||
pspReference | ||
sourceObject: order { | ||
... on Order { | ||
total { | ||
gross { | ||
...Money | ||
} | ||
} | ||
} | ||
...OrderOrCheckoutLines | ||
} | ||
privateMetadata { | ||
key | ||
value | ||
} | ||
authorizedAmount { | ||
amount | ||
currency | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
}, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "pnpm generate && next dev", | ||
"dev": "pnpm generate && next dev --port 8000", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please mention the ports in the readme |
||
"build": "pnpm generate && next build", | ||
"deploy": "tsx ./src/deploy.ts", | ||
"start": "next start", | ||
|
@@ -108,7 +108,7 @@ | |
"@types/authorizenet": "1.0.1", | ||
"@types/bluebird": "3.5.38", | ||
"@types/lodash-es": "4.17.8", | ||
"@types/node": "20.5.4", | ||
"@types/node": "20.10.4", | ||
"@types/omit-deep-lodash": "1.1.1", | ||
"@types/react": "18.2.21", | ||
"@types/react-dom": "18.2.7", | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💪