Skip to content

feat(celero): CIT-MIT for celero (ALPHA CONNECTOR)#9026

Merged
likhinbopanna merged 8 commits into
mainfrom
celero_mit_alpha
Aug 29, 2025
Merged

feat(celero): CIT-MIT for celero (ALPHA CONNECTOR)#9026
likhinbopanna merged 8 commits into
mainfrom
celero_mit_alpha

Conversation

@Nithin1506200

@Nithin1506200 Nithin1506200 commented Aug 22, 2025

Copy link
Copy Markdown
Contributor

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

CIT-MIT implementation for CELERO (alpha connector)

DOCS

Caviats

  • Connector expecting initial_transaction_id which is nothing but prev txn id
  • Connector not returning payment_method_id or mandate_id

Note this is an alpha connector and we depend on alpha cypress test which

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@semanticdiff-com

semanticdiff-com Bot commented Aug 22, 2025

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_connectors/src/connectors/celero/transformers.rs  9% smaller

@Nithin1506200 Nithin1506200 linked an issue Aug 22, 2025 that may be closed by this pull request
2 tasks
@Nithin1506200 Nithin1506200 changed the title feature(celero): CIT-MIT for celero (ALPHA CONNECTOR) feat(celero): CIT-MIT for celero (ALPHA CONNECTOR) Aug 22, 2025
@Nithin1506200 Nithin1506200 marked this pull request as ready for review August 22, 2025 10:03
@Nithin1506200 Nithin1506200 requested a review from a team as a code owner August 22, 2025 10:03
let mut mandate_fields = CeleroMandateFields::default();

// Check if this is a mandate payment
if router_data.request.is_mandate_payment() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if is_mandate_payment returns true then it is a CIT

Comment on lines +300 to +315
} else if router_data.request.setup_mandate_details.is_some() {
// This is the initial transaction that will be used for future mandate payments
mandate_fields.card_on_file_indicator = Some(CardOnFileIndicator::RecurringPayment);
mandate_fields.initiated_by = Some(InitiatedBy::Customer);
mandate_fields.stored_credential_indicator = Some(StoredCredentialIndicator::Stored);
mandate_fields.billing_method = Some(BillingMethod::InitialRecurring);
} else if router_data.request.off_session.unwrap_or(false) {
// Off-session payment (merchant-initiated)
mandate_fields.card_on_file_indicator = Some(CardOnFileIndicator::GeneralPurposeStorage);
mandate_fields.initiated_by = Some(InitiatedBy::Merchant);
mandate_fields.stored_credential_indicator = Some(StoredCredentialIndicator::Used);
} else {
// Regular customer-initiated transaction
mandate_fields.initiated_by = Some(InitiatedBy::Customer);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This cases not required. For MIT check in payment method type if payment is of type mandate payment. Take reference from NMI

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes got it

AkshayaFoiger
AkshayaFoiger previously approved these changes Aug 25, 2025
AkshayaFoiger
AkshayaFoiger previously approved these changes Aug 25, 2025
@likhinbopanna likhinbopanna added this pull request to the merge queue Aug 29, 2025
Merged via the queue into main with commit 55d4d7b Aug 29, 2025
35 of 50 checks passed
@likhinbopanna likhinbopanna deleted the celero_mit_alpha branch August 29, 2025 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] CELERO CIT_MIT (ALPHACONNECTOR)

4 participants