diff --git a/config/development.toml b/config/development.toml index 4e2be24dda7b..e3a3019c1a58 100644 --- a/config/development.toml +++ b/config/development.toml @@ -56,7 +56,6 @@ max_feed_count = 200 [server] # HTTP Request body limit. Defaults to 32kB request_body_limit = 32768 -port=8082 [secrets] admin_api_key = "test_admin" diff --git a/crates/hyperswitch_connectors/src/connectors/jpmorgan.rs b/crates/hyperswitch_connectors/src/connectors/jpmorgan.rs index b761c71b0d1d..831e46f6c0e5 100644 --- a/crates/hyperswitch_connectors/src/connectors/jpmorgan.rs +++ b/crates/hyperswitch_connectors/src/connectors/jpmorgan.rs @@ -102,11 +102,14 @@ where ); let request_id = ( headers::REQUEST_ID.to_string(), - req.connector_request_reference_id.clone().to_string().into_masked() + req.connector_request_reference_id + .clone() + .to_string() + .into_masked(), ); let merchant_id = ( headers::MERCHANTID.to_string(), - req.merchant_id.get_string_repr().to_string().into_masked() + req.merchant_id.get_string_repr().to_string().into_masked(), ); headers.push(auth_header); headers.push(request_id); diff --git a/crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs b/crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs index 1f973a202e97..b8b257f0e692 100644 --- a/crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs +++ b/crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs @@ -137,11 +137,11 @@ impl TryFrom<&JpmorganRouterData<&PaymentsAuthorizeRouterData>> for JpmorganPaym ) -> Result { match item.router_data.request.payment_method_data.clone() { PaymentMethodData::Card(req_card) => { - if item.router_data.is_three_ds(){ - return Err(errors::ConnectorError::NotSupported{ - message : "Three_ds payments".to_string(), - connector : "Jpmorgan" - } + if item.router_data.is_three_ds() { + return Err(errors::ConnectorError::NotSupported { + message: "Three_ds payments".to_string(), + connector: "Jpmorgan", + } .into()); } let capture_method = if let Some(method) = item.router_data.request.capture_method { @@ -1049,7 +1049,7 @@ pub struct MerchantRefundReq { impl TryFrom<&JpmorganRouterData<&RefundsRouterData>> for JpmorganRefundRequest { type Error = error_stack::Report; - fn try_from(_item: &JpmorganRouterData<&RefundsRouterData>) -> Result { + fn try_from(_item: &JpmorganRouterData<&RefundsRouterData>) -> Result { Err(errors::ConnectorError::NotImplemented("Refunds".to_string()).into()) } } diff --git a/cypress-tests/cypress/e2e/PaymentUtils/Jpmorgan.js b/cypress-tests/cypress/e2e/PaymentUtils/Jpmorgan.js index ca7feefde51b..6d74f9a3da31 100644 --- a/cypress-tests/cypress/e2e/PaymentUtils/Jpmorgan.js +++ b/cypress-tests/cypress/e2e/PaymentUtils/Jpmorgan.js @@ -68,24 +68,6 @@ export const connectorDetails = { Request: { currency: "USD", payment_method: "card", - billing: { - address: { - line1: "1467", - line2: "CA", - line3: "CA", - city: "Musterhausen", - state: "California", - zip: "12345", - country: "US", - first_name: "John", - last_name: "Doe", - }, - email: "test@jpmorgan.us", - phone: { - number: "9123456789", - country_code: "+91", - }, - }, payment_method_data: { card: successfulNo3DSCardDetails, }, @@ -207,6 +189,9 @@ export const connectorDetails = { }, },*/ Refund: { + Configs: { + TRIGGER_SKIP: true, + }, Request: { payment_method: "card", payment_method_data: { @@ -217,14 +202,16 @@ export const connectorDetails = { Response: { status: 501, body: { - // status: "succeeded", type: "invalid_request", - message: "Refunds is not implemented", - code: "IR_00" + message: "Refunds is not implemented", + code: "IR_00", }, }, }, manualPaymentRefund: { + Configs: { + TRIGGER_SKIP: true, + }, Request: { payment_method: "card", payment_method_data: { @@ -236,12 +223,15 @@ export const connectorDetails = { status: 501, body: { type: "invalid_request", - message: "Refunds is not implemented", - code: "IR_00" + message: "Refunds is not implemented", + code: "IR_00", }, }, }, manualPaymentPartialRefund: { + Configs: { + TRIGGER_SKIP: true, + }, Request: { payment_method: "card", payment_method_data: { @@ -253,12 +243,15 @@ export const connectorDetails = { status: 501, body: { type: "invalid_request", - message: "Refunds is not implemented", - code: "IR_00" + message: "Refunds is not implemented", + code: "IR_00", }, }, }, PartialRefund: { + Configs: { + TRIGGER_SKIP: true, + }, Request: { payment_method: "card", payment_method_data: { @@ -270,8 +263,8 @@ export const connectorDetails = { status: 501, body: { type: "invalid_request", - message: "Refunds is not implemented", - code: "IR_00" + message: "Refunds is not implemented", + code: "IR_00", }, }, }, @@ -292,21 +285,17 @@ export const connectorDetails = { }, }*/ SyncRefund: { - Request: { - payment_method: "card", - payment_method_data: { - card: successfulNo3DSCardDetails, - }, - customer_acceptance: null, + Configs: { + TRIGGER_SKIP: true, }, Response: { status: 404, body: { - type: "undefined", + type: "invalid_request", message: "Refund does not exist in our records.", - code: "HE_02" + code: "HE_02", }, }, - } + }, }, }; diff --git a/cypress-tests/cypress/e2e/PaymentUtils/Utils.js b/cypress-tests/cypress/e2e/PaymentUtils/Utils.js index 6e494039beb6..3b4c9e5decf0 100644 --- a/cypress-tests/cypress/e2e/PaymentUtils/Utils.js +++ b/cypress-tests/cypress/e2e/PaymentUtils/Utils.js @@ -15,7 +15,7 @@ import { connectorDetails as fiservemeaConnectorDetails } from "./Fiservemea.js" import { connectorDetails as fiuuConnectorDetails } from "./Fiuu.js"; import { connectorDetails as iatapayConnectorDetails } from "./Iatapay.js"; import { connectorDetails as itaubankConnectorDetails } from "./ItauBank.js"; -import { connectorDetails as jpmorganConnectorDetails} from "./Jpmorgan.js"; +import { connectorDetails as jpmorganConnectorDetails } from "./Jpmorgan.js"; import { connectorDetails as nexixpayConnectorDetails } from "./Nexixpay.js"; import { connectorDetails as nmiConnectorDetails } from "./Nmi.js"; import { connectorDetails as noonConnectorDetails } from "./Noon.js"; @@ -37,7 +37,7 @@ const connectorDetails = { fiservemea: fiservemeaConnectorDetails, iatapay: iatapayConnectorDetails, itaubank: itaubankConnectorDetails, - jpmorgan : jpmorganConnectorDetails, + jpmorgan: jpmorganConnectorDetails, nexixpay: nexixpayConnectorDetails, nmi: nmiConnectorDetails, novalnet: novalnetConnectorDetails, diff --git a/cypress-tests/package-lock.json b/cypress-tests/package-lock.json index 4038f0866c07..252ab36ae9c3 100644 --- a/cypress-tests/package-lock.json +++ b/cypress-tests/package-lock.json @@ -833,6 +833,30 @@ "fsevents": "~2.3.2" } }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "peer": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/ci": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/ci/-/ci-2.3.0.tgz", + "integrity": "sha512-0MGXkzJKkwV3enG7RUxjJKdiAkbaZ7visCjitfpCN2BQjv02KGRMxCHLv4RPokkjJ4xR33FLMAXweS+aQ0pFSQ==", + "bin": { + "ci": "dist/cli.js" + }, + "funding": { + "url": "https://github.com/privatenumber/ci?sponsor=1" + } + }, "node_modules/ci-info": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.1.0.tgz",