Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(connector): [DEUTSCHEBANK] Integrate SEPA Payments #5826

Merged
merged 19 commits into from
Sep 13, 2024

Conversation

deepanshu-iiitu
Copy link
Contributor

@deepanshu-iiitu deepanshu-iiitu commented Sep 6, 2024

Type of Change

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

Description

Integrate SEPA Payments for connector Deutsche Bank
https://testmerch.directpos.de/rest-api/apidoc/v2.1/index.html#chap_sdd

Additional Changes

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

Motivation and Context

#5858

How did you test it?

  1. Authorize:
    Request:
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_2QpEeK0ByPRkb2DPBxHfad4i1WxQO3hZSuVzlFcg9mTrLFUHRpGfE0SCuQwZjGEb' \
--data '{
    "amount": 9000,
    "currency": "EUR",
    "confirm": true,
    "profile_id": "pro_EuXuxP2KVO0m1tlDWSau",
    "customer_id": "customer123",
    
    "payment_method": "bank_debit",
    "payment_method_type": "sepa",
    "payment_method_data": {
        "bank_debit": {
            "sepa_bank_debit": {
                "iban": "DE87123456781234567890"
            }
        }
    },
    "billing": {
        "address": {
            "first_name": "joseph",
            "last_name": "Doe"
        }
    },
}'

Response:

