refactor(connector): use utility function to raise payment method not implemented errors (#1847)

Co-authored-by: Arjun Karthik <m.arjunkarthik@gmail.com>
This commit is contained in:
Swangi Kumari
2023-08-03 18:16:37 +05:30
committed by GitHub
parent 80b74e096d
commit f2fcc2595a
8 changed files with 542 additions and 82 deletions

View File

@ -74,6 +74,10 @@ pub trait RouterData {
fn get_quote_id(&self) -> Result<String, Error>;
}
pub fn get_unimplemented_payment_method_error_message(connector: &str) -> String {
format!("Selected paymemt method through {}", connector)
}
impl<Flow, Request, Response> RouterData for types::RouterData<Flow, Request, Response> {
fn get_billing(&self) -> Result<&api::Address, Error> {
self.address