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(connector): [VOLT] Implement payment flows and bank redirect payment method #2582

Merged
merged 22 commits into from
Oct 30, 2023
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
89c7828
feat(connector): [VOLT] Implement bank redirect
swangi-kumari Oct 12, 2023
55f64a4
implement volt connector payment flows
swangi-kumari Oct 13, 2023
d11e9f0
docs(openapi): re-generate OpenAPI specification
github-actions[bot] Oct 13, 2023
9aab3f8
refactor: fix error messages
swangi-kumari Oct 13, 2023
734b633
Merge branch 'volt' of https://github.com/juspay/hyperswitch into volt
swangi-kumari Oct 13, 2023
40eec3b
removed unnessary comment
swangi-kumari Oct 16, 2023
9a150f5
Merge branch 'main' into volt
swangi-kumari Oct 17, 2023
d4ed524
resolve comments
swangi-kumari Oct 17, 2023
c8221da
Merge branch 'main' into volt
swangi-kumari Oct 19, 2023
2d47d44
Merge branch 'volt' of https://github.com/juspay/hyperswitch into volt
swangi-kumari Oct 19, 2023
259dbbf
fix: resolve comments
swangi-kumari Oct 20, 2023
0264012
Merge branch 'main' into volt
prasunna09 Oct 22, 2023
3d0b67b
refactor: fix payment status
swangi-kumari Oct 25, 2023
92ae8df
Merge branch 'main' into volt
swangi-kumari Oct 25, 2023
62c631a
refactor: remove rsync fun, fix error message, fix payment status
swangi-kumari Oct 25, 2023
19db82d
fix: resolve comments
swangi-kumari Oct 26, 2023
79ad261
fix: add settled payment status
swangi-kumari Oct 26, 2023
37c54b0
feat: add postman test cases
swangi-kumari Oct 27, 2023
e51802f
fix: updated connector auth file
swangi-kumari Oct 27, 2023
3086a3d
Merge branch 'main' into volt
swangi-kumari Oct 27, 2023
25e0c6b
fix: update connector auth file
swangi-kumari Oct 27, 2023
7ff277c
Merge branch 'main' into volt
swangi-kumari Oct 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions crates/router/src/connector/volt/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,19 @@ impl From<VoltPaymentStatus> for enums::AttemptStatus {
fn from(item: VoltPaymentStatus) -> Self {
match item {
VoltPaymentStatus::Completed => Self::Charged,
VoltPaymentStatus::Processing => Self::Pending,
VoltPaymentStatus::NewPayment | VoltPaymentStatus::Received => {
VoltPaymentStatus::Received
Copy link
Contributor

Choose a reason for hiding this comment

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

Please map this to Charged

| VoltPaymentStatus::NotReceived
Copy link
Contributor

Choose a reason for hiding this comment

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

Map this to Failure

| VoltPaymentStatus::DelayedAtBank
| VoltPaymentStatus::AwaitingCheckoutAuthorisation => Self::Pending,
Copy link
Contributor

Choose a reason for hiding this comment

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

AwaitingCheckoutAuthorisation should be mapped to AuthenticationPending

VoltPaymentStatus::NewPayment | VoltPaymentStatus::BankRedirect => {
Self::AuthenticationPending
}
VoltPaymentStatus::AbandonedByUser => Self::AuthenticationFailed,
VoltPaymentStatus::RefusedByBank
| VoltPaymentStatus::RefusedByRisk
| VoltPaymentStatus::ErrorAtBank
| VoltPaymentStatus::CancelledByUser
| VoltPaymentStatus::AbandonedByUser
| VoltPaymentStatus::Failed => Self::Failure,
}
}
}
Expand Down Expand Up @@ -289,8 +297,16 @@ pub enum VoltPaymentStatus {
NewPayment,
Completed,
Received,
NotReceived,
BankRedirect,
DelayedAtBank,
AwaitingCheckoutAuthorisation,
RefusedByBank,
RefusedByRisk,
ErrorAtBank,
CancelledByUser,
AbandonedByUser,
Processing,
Failed,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
Expand Down