{
    "payment_id": "pay_9SIimBI1UXiGdsR4XCmH",
    "merchant_id": "merchant_1725539597",
    "status": "requires_customer_action",
    "amount": 9000,
    "net_amount": 9000,
    "amount_capturable": 9000,
    "amount_received": null,
    "connector": "deutschebank",
    "client_secret": "pay_9SIimBI1UXiGdsR4XCmH_secret_s0dXk9MNEsKru7clJoNK",
    "created": "2024-09-12T10:41:39.816Z",
    "currency": "EUR",
    "customer_id": "customer123",
    "customer": {
        "id": "customer123",
        "name": "John Doe",
        "email": "customer@gmail.com",
        "phone": "9999999999",
        "phone_country_code": "+1"
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": null,
    "payment_method": "bank_debit",
    "payment_method_data": {
        "bank_debit": {
            "sepa": {
                "iban": "DE871************67890",
                "bank_account_holder_name": null
            }
        },
        "billing": null
    },
    "payment_token": "token_IORpLx2lNN9VK64COwy0",
    "shipping": null,
    "billing": {
        "address": {
            "city": null,
            "country": null,
            "line1": null,
            "line2": null,
            "line3": null,
            "zip": null,
            "state": null,
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": "customer@gmail.com",
    "name": "John Doe",
    "phone": "9999999999",
    "return_url": "https://example.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": {
        "type": "redirect_to_url",
        "redirect_to_url": "http://localhost:8080/payments/redirect/pay_9SIimBI1UXiGdsR4XCmH/merchant_1725539597/pay_9SIimBI1UXiGdsR4XCmH_1"
    },
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "sepa",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "customer123",
        "created_at": 1726137699,
        "expires": 1726141299,
        "secret": "epk_a677e949924b417cb73e1badf1ac05f8"
    },
    "manual_retry_allowed": null,
    "connector_transaction_id": null,
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_EuXuxP2KVO0m1tlDWSau",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_MZAsrTowXuzpeXl4DMj2",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-09-12T10:56:39.816Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2024-09-12T10:41:42.563Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null
}

Then do redirection

  1. PSYNC:
    Request:
curl --location 'http://localhost:8080/payments/pay_aCYBEjtBmw7l7u4jQWhM' \
--header 'Accept: application/json' \
--header 'api-key: dev_2QpEeK0ByPRkb2DPBxHfad4i1WxQO3hZSuVzlFcg9mTrLFUHRpGfE0SCuQwZjGEb'

Response:

{
    "payment_id": "pay_aCYBEjtBmw7l7u4jQWhM",
    "merchant_id": "merchant_1725539597",
    "status": "succeeded",
    "amount": 9000,
    "net_amount": 9000,
    "amount_capturable": 0,
    "amount_received": 9000,
    "connector": "deutschebank",
    "client_secret": "pay_aCYBEjtBmw7l7u4jQWhM_secret_4TLRv0W2zGPEaN5hxwOC",
    "created": "2024-09-12T10:32:33.053Z",
    "currency": "EUR",
    "customer_id": "customer123",
    "customer": {
        "id": "customer123",
        "name": "John Doe",
        "email": "customer@gmail.com",
        "phone": "9999999999",
        "phone_country_code": "+1"
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": null,
    "payment_method": "bank_debit",
    "payment_method_data": {
        "bank_debit": {
            "sepa": {
                "iban": "DE871************67890",
                "bank_account_holder_name": null
            }
        },
        "billing": null
    },
    "payment_token": "token_1gP6ixqxxYORXgW6mAxq",
    "shipping": null,
    "billing": {
        "address": {
            "city": null,
            "country": null,
            "line1": null,
            "line2": null,
            "line3": null,
            "zip": null,
            "state": null,
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": "customer@gmail.com",
    "name": "John Doe",
    "phone": "9999999999",
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "sepa",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": null,
    "manual_retry_allowed": false,
    "connector_transaction_id": "fNo3C3goIky4BNzSU7ys9n",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_EuXuxP2KVO0m1tlDWSau",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_MZAsrTowXuzpeXl4DMj2",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-09-12T10:47:33.053Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2024-09-12T10:40:37.356Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null
}
  1. Capture:
    Request:
curl --location 'http://localhost:8080/payments/pay_zwqrtx6EMgaV2gkK7WdS/capture' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_2QpEeK0ByPRkb2DPBxHfad4i1WxQO3hZSuVzlFcg9mTrLFUHRpGfE0SCuQwZjGEb' \
--data '{}'

Response:

{
    "payment_id": "pay_zwqrtx6EMgaV2gkK7WdS",
    "merchant_id": "merchant_1725539597",
    "status": "succeeded",
    "amount": 9000,
    "net_amount": 9000,
    "amount_capturable": 0,
    "amount_received": 9000,
    "connector": "deutschebank",
    "client_secret": "pay_zwqrtx6EMgaV2gkK7WdS_secret_Br19bUUvGCMLAiG1Fusv",
    "created": "2024-09-12T10:42:41.662Z",
    "currency": "EUR",
    "customer_id": "customer123",
    "customer": {
        "id": "customer123",
        "name": "John Doe",
        "email": "customer@gmail.com",
        "phone": "9999999999",
        "phone_country_code": "+1"
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "manual",
    "payment_method": "bank_debit",
    "payment_method_data": {
        "bank_debit": {
            "sepa": {
                "iban": "DE871************67890",
                "bank_account_holder_name": null
            }
        },
        "billing": null
    },
    "payment_token": "token_RzJMp7J8sp2wWoRnBYPA",
    "shipping": null,
    "billing": {
        "address": {
            "city": null,
            "country": null,
            "line1": null,
            "line2": null,
            "line3": null,
            "zip": null,
            "state": null,
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": "customer@gmail.com",
    "name": "John Doe",
    "phone": "9999999999",
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "sepa",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": null,
    "manual_retry_allowed": false,
    "connector_transaction_id": "8v739jbpsaKxnsCB52QmeF",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_EuXuxP2KVO0m1tlDWSau",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_MZAsrTowXuzpeXl4DMj2",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-09-12T10:57:41.662Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2024-09-12T10:42:57.446Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null
}
  1. Void:
    Request:
curl --location 'http://localhost:8080/payments/pay_sH3vFdwGOoPjobg4sud9/cancel' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_2QpEeK0ByPRkb2DPBxHfad4i1WxQO3hZSuVzlFcg9mTrLFUHRpGfE0SCuQwZjGEb' \
--data '{}'

Response:

{
    "payment_id": "pay_sH3vFdwGOoPjobg4sud9",
    "merchant_id": "merchant_1725539597",
    "status": "cancelled",
    "amount": 9000,
    "net_amount": 9000,
    "amount_capturable": 0,
    "amount_received": null,
    "connector": "deutschebank",
    "client_secret": "pay_sH3vFdwGOoPjobg4sud9_secret_jlUGjGn6ADDu02Ql8O4K",
    "created": "2024-09-12T10:44:13.912Z",
    "currency": "EUR",
    "customer_id": "customer123",
    "customer": {
        "id": "customer123",
        "name": "John Doe",
        "email": "customer@gmail.com",
        "phone": "9999999999",
        "phone_country_code": "+1"
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "manual",
    "payment_method": "bank_debit",
    "payment_method_data": {
        "bank_debit": {
            "sepa": {
                "iban": "DE871************67890",
                "bank_account_holder_name": null
            }
        },
        "billing": null
    },
    "payment_token": "token_2Mq0WwprhovjSGXcJmZa",
    "shipping": null,
    "billing": {
        "address": {
            "city": null,
            "country": null,
            "line1": null,
            "line2": null,
            "line3": null,
            "zip": null,
            "state": null,
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": "customer@gmail.com",
    "name": "John Doe",
    "phone": "9999999999",
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "sepa",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": null,
    "manual_retry_allowed": false,
    "connector_transaction_id": "9VFMneA8NhYUj7xoG0bmMA",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_EuXuxP2KVO0m1tlDWSau",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_MZAsrTowXuzpeXl4DMj2",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-09-12T10:59:13.912Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2024-09-12T10:44:39.083Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null
}
  1. Refunds:
    Request:
curl --location 'http://localhost:8080/refunds' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_2QpEeK0ByPRkb2DPBxHfad4i1WxQO3hZSuVzlFcg9mTrLFUHRpGfE0SCuQwZjGEb' \
--data '{
    "payment_id": "pay_bBC3GTsRPYVPQ8v1XdVv",
    "refund_type": "instant"
}'

Response:

{
    "refund_id": "ref_UDEk9Xks0pRZI5GdY1BJ",
    "payment_id": "pay_bBC3GTsRPYVPQ8v1XdVv",
    "amount": 9000,
    "currency": "EUR",
    "status": "succeeded",
    "reason": null,
    "metadata": null,
    "error_message": null,
    "error_code": null,
    "created_at": "2024-09-16T07:57:15.637Z",
    "updated_at": "2024-09-16T07:57:18.072Z",
    "connector": "deutschebank",
    "profile_id": "pro_EuXuxP2KVO0m1tlDWSau",
    "merchant_connector_id": "mca_MZAsrTowXuzpeXl4DMj2",
    "charges": null
}
  1. RSYNC:
    Request:
curl --location 'http://localhost:8080/refunds/ref_UDEk9Xks0pRZI5GdY1BJ' \
--header 'Accept: application/json' \
--header 'api-key: dev_2QpEeK0ByPRkb2DPBxHfad4i1WxQO3hZSuVzlFcg9mTrLFUHRpGfE0SCuQwZjGEb'

Response:

{
    "refund_id": "ref_UDEk9Xks0pRZI5GdY1BJ",
    "payment_id": "pay_bBC3GTsRPYVPQ8v1XdVv",
    "amount": 9000,
    "currency": "EUR",
    "status": "succeeded",
    "reason": null,
    "metadata": null,
    "error_message": null,
    "error_code": null,
    "created_at": "2024-09-16T07:57:15.637Z",
    "updated_at": "2024-09-16T07:58:34.252Z",
    "connector": "deutschebank",
    "profile_id": "pro_EuXuxP2KVO0m1tlDWSau",
    "merchant_connector_id": "mca_MZAsrTowXuzpeXl4DMj2",
    "charges": null
}

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

@deepanshu-iiitu deepanshu-iiitu requested review from a team as code owners September 6, 2024 10:29
Copy link

semanticdiff-com bot commented Sep 6, 2024

Review changes with SemanticDiff.

Analyzed 20 of 31 files.

Overall, the semantic diff is 13% smaller than the GitHub diff.

File Information
Filename Status
loadtest/config/development.toml Unsupported file format
✔️ crates/test_utils/src/connector_auth.rs Analyzed
crates/router/tests/connectors/sample_auth.toml Unsupported file format
✔️ crates/router/src/types/api.rs Analyzed
✔️ crates/router/src/types/transformers.rs Analyzed
✔️ crates/router/src/types/domain/payments.rs 94.16% smaller
✔️ crates/router/src/core/admin.rs Analyzed
✔️ crates/router/src/core/payment_methods.rs 2.61% smaller
✔️ crates/router/src/core/payments/helpers.rs Analyzed
✔️ crates/router/src/core/payment_methods/vault.rs Analyzed
✔️ crates/router/src/configs/defaults.rs 12.82% smaller
✔️ crates/hyperswitch_domain_models/src/payment_method_data.rs Analyzed
✔️ crates/hyperswitch_domain_models/src/types.rs 80.28% smaller
✔️ crates/hyperswitch_connectors/src/constants.rs Analyzed
✔️ crates/hyperswitch_connectors/src/default_implementations.rs 3.0% smaller
✔️ crates/hyperswitch_connectors/src/connectors/deutschebank.rs 7.26% smaller
✔️ crates/hyperswitch_connectors/src/connectors/deutschebank/transformers.rs 17.26% smaller
crates/connector_configs/toml/development.toml Unsupported file format
crates/connector_configs/toml/production.toml Unsupported file format
crates/connector_configs/toml/sandbox.toml Unsupported file format
✔️ crates/connector_configs/src/connector.rs Analyzed
✔️ crates/common_enums/src/enums.rs Analyzed
✔️ crates/api_models/src/enums.rs Analyzed
config/config.example.toml Unsupported file format
config/development.toml Unsupported file format
config/docker_compose.toml Unsupported file format
config/deployments/integration_test.toml Unsupported file format
config/deployments/production.toml Unsupported file format
config/deployments/sandbox.toml Unsupported file format
✔️ api-reference-v2/openapi_spec.json Analyzed
✔️ api-reference/openapi_spec.json Analyzed

@deepanshu-iiitu deepanshu-iiitu self-assigned this Sep 6, 2024
@deepanshu-iiitu deepanshu-iiitu added A-connector-integration Area: Connector integration C-feature Category: Feature request or enhancement labels Sep 6, 2024
@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Sep 6, 2024
@deepanshu-iiitu deepanshu-iiitu requested a review from a team as a code owner September 10, 2024 13:29
@deepanshu-iiitu deepanshu-iiitu linked an issue Sep 11, 2024 that may be closed by this pull request
2 tasks
Narayanbhat166
Narayanbhat166 previously approved these changes Sep 12, 2024
Copy link
Member

@Narayanbhat166 Narayanbhat166 left a comment

Choose a reason for hiding this comment

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

Core changes Looks Good to me

SanchithHegde
SanchithHegde previously approved these changes Sep 12, 2024
Comment on lines +498 to +502
let tx_id = req
.request
.connector_transaction_id
.get_connector_transaction_id()
.change_context(errors::ConnectorError::MissingConnectorTransactionID)?;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we do this sync with our payment_id?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. Only with deutesche tx_id

Copy link
Contributor

@SamraatBansal SamraatBansal left a comment

Choose a reason for hiding this comment

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

Add the configurations in connector_configs for the dashboard.

Also please update the sheet for tracking connector feature set

Comment on lines 702 to 706
let response: deutschebank::DeutschebankPaymentsResponse = res
.response
.parse_struct("Deutschebank PaymentsCaptureResponse")
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
event_builder.map(|i| i.set_response_body(&response));
Copy link
Contributor

Choose a reason for hiding this comment

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

Rename the parse_struct to PaymentsCancelResponse

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Comment on lines +137 to +139
first_name: billing_address.get_first_name()?.clone(),
last_name: billing_address.get_last_name()?.clone(),
}),
Copy link
Contributor

Choose a reason for hiding this comment

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

Add these in defualt.rs for dynamic fields

form_fields: HashMap::from([
(
"reference".to_string(),
item.response.reference.unwrap_or("".to_string()),
Copy link
Contributor

Choose a reason for hiding this comment

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

If reference is a critical fields as if its not available you fail the payment in complete_authorize, its better to fail it here itself

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

let resource_id = ResponseId::ConnectorTransactionId(
item.response
.tx_id
.ok_or(errors::ConnectorError::MissingConnectorTransactionID)?,
Copy link
Contributor

Choose a reason for hiding this comment

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

If connector_transaction_id is missing shall we fail the payment or mark it pending?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are not marking tx_id as option now. Deserialization will happen if tx_id is not in response.

Ok(Self {
amount: item.amount.to_owned(),
changed_amount: item.amount,
kind: "DIRECTDEBIT".to_string(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Create an enum for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

let resource_id = ResponseId::ConnectorTransactionId(
item.response
.tx_id
.ok_or(errors::ConnectorError::MissingConnectorTransactionID)?,
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

type Error = error_stack::Report<errors::ConnectorError>;
fn try_from(_item: &PaymentsCancelRouterData) -> Result<Self, Self::Error> {
Ok(Self {
kind: "DIRECTDEBIT".to_string(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Move it the same enum as above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

fn try_from(item: &DeutschebankRouterData<&RefundsRouterData<F>>) -> Result<Self, Self::Error> {
Ok(Self {
changed_amount: item.amount.to_owned(),
kind: "DIRECTDEBIT".to_string(),
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

let connector_refund_id = item
.response
.tx_id
.ok_or(errors::ConnectorError::MissingConnectorRefundID)?;
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Sep 13, 2024
Merged via the queue into main with commit 6fc2060 Sep 13, 2024
14 checks passed
@Gnanasundari24 Gnanasundari24 deleted the deutsche-sepa branch September 13, 2024 11:54
pixincreate added a commit that referenced this pull request Sep 13, 2024
* 'main' of github.com:juspay/hyperswitch: (51 commits)
  feat(connector): [DEUTSCHEBANK] Integrate SEPA Payments (#5826)
  feat(payments_v2): payment intent diesel and domain models changes v2 (#5783)
  feat(connector): [Fiuu] ADD Wasm Configs (#5874)
  chore(version): 2024.09.13.0
  refactor(core): Update shipping_cost and order_tax_amount to net_amount of payment_attempt (#5844)
  refactor: return optional request body from build_request_v2 in ConnectorIntegrationV2 trait (#5865)
  feat(refunds): Refunds aggregate api (#5795)
  refactor: handle redirections for iframed content (#5591)
  refactor(payment_links): Update API contract for dynamic transaction details and upgrade UI (#5849)
  fix(router): add payment_method check in `get_mandate_type` (#5828)
  fix(connector): [ZSL] compare consr_paid_amt with the total amount for identifying partial payments (#5873)
  feat(connector): [Novalnet] add Payment flows for cards (#5726)
  chore(version): 2024.09.12.0
  fix(router): return `collect_billing_details_from_wallet_connector` if `always_collect_billing_details_from_wallet_connector ` is false in merchant payment method list (#5854)
  feat(opensearch): add profile_id and organization_id to /search APIs (#5705)
  build(deps): bump `sqlx` to `0.8.2` (#5859)
  refactor: Remove unwanted commented lines (#5851)
  feat(payments): add support for profile aggregates (#5845)
  Feat(connector): [Fiuu] Add DuitNow/FPX PaymentMethod (#5841)
  chore: remove Connectors enum dependency from ConnectorIntegrationV2 trait (#5840)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-connector-integration Area: Connector integration C-feature Category: Feature request or enhancement M-api-contract-changes Metadata: This PR involves API contract changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] [DEUTSCHEBANK] Integrate SEPA Payments
6 participants