Skip to content

Commit 22520b5

Browse files
Merge branch 'main' into globalpay-grace-implementation
2 parents 991e704 + 2711139 commit 22520b5

File tree

102 files changed

+4635
-906
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+4635
-906
lines changed

.github/test/template_creds.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"bluecode": {
3+
"connector_account_details": {
4+
"auth_type": "HeaderKey",
5+
"api_key": "test_bluecode_api_key"
6+
},
7+
"metadata": {
8+
"shop_name": "test_shop_name"
9+
}
10+
},
11+
"authorizedotnet": {
12+
"connector_account_details": {
13+
"auth_type": "BodyKey",
14+
"api_key": "test_authorizedotnet_api_key",
15+
"key1": "test_authorizedotnet_key1"
16+
},
17+
"metadata": {
18+
"webhook_secret": "test_webhook_secret",
19+
"transaction_key": "test_transaction_key"
20+
}
21+
},
22+
"fiserv": {
23+
"connector_account_details": {
24+
"auth_type": "SignatureKey",
25+
"api_key": "test_fiserv_api_key",
26+
"key1": "test_fiserv_key1",
27+
"api_secret": "test_fiserv_api_secret"
28+
},
29+
"metadata": {
30+
"terminal_id": "test_terminal_id"
31+
}
32+
},
33+
"cashtocode": {
34+
"connector_account_details": {
35+
"auth_type": "CurrencyAuthKey",
36+
"auth_key_map": {
37+
"USD": {
38+
"password_evoucher": "test_usd_password_evoucher",
39+
"username_evoucher": "test_usd_username_evoucher",
40+
"merchant_id_evoucher": "test_usd_merchant_id_evoucher"
41+
}
42+
}
43+
}
44+
}
45+
}

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
CONNECTOR_AUTH_PASSPHRASE: ${{ secrets.CONNECTOR_AUTH_PASSPHRASE }}
109109
CONNECTOR_CREDS_S3_BUCKET_URI: ${{ secrets.CONNECTOR_CREDS_S3_BUCKET_URI}}
110110
DESTINATION_FILE_NAME: "creds.json.gpg"
111-
S3_SOURCE_FILE_NAME: "9f00461f-5a48-4f9c-aa8c-3510e4cb7d9c.json.gpg"
111+
S3_SOURCE_FILE_NAME: "1a2fe2af-cfdf-477d-8d32-3e64a46d3d85.json.gpg"
112112
shell: bash
113113
run: |
114114
mkdir -p ".github/secrets" ".github/test"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,9 @@ $RECYCLE.BIN/
406406
**/*.swo
407407
**/.env.local
408408

