Skip to content

Commit

Permalink
feat(connector): [Placetopay] Add Connector Template Code (#3084)
Browse files Browse the repository at this point in the history
Signed-off-by: chikke srujan <[email protected]>
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
  • Loading branch information
srujanchikke and hyperswitch-bot[bot] authored Dec 12, 2023
1 parent ab84f76 commit a7b688a
Show file tree
Hide file tree
Showing 21 changed files with 1,256 additions and 7 deletions.
1 change: 1 addition & 0 deletions config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ payeezy.base_url = "https://api-cert.payeezy.com/"
payme.base_url = "https://sandbox.payme.io/"
paypal.base_url = "https://api-m.sandbox.paypal.com/"
payu.base_url = "https://secure.snd.payu.com/"
placetopay.base_url = "https://api-co-dev.placetopay.ws/gateway"
powertranz.base_url = "https://staging.ptranz.com/api/"
prophetpay.base_url = "https://ccm-thirdparty.cps.golf/"
rapyd.base_url = "https://sandboxapi.rapyd.net"
Expand Down
2 changes: 2 additions & 0 deletions config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ cards = [
"payme",
"paypal",
"payu",
"placetopay",
"powertranz",
"prophetpay",
"shift4",
Expand Down Expand Up @@ -202,6 +203,7 @@ payeezy.base_url = "https://api-cert.payeezy.com/"
payme.base_url = "https://sandbox.payme.io/"
paypal.base_url = "https://api-m.sandbox.paypal.com/"
payu.base_url = "https://secure.snd.payu.com/"
placetopay.base_url = "https://api-co-dev.placetopay.ws/gateway"
powertranz.base_url = "https://staging.ptranz.com/api/"
prophetpay.base_url = "https://ccm-thirdparty.cps.golf/"
rapyd.base_url = "https://sandboxapi.rapyd.net"
Expand Down
2 changes: 2 additions & 0 deletions config/docker_compose.toml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ payeezy.base_url = "https://api-cert.payeezy.com/"
payme.base_url = "https://sandbox.payme.io/"
paypal.base_url = "https://api-m.sandbox.paypal.com/"
payu.base_url = "https://secure.snd.payu.com/"
placetopay.base_url = "https://api-co-dev.placetopay.ws/gateway"
powertranz.base_url = "https://staging.ptranz.com/api/"
prophetpay.base_url = "https://ccm-thirdparty.cps.golf/"
rapyd.base_url = "https://sandboxapi.rapyd.net"
Expand Down Expand Up @@ -201,6 +202,7 @@ cards = [
"payme",
"paypal",
"payu",
"placetopay",
"powertranz",
"prophetpay",
"shift4",
Expand Down
2 changes: 0 additions & 2 deletions connector-template/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ pub struct {{project-name | downcase | pascal_case}}PaymentsRequest {

#[derive(Default, Debug, Serialize, Eq, PartialEq)]
pub struct {{project-name | downcase | pascal_case}}Card {
name: Secret<String>,
number: cards::CardNumber,
expiry_month: Secret<String>,
expiry_year: Secret<String>,
Expand All @@ -56,7 +55,6 @@ impl TryFrom<&{{project-name | downcase | pascal_case}}RouterData<&types::Paymen
match item.router_data.request.payment_method_data.clone() {
api::PaymentMethodData::Card(req_card) => {
let card = {{project-name | downcase | pascal_case}}Card {
name: req_card.card_holder_name,
number: req_card.card_number,
expiry_month: req_card.card_exp_month,
expiry_year: req_card.card_exp_year,
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 @@ -109,6 +109,7 @@ pub enum Connector {
Payme,
Paypal,
Payu,
Placetopay,
Powertranz,
Prophetpay,
Rapyd,
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 @@ -142,6 +142,7 @@ pub enum RoutableConnectors {
Payme,
Paypal,
Payu,
Placetopay,
Powertranz,
Prophetpay,
Rapyd,
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 @@ -614,6 +614,7 @@ pub struct Connectors {
pub payme: ConnectorParams,
pub paypal: ConnectorParams,
pub payu: ConnectorParams,
pub placetopay: ConnectorParams,
pub powertranz: ConnectorParams,
pub prophetpay: ConnectorParams,
pub rapyd: ConnectorParams,
Expand Down
9 changes: 5 additions & 4 deletions crates/router/src/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ pub mod payeezy;
pub mod payme;
pub mod paypal;
pub mod payu;
pub mod placetopay;
pub mod powertranz;
pub mod prophetpay;
pub mod rapyd;
Expand Down Expand Up @@ -63,8 +64,8 @@ pub use self::{
globalpay::Globalpay, globepay::Globepay, gocardless::Gocardless, helcim::Helcim,
iatapay::Iatapay, klarna::Klarna, mollie::Mollie, multisafepay::Multisafepay,
nexinets::Nexinets, nmi::Nmi, noon::Noon, nuvei::Nuvei, opayo::Opayo, opennode::Opennode,
payeezy::Payeezy, payme::Payme, paypal::Paypal, payu::Payu, powertranz::Powertranz,
prophetpay::Prophetpay, rapyd::Rapyd, shift4::Shift4, signifyd::Signifyd, square::Square,
stax::Stax, stripe::Stripe, trustpay::Trustpay, tsys::Tsys, volt::Volt, wise::Wise,
worldline::Worldline, worldpay::Worldpay, zen::Zen,
payeezy::Payeezy, payme::Payme, paypal::Paypal, payu::Payu, placetopay::Placetopay,
powertranz::Powertranz, prophetpay::Prophetpay, rapyd::Rapyd, shift4::Shift4,
signifyd::Signifyd, square::Square, stax::Stax, stripe::Stripe, trustpay::Trustpay, tsys::Tsys,
volt::Volt, wise::Wise, worldline::Worldline, worldpay::Worldpay, zen::Zen,
};
Loading

0 comments on commit a7b688a

Please sign in to comment.