hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

feat(connector): [SCRIPT] Update add connector script with new connector features

Open swetasharma03 opened this issue 7 months ago • 1 comments

Type of Change

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

Description

  • Removed the unwanted changes (like addition of conector_name in RoutableConnectors enum, etc)
  • Amount convertor code is generated in the template
  • Connector Specification is also added in the template
  • Network error codes added
  • validate_mandate_payment, validate_psync_reference_id, toml files doesn't directly implements cards as supported payment method
  • The unit test file now generated directly to crates/router/tests/connectors etc
  • Code getting compiled directly after template generation.
  • Derive macro copy added for all unit types like enums which only have 1 type of data (eg payment status, refund status) and structs which only have primitive types like i64, u64 , bool, char or unit structs.

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

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

swetasharma03 avatar Jun 02 '25 20:06 swetasharma03

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_connectors/src/default_implementations.rs  2% smaller
  connector-template/mod.rs Unsupported file format
  connector-template/test.rs Unsupported file format
  connector-template/transformers.rs Unsupported file format
  scripts/add_connector.sh Unsupported file format

semanticdiff-com[bot] avatar Jun 02 '25 20:06 semanticdiff-com[bot]