-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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(payout): [Payone] add payone connector #4553
Conversation
Required CI checks are failing, could you address that |
59714bb
to
4a9d2b1
Compare
message: errors | ||
.iter() | ||
.map(|error| format!("{} : {}", error.code, error.message)) | ||
.collect::<Vec<_>>() |
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.
Define the type of the vector
errors | ||
.iter() | ||
.map(|error| format!("{} : {}", error.code, error.message)) | ||
.collect::<Vec<_>>() |
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.
Define the type of the vector
let code = first_error.map(|error| error.code.clone()); | ||
Ok(ErrorResponse { | ||
status_code: res.status_code, | ||
code: code.unwrap_or_else(|| consts::NO_ERROR_CODE.to_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.
Discuss with @sai-harsha-vardhan , how retries work, and then decide how the error_code should be populated
_ => Err(errors::ConnectorError::NotImplemented( | ||
get_unimplemented_payment_method_error_message("Payone"), | ||
))?, | ||
} |
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.
Remove this default
}, | ||
PayoutMethodData::Bank(_) | PayoutMethodData::Wallet(_) => { | ||
Err(errors::ConnectorError::NotImplemented( | ||
get_unimplemented_payment_method_error_message("Payout"), |
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.
get_unimplemented_payment_method_error_message("Payout"), | |
get_unimplemented_payment_method_error_message("Payone"), |
1e02c9f
to
ce8e06f
Compare
…one-payout-flows
db4c30d
to
ee125bb
Compare
crates/router/src/macros.rs
Outdated
let format = time::macros::format_description!($date_format); | ||
time::OffsetDateTime::now_utc() | ||
.format(&format) | ||
.change_context(errors::ConnectorError::InvalidDateFormat) |
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.
Would have preferred using the fully qualified name for this error usage: router::core::errors::ConnectorError
.
Type of Change
Description
Payone is Payout connector and I have implemented payout fulfill flow
How did you test it?
I tested them through postman and here these are the requests and responses
Merchant Connector:
response:
Payout Creation:
response:
Additional Changes
Motivation and Context
4902
Checklist
cargo +nightly fmt --all
cargo clippy