Skip to content

Commit

Permalink
new changes 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Sayak Bhattacharya authored and Sayak Bhattacharya committed Dec 6, 2024
1 parent 682a9a1 commit a818e57
Show file tree
Hide file tree
Showing 9 changed files with 335 additions and 702 deletions.
4 changes: 4 additions & 0 deletions config/deployments/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ debit.currency = "USD"
ali_pay.currency = "GBP,CNY"
we_chat_pay.currency = "GBP,CNY"

[pm.filters.jpmorgan]
debit = { country = "CA, EU, UK, US", currency = "AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STN, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW" }
credit = { country = "CA, EU, UK, US", currency = "AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STN, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW" }

[pm_filters.klarna]
klarna = { country = "AU,AT,BE,CA,CZ,DK,FI,FR,DE,GR,IE,IT,NL,NZ,NO,PL,PT,ES,SE,CH,GB,US", currency = "CHF,DKK,EUR,GBP,NOK,PLN,SEK,USD,AUD,NZD,CAD" }

Expand Down
9 changes: 4 additions & 5 deletions crates/hyperswitch_connectors/src/connectors/jpmorgan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ where
.into_masked(),
);
let merchant_id = (
headers::MERCHANTID.to_string(),
headers::MERCHANT_ID.to_string(),
req.merchant_id.get_string_repr().to_string().into_masked(),
);
headers.push(auth_header);
Expand Down Expand Up @@ -191,10 +191,9 @@ impl ConnectorValidation for Jpmorgan {
match capture_method {
enums::CaptureMethod::Automatic | enums::CaptureMethod::Manual => Ok(()),
//enums::CaptureMethod::ManualMultiple |
enums::CaptureMethod::Scheduled => Err(utils::construct_not_implemented_error_report(
capture_method,
self.id(),
)),
enums::CaptureMethod::Scheduled | enums::CaptureMethod::SequentialAutomatic => Err(
utils::construct_not_implemented_error_report(capture_method, self.id()),
),
enums::CaptureMethod::ManualMultiple => Err(errors::ConnectorError::NotImplemented(
//ManualMultiple unimplemented
utils::get_unimplemented_payment_method_error_message("Jpmorgan"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ fn map_capture_method(capture_method: enums::CaptureMethod) -> String {
enums::CaptureMethod::Manual | enums::CaptureMethod::ManualMultiple => {
String::from("MANUAL")
}
enums::CaptureMethod::Scheduled => String::from("DELAYED"),
enums::CaptureMethod::Scheduled | enums::CaptureMethod::SequentialAutomatic => {
String::from("DELAYED")
}
}
}

Expand Down
1 change: 0 additions & 1 deletion crates/hyperswitch_connectors/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ pub(crate) mod headers {
pub(crate) const IDEMPOTENCY_KEY: &str = "Idempotency-Key";
pub(crate) const MESSAGE_SIGNATURE: &str = "Message-Signature";
pub(crate) const MERCHANT_ID: &str = "Merchant-ID";
pub(crate) const MERCHANTID: &str = "merchant-id";
pub(crate) const REQUEST_ID: &str = "request-id";
pub(crate) const NONCE: &str = "nonce";
pub(crate) const TIMESTAMP: &str = "Timestamp";
Expand Down
1 change: 0 additions & 1 deletion crates/router/src/core/payments/flows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,6 @@ default_imp_for_payouts!(
connector::Gpayments,
connector::Iatapay,
connector::Itaubank,
//connector::Jpmorgan,
connector::Klarna,
connector::Mifinity,
connector::Netcetera,
Expand Down
15 changes: 1 addition & 14 deletions cypress-tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions cypress-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,5 @@
"globals": "^15.13.0",
"jsqr": "^1.4.0",
"prettier": "^3.4.1"
},
"dependencies": {
"ci": "^2.3.0"
}
}
Loading

0 comments on commit a818e57

Please sign in to comment.