Skip to content
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): [Stancer] Add authorize flow for Stancer #2876

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7bcdf45
add_connector.sh inital commit
Nov 2, 2023
3968eb6
Stancer API handles amount in lower unit (cents)
Nov 2, 2023
13e78e4
Enable capture methods as automatic, manual, manual multiple
Nov 2, 2023
8cc578b
Bearer token API auth
Nov 2, 2023
ed3ceda
Fill Stancer structs
Nov 2, 2023
9d0e640
maintain alphabetical order
Nov 20, 2023
72e8bc8
fix issie from add_connector.sh
Nov 20, 2023
258c64c
maintain alphabetical order
Nov 20, 2023
08c1f3e
maintain alphabetical order
Nov 20, 2023
748eb2a
fix typos
Nov 20, 2023
0c3f9de
useless use of snake_case
Nov 20, 2023
5860d47
merge main
rsecob Nov 23, 2023
1dfed33
add connector `stancer` with `add_connector` script + fix compilation…
rsecob Nov 24, 2023
d84f499
add stancer models
rsecob Nov 24, 2023
56ad320
set currency unit + format auth headers
rsecob Nov 22, 2023
6dc83d6
implement `ConnectorValidation`
rsecob Nov 23, 2023
28a4370
add generic error response
rsecob Nov 23, 2023
513fa44
change amount type in router data + transform `CreatePaymentRequest`
rsecob Nov 22, 2023
e810e25
tranform `Payment`
rsecob Nov 22, 2023
2a55bba
tranform `Refund`
rsecob Nov 23, 2023
bb921d9
update `get_url` for authorize flow
rsecob Nov 23, 2023
8628f97
update url for payment sync flow
rsecob Nov 23, 2023
611865e
transform `UpdatePaymentRequest` + update impl of capture flow
rsecob Nov 23, 2023
691123a
update url for refund & refund sync flows
rsecob Nov 23, 2023
4c9d433
add `ConnectorCustomer` flow
rsecob Nov 23, 2023
c388b27
remove duplicated urls
rsecob Nov 24, 2023
1eea005
downgrade 3ds request if not enrolled
rsecob Nov 24, 2023
b86aa9a
Merge branch 'main' into stancer
swangi-kumari Jan 18, 2024
dc71bd0
refactor: resolved conflicts and errors
swangi-kumari Jan 18, 2024
fc589e7
refactor: merged model.rs file in transformers.rs
swangi-kumari Jan 18, 2024
64017e2
refactor: resolve clippy warnings and openspecs
swangi-kumari Jan 18, 2024
f12d2d8
Merge branch 'main' into stancer
swangi-kumari Jan 18, 2024
e13ce0f
address comments
rsecob Feb 1, 2024
7de44d0
comment connector
rsecob Feb 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ optin = "optin" # Boku preflow name
optin_id = "optin_id" # Boku's id for optin flow
deriver = "deriver"
Deriver = "Deriver"
requestor_card_reference = "requestor_card_reference"
requestor_card_reference = "requestor_card_reference"
personnal = "personnal" #Stancer Nature
Personnal = "Personnal" #Stancer Nature

[default.extend-words]
aci = "aci" # Name of a connector
Expand Down
2 changes: 2 additions & 0 deletions config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ shift4.base_url = "https://api.shift4.com/"
signifyd.base_url = "https://api.signifyd.com/"
square.base_url = "https://connect.squareupsandbox.com/"
square.secondary_base_url = "https://pci-connect.squareupsandbox.com/"
stancer.base_url = "https://api.stancer.com/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since prod base url and sbx url is same,
we can add a note in wasm dashboard that api keys for test env starts with stest_xxx and for prod env starts with sprod_xxx to avoid making a actual payment in sbx if prod keys are configured.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, where is the wasm dashboard?

