mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
feat(stripe): add setup intent in connector integration (stripe) (#50)
Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
@ -118,6 +118,12 @@ pub(crate) enum ErrorCode {
|
||||
)]
|
||||
PaymentFailed,
|
||||
|
||||
#[error(
|
||||
error_type = StripeErrorType::InvalidRequestError, code = "",
|
||||
message = "The verification did not succeeded"
|
||||
)]
|
||||
VerificationFailed { data: Option<serde_json::Value> },
|
||||
|
||||
#[error(
|
||||
error_type = StripeErrorType::InvalidRequestError, code = "",
|
||||
message = "Reached maximum refund attempts"
|
||||
@ -322,6 +328,7 @@ impl From<ApiErrorResponse> for ErrorCode {
|
||||
| ApiErrorResponse::PaymentAuthenticationFailed { data } => {
|
||||
ErrorCode::PaymentIntentAuthenticationFailure { data }
|
||||
}
|
||||
ApiErrorResponse::VerificationFailed { data } => ErrorCode::VerificationFailed { data },
|
||||
ApiErrorResponse::PaymentCaptureFailed { data } => {
|
||||
ErrorCode::PaymentIntentPaymentAttemptFailed { data }
|
||||
}
|
||||
@ -408,6 +415,7 @@ impl actix_web::ResponseError for ErrorCode {
|
||||
| ErrorCode::DuplicateMerchantConnectorAccount
|
||||
| ErrorCode::DuplicatePaymentMethod
|
||||
| ErrorCode::PaymentFailed
|
||||
| ErrorCode::VerificationFailed { .. }
|
||||
| ErrorCode::MaximumRefundCount
|
||||
| ErrorCode::PaymentIntentInvalidParameter { .. }
|
||||
| ErrorCode::SerdeQsError { .. }
|
||||
|
||||
Reference in New Issue
Block a user