409+
# Credentials files
410+
.github/test/creds.json
411+
409412
# DrawIO files
410413
**/*.drawio.bkp
411414
gen/**

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ All notable changes to Connector Service will be documented here.
44

55
- - -
66

7+
## 2025.11.10.0
8+
9+
### Features
10+
11+
- **connector:** [payload] implement core flows, card payment method and webhooks ([#249](https://github.com/juspay/connector-service/pull/249)) ([`aacf887`](https://github.com/juspay/connector-service/commit/aacf8878e790af265bab32c2653bd78956044951))
12+
13+
### Refactors
14+
15+
- Use typed connector response with masking for events ([#256](https://github.com/juspay/connector-service/pull/256)) ([`58e4b93`](https://github.com/juspay/connector-service/commit/58e4b93c3ea3d68fa8d3bed332eae98ec6e61afd))
16+
17+
**Full Changelog:** [`2025.11.05.0...2025.11.10.0`](https://github.com/juspay/connector-service/compare/2025.11.05.0...2025.11.10.0)
18+
19+
- - -
20+
721
## 2025.11.05.0
822

923
### Documentation

backend/common_utils/src/events.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,10 @@ impl Event {
256256
self.response_data =
257257
MaskedSerdeValue::from_masked_optional(response, "grpc_success_response");
258258
}
259+
260+
pub fn set_connector_response<R: Serialize>(&mut self, response: &R) {
261+
self.response_data = MaskedSerdeValue::from_masked_optional(response, "connector_response");
262+
}
259263
}
260264

261265
#[derive(strum::Display)]

backend/connector-integration/src/connectors.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,6 @@ pub use self::worldpayvantiv::Worldpayvantiv;
9494

9595
pub mod globalpay;
9696
pub use self::globalpay::Globalpay;
97+
98+
pub mod payload;
99+
pub use self::payload::Payload;

backend/connector-integration/src/connectors/aci.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pub mod aci_result_codes;
22
pub mod transformers;
33

4-
use common_utils::{errors::CustomResult, ext_traits::ByteSliceExt, StringMajorUnit};
4+
use common_utils::{errors::CustomResult, events, ext_traits::ByteSliceExt, StringMajorUnit};
55
use domain_types::{
66
connector_flow::{
77
Accept, Authenticate, Authorize, Capture, CreateAccessToken, CreateConnectorCustomer,
@@ -31,7 +31,6 @@ use error_stack::ResultExt;
3131
use hyperswitch_masking::{Mask, Maskable, PeekInterface};
3232
use interfaces::{
3333
api::ConnectorCommon, connector_integration_v2::ConnectorIntegrationV2, connector_types,
34-
events::connector_api_logs::ConnectorEvent,
3534
};
3635

3736
use common_enums::CurrencyUnit;
@@ -191,7 +190,7 @@ impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize> Conn
191190
fn build_error_response(
192191
&self,
193192
res: Response,
194-
event_builder: Option<&mut ConnectorEvent>,
193+
event_builder: Option<&mut events::Event>,
195194
) -> CustomResult<ErrorResponse, errors::ConnectorError> {
196195
let response: aci::AciErrorResponse = res
197196
.response

backend/connector-integration/src/connectors/adyen.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ use common_enums::{
1010
AttemptStatus, CaptureMethod, CardNetwork, EventClass, PaymentMethod, PaymentMethodType,
1111
};
1212
use common_utils::{
13-
errors::CustomResult, ext_traits::ByteSliceExt, pii::SecretSerdeValue, types::StringMinorUnit,
13+
errors::CustomResult, events, ext_traits::ByteSliceExt, pii::SecretSerdeValue,
14+
types::StringMinorUnit,
1415
};
1516
use domain_types::{
1617
connector_flow::{
@@ -50,7 +51,6 @@ use interfaces::{
5051
api::ConnectorCommon,
5152
connector_integration_v2::ConnectorIntegrationV2,
5253
connector_types::{self, is_mandate_supported, ConnectorValidation},
53-
events::connector_api_logs::ConnectorEvent,
5454
};
5555
use serde::Serialize;
5656
use transformers::{
@@ -297,7 +297,7 @@ impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize> Conn
297297
fn build_error_response(
298298
&self,
299299
res: Response,
300-
event_builder: Option<&mut ConnectorEvent>,
300+
event_builder: Option<&mut events::Event>,
301301
) -> CustomResult<ErrorResponse, errors::ConnectorError> {
302302
let response: adyen::AdyenErrorResponse = res
303303
.response

backend/connector-integration/src/connectors/adyen/transformers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ pub struct RiskData {
272272
#[serde(rename = "riskdata.promotionName")]
273273
promotion_name: Option<String>,
274274
#[serde(rename = "riskdata.secondaryPhoneNumber")]
275-
secondary_phone_number: Option<String>,
275+
secondary_phone_number: Option<Secret<String>>,
276276
#[serde(rename = "riskdata.timefromLogintoOrder")]
277277
timefrom_loginto_order: Option<String>,
278278
#[serde(rename = "riskdata.totalSessionTime")]
@@ -1935,7 +1935,7 @@ pub fn get_risk_data(metadata: serde_json::Value) -> Option<RiskData> {
19351935
merchant_reference,
19361936
payment_method,
19371937
promotion_name,
1938-
secondary_phone_number,
1938+
secondary_phone_number: secondary_phone_number.map(Secret::new),
19391939
timefrom_loginto_order,
19401940
total_session_time,
19411941
total_authorized_amount_in_last30_days,

backend/connector-integration/src/connectors/authorizedotnet.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ pub mod transformers;
22

33
use common_enums;
44
use common_utils::{
5-
consts, errors::CustomResult, ext_traits::ByteSliceExt, request::RequestContent,
5+
consts, errors::CustomResult, events, ext_traits::ByteSliceExt, request::RequestContent,
66
types::FloatMajorUnit,
77
};
88
use domain_types::{
@@ -44,7 +44,6 @@ use interfaces::{
4444
PaymentVoidV2, RefundSyncV2, RefundV2, RepeatPaymentV2, SetupMandateV2, SubmitEvidenceV2,
4545
ValidationTrait,
4646
},
47-
events::connector_api_logs::ConnectorEvent,
4847
verification::SourceVerification,
4948
};
5049
use serde::Serialize;
@@ -531,7 +530,7 @@ impl<
531530
fn build_error_response(
532531
&self,
533532
res: Response,
534-
event_builder: Option<&mut ConnectorEvent>,
533+
event_builder: Option<&mut events::Event>,
535534
) -> CustomResult<ErrorResponse, errors::ConnectorError> {
536535
let response: transformers::ResponseMessages = res
537536
.response

0 commit comments

Comments
 (0)