-
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(connector): [VOLT] Implement payment flows and bank redirect payment method #2582
Conversation
VoltPaymentStatus::Completed => Self::Charged, | ||
VoltPaymentStatus::NewPayment | ||
| VoltPaymentStatus::Processing | ||
| VoltPaymentStatus::Received => Self::AuthenticationPending, |
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.
What is the definition of Received
here?? if it is funds received then it should be mapped to Charged. Please confirm this.
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.
In Completed and Received Status payment will get Charged.
VoltPaymentStatus::NewPayment | ||
| VoltPaymentStatus::Processing | ||
| VoltPaymentStatus::Received => Self::AuthenticationPending, | ||
VoltPaymentStatus::AbandonedByUser => Self::AuthenticationFailed, | ||
} | ||
} | ||
} | ||
|
||
#[derive(Default, Debug, Clone, Serialize, Deserialize, PartialEq)] |
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.
same here.
Completed, | ||
Received, | ||
AbandonedByUser, | ||
#[default] |
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.
Please do not use default
ConnectorAuthType::MultiAuthKey { api_key, key1, .. } => Ok(Self { | ||
app_id: api_key, | ||
id: Some(key1), | ||
}), | ||
|
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.
Why was this added if you are not using this in Accesstoken tryFrom?
pub struct VoltPaymentsRequest { | ||
amount: i64, | ||
card: VoltCard, | ||
currency_code: String, |
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.
Use Currency enum instead of string
mandate_reference: None, | ||
connector_metadata: None, | ||
network_txn_id: None, | ||
connector_response_reference_id: None, |
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.
populate connector_response_reference_id
@@ -183,7 +363,7 @@ impl From<RefundStatus> for enums::RefundStatus { | |||
#[derive(Default, Debug, Clone, Serialize, Deserialize)] | |||
pub struct RefundResponse { | |||
id: String, | |||
status: RefundStatus, | |||
status: Option<RefundStatus>, |
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.
Use separate struct for Refund & RSync
VoltPaymentStatus::Completed => Self::Charged, | ||
VoltPaymentStatus::Processing => Self::Pending, | ||
VoltPaymentStatus::NewPayment | VoltPaymentStatus::Received => { | ||
Self::AuthenticationPending | ||
} | ||
VoltPaymentStatus::AbandonedByUser => Self::AuthenticationFailed, |
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.
Don't we have failure status ?
@swangi-kumari Since we are not clear with all Payment status and Error response structure, Let's raise this with connector. |
VoltPaymentStatus::Received | ||
| VoltPaymentStatus::NotReceived | ||
| VoltPaymentStatus::DelayedAtBank | ||
| VoltPaymentStatus::AwaitingCheckoutAuthorisation => Self::Pending, |
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.
AwaitingCheckoutAuthorisation should be mapped to AuthenticationPending
37c54b0
e51802f
@swangi-kumari, please update base branch to latest main to get spell-checks to pass. |
Done👍🏻 |
…ment method (#2582) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Prasunna Soppa <[email protected]>
Type of Change
Description
Implement payment flows and bank redirect payment method for Volt Connnector
This PR resolve the problem in 2859
Additional Changes
Motivation and Context
How did you test it?
Checklist
cargo +nightly fmt --all
cargo clippy