-
Notifications
You must be signed in to change notification settings - Fork 0
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
Hackathon h1016 l3 #3
base: main
Are you sure you want to change the base?
Conversation
@@ -152,6 +152,9 @@ base_url = "https://try.access.worldpay.com/" | |||
base_url = "https://apis.sandbox.globalpay.com/ucp/" | |||
|
|||
# This data is used to call respective connectors for wallets and cards | |||
[connectors.forte] | |||
base_url = "https://sandbox.forte.net/api/v3/organizations/org_436911/locations/loc_314200/transactions" |
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.
do not hardcode org id and location. save it in connector_meta while Payment Connector Create
@@ -519,6 +519,7 @@ pub enum Connector { | |||
Cybersource, | |||
#[default] | |||
Dummy, | |||
Forte, |
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.
run cargo clippy --all-features --all-targets && cargo +nightly fmt --all
and fix the formatting issues
@@ -153,6 +153,7 @@ pub struct Connectors { | |||
|
|||
// Keep this field separate from the remaining fields | |||
pub supported: SupportedConnectors, | |||
pub forte: ConnectorParams, |
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.
run cargo clippy --all-features --all-targets && cargo +nightly fmt --all
and fix the formatting issues and fix clippy warning if any
pub use self::{ | ||
aci::Aci, adyen::Adyen, applepay::Applepay, authorizedotnet::Authorizedotnet, | ||
braintree::Braintree, checkout::Checkout, cybersource::Cybersource, fiserv::Fiserv, | ||
globalpay::Globalpay, klarna::Klarna, payu::Payu, rapyd::Rapyd, shift4::Shift4, stripe::Stripe, | ||
worldline::Worldline, worldpay::Worldpay, | ||
forte::Forte, |
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.
run cargo clippy --all-features --all-targets && cargo +nightly fmt --all
and fix clippy warnings if any
// todo!() | ||
// let mut headers = vec![( | ||
// headers::CONTENT_TYPE.to_string(), | ||
// self.get_content_type().to_string(), | ||
// )]; | ||
// let access_token = _req | ||
// .access_token | ||
// .clone() | ||
// .ok_or(errors::ConnectorError::FailedToObtainAuthType)?; | ||
|
||
// let auth_header = ( | ||
// headers::AUTHORIZATION.to_string(), | ||
// format!("Basic {}", access_token.token), | ||
// ); | ||
|
||
// headers.push(auth_header); | ||
// Ok(headers)\ |
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.
// todo!() | |
// let mut headers = vec![( | |
// headers::CONTENT_TYPE.to_string(), | |
// self.get_content_type().to_string(), | |
// )]; | |
// let access_token = _req | |
// .access_token | |
// .clone() | |
// .ok_or(errors::ConnectorError::FailedToObtainAuthType)?; | |
// let auth_header = ( | |
// headers::AUTHORIZATION.to_string(), | |
// format!("Basic {}", access_token.token), | |
// ); | |
// headers.push(auth_header); | |
// Ok(headers)\ |
remove commented section
// status: FortePaymentStatus, | ||
// id: 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.
remove commented lines
cvv_result: String | ||
} | ||
|
||
//TODO: Fill the struct with respective fields |
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 todo
@@ -166,6 +166,7 @@ where | |||
let response = call_connector_api(state, request).await; | |||
match response { | |||
Ok(body) => { | |||
logger::debug!(response_response=?body); |
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 log
); | ||
} | ||
|
||
/*Commented the below test case because the forte pg doesn't work for the expiry year, they are sending it as approved itself, |
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 all the commented testcases below
@@ -84,6 +84,9 @@ base_url = "https://apple-pay-gateway.apple.com/" | |||
[connectors.klarna] | |||
base_url = "https://api-na.playground.klarna.com/" | |||
|
|||
[connectors.forte] | |||
base_url = "https://sandbox.forte.net/api/v3/organizations/org_436911/locations/loc_314200/transactions" |
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 the harcoded values and move it to connector meta
Type of Change
Description
Additional Changes
Motivation and Context
How did you test it?
Checklist
cargo +nightly fmt --all
cargo clippy