-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 payments post_session_tokens flow #6202
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
0265c1d
feat: add order_create_endpoint
swangi-kumari e343022
refactor: paypal sdk via create order
swangi-kumari bae1ed8
refactor: merge main
swangi-kumari 3eea57a
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] 97b7104
feat: post update tracker for craete order
swangi-kumari 902b799
Merge branch 'create-order' of https://github.com/juspay/hyperswitch …
swangi-kumari 1cd705b
refactor: next action
swangi-kumari 1e258a8
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] 99a03bf
Merge branch 'main' into create-order
swangi-kumari 6071f12
refactor: some refactor
swangi-kumari 1563a0b
refactor: rename to post_session_tokens
swangi-kumari 990a535
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] abf5f65
refactor: status of paymene attempt
swangi-kumari bfe5bec
refactor: refactor post_update_trackers
swangi-kumari 5aa4a7a
refactor: add dynamic fields
swangi-kumari 7235dac
refactor: paypal paymnet succeeded
swangi-kumari 2bda2ef
Merge branch 'main' of https://github.com/juspay/hyperswitch into cre…
swangi-kumari 5b57ae3
refactor: mereg main
swangi-kumari f4cd68f
chore: run formatter
hyperswitch-bot[bot] 6b14707
refactor: formating
swangi-kumari 5a0b776
Merge branch 'create-order' of https://github.com/juspay/hyperswitch …
swangi-kumari 6b3fcc0
Merge branch 'main' into create-order
swangi-kumari 1f152c1
refactor: solve clippy
swangi-kumari 5ff5f6f
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] f463adf
refactor: some refactor
swangi-kumari e93d487
Merge branch 'create-order' of https://github.com/juspay/hyperswitch …
swangi-kumari 4833097
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] a4044a8
refactor: remove shipping cost
swangi-kumari 42aee19
Merge branch 'create-order' of https://github.com/juspay/hyperswitch …
swangi-kumari 04b3afe
refactor: open api
swangi-kumari ebf6d43
refactor: store connector_transaction_id in connector_metadata
swangi-kumari e88f86e
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] 5a2f0f1
Merge branch 'main' into create-order
swangi-kumari 6117ddf
refactor: resolve comments
swangi-kumari d34a704
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] 2976976
refactor: add status
swangi-kumari 7a68862
Merge branch 'create-order' of https://github.com/juspay/hyperswitch …
swangi-kumari d3da258
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] 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
3 changes: 3 additions & 0 deletions
3
api-reference/api-reference/payments/payments--post-session-tokens.mdx
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,3 @@ | ||
--- | ||
openapi: post /payments/{payment_id}/post_session_tokens | ||
--- |
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 |
---|---|---|
|
@@ -3819,6 +3819,7 @@ pub enum QrCodeInformation { | |
#[serde(rename_all = "snake_case")] | ||
pub struct SdkNextActionData { | ||
pub next_action: NextActionCall, | ||
pub order_id: Option<String>, | ||
} | ||
|
||
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)] | ||
|
@@ -4873,6 +4874,34 @@ pub struct PaymentsSessionRequest { | |
pub merchant_connector_details: Option<admin::MerchantConnectorDetailsWrap>, | ||
} | ||
|
||
#[derive(Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)] | ||
pub struct PaymentsPostSessionTokensRequest { | ||
/// The unique identifier for the payment | ||
#[serde(skip_deserializing)] | ||
#[schema(value_type = String)] | ||
pub payment_id: id_type::PaymentId, | ||
/// It's a token used for client side verification. | ||
#[schema(value_type = String)] | ||
pub client_secret: Secret<String>, | ||
/// Payment method type | ||
#[schema(value_type = PaymentMethodType)] | ||
pub payment_method_type: api_enums::PaymentMethodType, | ||
/// The payment method that is to be used for the payment | ||
#[schema(value_type = PaymentMethod, example = "card")] | ||
pub payment_method: api_enums::PaymentMethod, | ||
} | ||
|
||
#[derive(Debug, serde::Serialize, Clone, ToSchema)] | ||
pub struct PaymentsPostSessionTokensResponse { | ||
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. are we using this response anywhere? I think we are sending the payments response. Instead of that can we use this struct? |
||
/// The identifier for the payment | ||
#[schema(value_type = String)] | ||
pub payment_id: id_type::PaymentId, | ||
/// Additional information required for redirection | ||
pub next_action: Option<NextActionData>, | ||
#[schema(value_type = IntentStatus, example = "failed", default = "requires_confirmation")] | ||
pub status: api_enums::IntentStatus, | ||
} | ||
|
||
#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, ToSchema)] | ||
pub struct PaymentsDynamicTaxCalculationRequest { | ||
/// The unique identifier for the payment | ||
|
@@ -5429,6 +5458,8 @@ pub struct SdkNextAction { | |
#[derive(Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize, Clone, ToSchema)] | ||
#[serde(rename_all = "snake_case")] | ||
pub enum NextActionCall { | ||
/// The next action call is Post Session Tokens | ||
PostSessionTokens, | ||
/// The next action call is confirm | ||
Confirm, | ||
/// The next action call is sync | ||
|
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
Oops, something went wrong.
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.
If we're not obtaining this from the request (not deserializing it), why are we including it in the request?
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.
This is for ApiEventMetrics and ApiLocking
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.
@Narayanbhat166 Should we consider having an "internal" struct for such purposes, or are we okay with this practice?