stax.base_url = "https://apiprod.fattlabs.com/"
stripe.base_url = "https://api.stripe.com/"
stripe.base_url_file_upload = "https://files.stripe.com/"
Expand Down Expand Up @@ -277,6 +278,7 @@ cards = [
"paypal",
"shift4",
"square",
"stancer",
"stax",
"stripe",
"worldpay",
Expand Down
2 changes: 2 additions & 0 deletions config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ cards = [
"prophetpay",
"shift4",
"square",
"stancer",
"stax",
"stripe",
"trustpay",
Expand Down Expand Up @@ -208,6 +209,7 @@ shift4.base_url = "https://api.shift4.com/"
signifyd.base_url = "https://api.signifyd.com/"
square.base_url = "https://connect.squareupsandbox.com/"
square.secondary_base_url = "https://pci-connect.squareupsandbox.com/"
stancer.base_url = "https://api.stancer.com/"
stax.base_url = "https://apiprod.fattlabs.com/"
stripe.base_url = "https://api.stripe.com/"
stripe.base_url_file_upload = "https://files.stripe.com/"
Expand Down
2 changes: 2 additions & 0 deletions config/docker_compose.toml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ shift4.base_url = "https://api.shift4.com/"
signifyd.base_url = "https://api.signifyd.com/"
square.base_url = "https://connect.squareupsandbox.com/"
square.secondary_base_url = "https://pci-connect.squareupsandbox.com/"
stancer.base_url = "https://api.stancer.com/"
stax.base_url = "https://apiprod.fattlabs.com/"
stripe.base_url = "https://api.stripe.com/"
stripe.base_url_file_upload = "https://files.stripe.com/"
Expand Down Expand Up @@ -203,6 +204,7 @@ cards = [
"prophetpay",
"shift4",
"square",
"stancer",
"stax",
"stripe",
"trustpay",
Expand Down
1 change: 1 addition & 0 deletions crates/api_models/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ pub enum Connector {
Rapyd,
Shift4,
Square,
Stancer,
Stax,
Stripe,
Trustpay,
Expand Down
1 change: 1 addition & 0 deletions crates/common_enums/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ pub enum RoutableConnectors {
Shift4,
Signifyd,
Square,
// Stancer,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to comment, it is not a template draft PR, we have the implementation of the connector.

Suggested change
// Stancer,
Stancer,

Stax,
Stripe,
Trustpay,
Expand Down
2 changes: 2 additions & 0 deletions crates/connector_configs/src/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ pub struct ConnectorConfig {
pub worldpay: Option<ConnectorTomlConfig>,
pub zen: Option<ConnectorTomlConfig>,
pub square: Option<ConnectorTomlConfig>,
pub stancer: Option<ConnectorTomlConfig>,
pub stax: Option<ConnectorTomlConfig>,
pub dummy_connector: Option<ConnectorTomlConfig>,
pub stripe_test: Option<ConnectorTomlConfig>,
Expand Down Expand Up @@ -246,6 +247,7 @@ impl ConnectorConfig {
Connector::Shift4 => Ok(connector_data.shift4),
Connector::Signifyd => Ok(connector_data.signifyd),
Connector::Square => Ok(connector_data.square),
Connector::Stancer => Ok(connector_data.stancer),
Connector::Stax => Ok(connector_data.stax),
Connector::Stripe => Ok(connector_data.stripe),
Connector::Trustpay => Ok(connector_data.trustpay),
Expand Down
1 change: 1 addition & 0 deletions crates/router/src/configs/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ pub struct Connectors {
pub shift4: ConnectorParams,
pub signifyd: ConnectorParams,
pub square: ConnectorParams,
pub stancer: ConnectorParams,
pub stax: ConnectorParams,
pub stripe: ConnectorParamsWithFileUploadUrl,
pub trustpay: ConnectorParamsWithMoreUrls,
Expand Down
5 changes: 3 additions & 2 deletions crates/router/src/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pub mod riskified;
pub mod shift4;
pub mod signifyd;
pub mod square;
pub mod stancer;
pub mod stax;
pub mod stripe;
pub mod trustpay;
Expand All @@ -67,7 +68,7 @@ pub use self::{
nexinets::Nexinets, nmi::Nmi, noon::Noon, nuvei::Nuvei, opayo::Opayo, opennode::Opennode,
payeezy::Payeezy, payme::Payme, paypal::Paypal, payu::Payu, placetopay::Placetopay,
powertranz::Powertranz, prophetpay::Prophetpay, rapyd::Rapyd, riskified::Riskified,
shift4::Shift4, signifyd::Signifyd, square::Square, stax::Stax, stripe::Stripe,
trustpay::Trustpay, tsys::Tsys, volt::Volt, wise::Wise, worldline::Worldline,
shift4::Shift4, signifyd::Signifyd, square::Square, stancer::Stancer, stax::Stax,
stripe::Stripe, trustpay::Trustpay, tsys::Tsys, volt::Volt, wise::Wise, worldline::Worldline,
worldpay::Worldpay, zen::Zen,
};
Loading
Loading