hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

feat(connector): [Trustpayments] Integrate EPS, TRUSTLY, PAYSERA, ALIPAY

Open aadityaguptaa opened this issue 3 months ago • 2 comments

Type of Change

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

Description

ADD new payment method for Trustpayments

EPS TRUSTLY PAYSERA ALIPAY

Additional Changes

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

Motivation and Context

closes #9543

How did you test it?

EPS

Payment Request
{
    "amount": 333,
    "currency": "EUR",
    "confirm": true,
    "capture_method": "automatic",
    "payment_method": "bank_redirect",
    "payment_method_type": "eps",
    "authentication_type": "no_three_ds",
    "description": "hellow world",
    "billing": {
        "address": {
            "zip": "560095",
            "first_name": "Sakil",
            "last_name": "Mostak",
            "line1": "Fasdf",
            "country": "AT",
            "line2": "Fasdf",
            "city": "Fasdf"
        }
    },
    "payment_method_data": {
        "bank_redirect": {
            "eps": {}
        }
    }
}

Payment Response
{
    "payment_id": "pay_SQxyfc16EqXs539KJpv6",
    "merchant_id": "merchant_1758702323",
    "status": "requires_customer_action",
    "amount": 333,
    "net_amount": 333,
    "shipping_cost": null,
    "amount_capturable": 333,
    "amount_received": null,
    "connector": "trustpayments",
    "client_secret": "pay_SQxyfc16EqXs539KJpv6_secret_dLz6r3Z9kjaI1ygQ2JNI",
    "created": "2025-09-24T08:25:36.876Z",
    "currency": "EUR",
    "customer_id": null,
    "customer": null,
    "description": "hellow world",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "bank_redirect",
    "payment_method_data": {
        "bank_redirect": {
            "type": "BankRedirectResponse",
            "bank_name": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Fasdf",
            "country": "AT",
            "line1": "Fasdf",
            "line2": "Fasdf",
            "line3": null,
            "zip": "560095",
            "state": null,
            "first_name": "Sakil",
            "last_name": "Mostak",
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "return_url": null,
    "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_SQxyfc16EqXs539KJpv6/merchant_1758702323/pay_SQxyfc16EqXs539KJpv6_1"
    },
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "eps",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "60-86-234827",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "60-86-234827",
    "payment_link": null,
    "profile_id": "pro_lZpUeS9Id0O0s420tFfq",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_VajgNp49zogBKa50PMBV",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-09-24T08:40:36.876Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2025-09-24T08:25:38.792Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "card_discovery": null,
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null,
    "enable_overcapture": null,
    "is_overcapture_enabled": null,
    "network_details": null
}
Confirm page Screenshot 2025-09-24 at 1 57 11 PM
Psync Response
{
    "payment_id": "pay_SQxyfc16EqXs539KJpv6",
    "merchant_id": "merchant_1758702323",
    "status": "succeeded",
    "amount": 333,
    "net_amount": 333,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 333,
    "connector": "trustpayments",
    "client_secret": "pay_SQxyfc16EqXs539KJpv6_secret_dLz6r3Z9kjaI1ygQ2JNI",
    "created": "2025-09-24T08:25:36.876Z",
    "currency": "EUR",
    "customer_id": null,
    "customer": null,
    "description": "hellow world",
    "refunds": null,
    "disputes": null,
    "attempts": [
        {
            "attempt_id": "pay_SQxyfc16EqXs539KJpv6_1",
            "status": "charged",
            "amount": 333,
            "order_tax_amount": null,
            "currency": "EUR",
            "connector": "trustpayments",
            "error_message": null,
            "payment_method": "bank_redirect",
            "connector_transaction_id": "60-86-234827",
            "capture_method": "automatic",
            "authentication_type": "no_three_ds",
            "created_at": "2025-09-24T08:25:36.879Z",
            "modified_at": "2025-09-24T08:30:10.457Z",
            "cancellation_reason": null,
            "mandate_id": null,
            "error_code": null,
            "payment_token": null,
            "connector_metadata": null,
            "payment_experience": null,
            "payment_method_type": "eps",
            "reference_id": "60-86-234827",
            "unified_code": null,
            "unified_message": null,
            "client_source": null,
            "client_version": null
        }
    ],
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "bank_redirect",
    "payment_method_data": {
        "bank_redirect": {
            "type": "BankRedirectResponse",
            "bank_name": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Fasdf",
            "country": "AT",
            "line1": "Fasdf",
            "line2": "Fasdf",
            "line3": null,
            "zip": "560095",
            "state": null,
            "first_name": "Sakil",
            "last_name": "Mostak",
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "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": "eps",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "60-86-234827",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "60-86-234827",
    "payment_link": null,
    "profile_id": "pro_lZpUeS9Id0O0s420tFfq",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_VajgNp49zogBKa50PMBV",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-09-24T08:40:36.876Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2025-09-24T08:30:10.458Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "card_discovery": null,
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null,
    "enable_overcapture": null,
    "is_overcapture_enabled": null,
    "network_details": null
}

Paysera

Payment Request
{
    "amount": 333,
    "currency": "EUR",
    "confirm": true,
    "capture_method": "automatic",
    "payment_method": "wallet",
    "payment_method_type": "paysera",
    "authentication_type": "no_three_ds",
    "description": "hellow world",
    "billing": {
        "address": {
            "zip": "560095",
            "first_name": "Sakil",
            "last_name": "Mostak",
            "line1": "Fasdf",
            "country": "EE",
            "line2": "Fasdf",
            "city": "Fasdf"
        }
    },
    "payment_method_data": {
        "wallet": {
            "paysera": {}
        }
    }
}
Payment Response
{
    "payment_id": "pay_ZYrTnj2z4uHgbiIXj503",
    "merchant_id": "merchant_1758704666",
    "status": "requires_customer_action",
    "amount": 333,
    "net_amount": 333,
    "shipping_cost": null,
    "amount_capturable": 333,
    "amount_received": null,
    "connector": "trustpayments",
    "client_secret": "pay_ZYrTnj2z4uHgbiIXj503_secret_4Py4h42c0FxveeVeomUE",
    "created": "2025-09-24T09:04:46.000Z",
    "currency": "EUR",
    "customer_id": null,
    "customer": null,
    "description": "hellow world",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "wallet",
    "payment_method_data": {
        "wallet": {},
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Fasdf",
            "country": "EE",
            "line1": "Fasdf",
            "line2": "Fasdf",
            "line3": null,
            "zip": "560095",
            "state": null,
            "first_name": "Sakil",
            "last_name": "Mostak",
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "return_url": null,
    "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_ZYrTnj2z4uHgbiIXj503/merchant_1758704666/pay_ZYrTnj2z4uHgbiIXj503_1"
    },
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "paysera",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "60-86-234829",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "60-86-234829",
    "payment_link": null,
    "profile_id": "pro_JD53k6wucSlj9mAljaPD",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_zycr5P8d2W91p7pk8Rtu",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-09-24T09:19:46.000Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2025-09-24T09:04:47.172Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "card_discovery": null,
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null,
    "enable_overcapture": null,
    "is_overcapture_enabled": null,
    "network_details": null
}
Confirm page Screenshot 2025-09-24 at 2 36 29 PM
Psync Response
{
    "payment_id": "pay_ZYrTnj2z4uHgbiIXj503",
    "merchant_id": "merchant_1758704666",
    "status": "succeeded",
    "amount": 333,
    "net_amount": 333,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 333,
    "connector": "trustpayments",
    "client_secret": "pay_ZYrTnj2z4uHgbiIXj503_secret_4Py4h42c0FxveeVeomUE",
    "created": "2025-09-24T09:04:46.000Z",
    "currency": "EUR",
    "customer_id": null,
    "customer": null,
    "description": "hellow world",
    "refunds": null,
    "disputes": null,
    "attempts": [
        {
            "attempt_id": "pay_ZYrTnj2z4uHgbiIXj503_1",
            "status": "charged",
            "amount": 333,
            "order_tax_amount": null,
            "currency": "EUR",
            "connector": "trustpayments",
            "error_message": null,
            "payment_method": "wallet",
            "connector_transaction_id": "60-86-234829",
            "capture_method": "automatic",
            "authentication_type": "no_three_ds",
            "created_at": "2025-09-24T09:04:46.000Z",
            "modified_at": "2025-09-24T09:10:04.032Z",
            "cancellation_reason": null,
            "mandate_id": null,
            "error_code": null,
            "payment_token": null,
            "connector_metadata": null,
            "payment_experience": null,
            "payment_method_type": "paysera",
            "reference_id": "60-86-234829",
            "unified_code": null,
            "unified_message": null,
            "client_source": null,
            "client_version": null
        }
    ],
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "wallet",
    "payment_method_data": {
        "wallet": {},
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Fasdf",
            "country": "EE",
            "line1": "Fasdf",
            "line2": "Fasdf",
            "line3": null,
            "zip": "560095",
            "state": null,
            "first_name": "Sakil",
            "last_name": "Mostak",
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "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": "paysera",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "60-86-234829",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "60-86-234829",
    "payment_link": null,
    "profile_id": "pro_JD53k6wucSlj9mAljaPD",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_zycr5P8d2W91p7pk8Rtu",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-09-24T09:19:46.000Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2025-09-24T09:10:04.032Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "card_discovery": null,
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null,
    "enable_overcapture": null,
    "is_overcapture_enabled": null,
    "network_details": null
}

TRUSTLY

Payment Request
{
    "amount": 333,
    "currency": "EUR",
    "confirm": true,
    "capture_method": "automatic",
    "payment_method": "bank_redirect",
    "payment_method_type": "trustly",
    "authentication_type": "no_three_ds",
    "description": "hellow world",
    "billing": {
        "address": {
            "zip": "560095",
            "first_name": "Sakil",
            "last_name": "Mostak",
            "line1": "Fasdf",
            "country": "EE",
            "line2": "Fasdf",
            "city": "Fasdf"
        }
    },
    "payment_method_data": {
        "bank_redirect": {
            "trustly": {
                "billing_details": {
                    "billing_name": "John Doe"
                },
                "bank_name": "ing",
                "preferred_language": "en",
                "country": "FI"
            }
        }
    }
}
Payment Response
{
    "payment_id": "pay_Imnm05I4H1BSQtu2zAkq",
    "merchant_id": "merchant_1758705335",
    "status": "requires_customer_action",
    "amount": 333,
    "net_amount": 333,
    "shipping_cost": null,
    "amount_capturable": 333,
    "amount_received": null,
    "connector": "trustpayments",
    "client_secret": "pay_Imnm05I4H1BSQtu2zAkq_secret_mAGOXYMi0qVWw39GZ6C9",
    "created": "2025-09-24T09:18:44.995Z",
    "currency": "EUR",
    "customer_id": null,
    "customer": null,
    "description": "hellow world",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "bank_redirect",
    "payment_method_data": {
        "bank_redirect": {
            "type": "BankRedirectResponse",
            "bank_name": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Fasdf",
            "country": "EE",
            "line1": "Fasdf",
            "line2": "Fasdf",
            "line3": null,
            "zip": "560095",
            "state": null,
            "first_name": "Sakil",
            "last_name": "Mostak",
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "return_url": null,
    "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_Imnm05I4H1BSQtu2zAkq/merchant_1758705335/pay_Imnm05I4H1BSQtu2zAkq_1"
    },
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "trustly",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "58-86-236470",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "58-86-236470",
    "payment_link": null,
    "profile_id": "pro_IIaBjETi42Iq0nmqumtk",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_ti4DlsV7dW9S8Ni6fIfS",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-09-24T09:33:44.995Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2025-09-24T09:18:46.567Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "card_discovery": null,
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null,
    "enable_overcapture": null,
    "is_overcapture_enabled": null,
    "network_details": null
}
Confirm page Screenshot 2025-09-24 at 1 57 11 PM
Psync Response
{
    "payment_id": "pay_Imnm05I4H1BSQtu2zAkq",
    "merchant_id": "merchant_1758705335",
    "status": "succeeded",
    "amount": 333,
    "net_amount": 333,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 333,
    "connector": "trustpayments",
    "client_secret": "pay_Imnm05I4H1BSQtu2zAkq_secret_mAGOXYMi0qVWw39GZ6C9",
    "created": "2025-09-24T09:18:44.995Z",
    "currency": "EUR",
    "customer_id": null,
    "customer": null,
    "description": "hellow world",
    "refunds": null,
    "disputes": null,
    "attempts": [
        {
            "attempt_id": "pay_Imnm05I4H1BSQtu2zAkq_1",
            "status": "charged",
            "amount": 333,
            "order_tax_amount": null,
            "currency": "EUR",
            "connector": "trustpayments",
            "error_message": null,
            "payment_method": "bank_redirect",
            "connector_transaction_id": "58-86-236470",
            "capture_method": "automatic",
            "authentication_type": "no_three_ds",
            "created_at": "2025-09-24T09:18:44.996Z",
            "modified_at": "2025-09-24T09:25:32.612Z",
            "cancellation_reason": null,
            "mandate_id": null,
            "error_code": null,
            "payment_token": null,
            "connector_metadata": null,
            "payment_experience": null,
            "payment_method_type": "trustly",
            "reference_id": "58-86-236470",
            "unified_code": null,
            "unified_message": null,
            "client_source": null,
            "client_version": null
        }
    ],
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "bank_redirect",
    "payment_method_data": {
        "bank_redirect": {
            "type": "BankRedirectResponse",
            "bank_name": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Fasdf",
            "country": "EE",
            "line1": "Fasdf",
            "line2": "Fasdf",
            "line3": null,
            "zip": "560095",
            "state": null,
            "first_name": "Sakil",
            "last_name": "Mostak",
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "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": "trustly",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "58-86-236470",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "58-86-236470",
    "payment_link": null,
    "profile_id": "pro_IIaBjETi42Iq0nmqumtk",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_ti4DlsV7dW9S8Ni6fIfS",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-09-24T09:33:44.995Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2025-09-24T09:25:32.612Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "card_discovery": null,
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null,
    "enable_overcapture": null,
    "is_overcapture_enabled": null,
    "network_details": null
}

ALIPAY

Payment Request
{
    "amount": 333,
    "currency": "EUR",
    "confirm": true,
    "capture_method": "automatic",
    "payment_method": "wallet",
    "payment_method_type": "ali_pay",
    "authentication_type": "no_three_ds",
    "description": "hellow world",
    "billing": {
        "address": {
            "zip": "560095",
            "first_name": "Sakil",
            "last_name": "Mostak",
            "line1": "Fasdf",
            "country": "EE",
            "line2": "Fasdf",
            "city": "Fasdf"
        }
    },
    "payment_method_data": {
        "wallet": {
            "ali_pay_redirect": {
                
            }
        }
    }
}
Payment Response
{
    "payment_id": "pay_ehw19WO0wvj5Bbd7pS4I",
    "merchant_id": "merchant_1758706093",
    "status": "requires_customer_action",
    "amount": 333,
    "net_amount": 333,
    "shipping_cost": null,
    "amount_capturable": 333,
    "amount_received": null,
    "connector": "trustpayments",
    "client_secret": "pay_ehw19WO0wvj5Bbd7pS4I_secret_TqcFU7yMbyCqy3d07BBd",
    "created": "2025-09-24T09:29:13.497Z",
    "currency": "EUR",
    "customer_id": null,
    "customer": null,
    "description": "hellow world",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "wallet",
    "payment_method_data": {
        "wallet": {},
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Fasdf",
            "country": "EE",
            "line1": "Fasdf",
            "line2": "Fasdf",
            "line3": null,
            "zip": "560095",
            "state": null,
            "first_name": "Sakil",
            "last_name": "Mostak",
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "return_url": null,
    "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_ehw19WO0wvj5Bbd7pS4I/merchant_1758706093/pay_ehw19WO0wvj5Bbd7pS4I_1"
    },
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "ali_pay",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "59-85-5631",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "59-85-5631",
    "payment_link": null,
    "profile_id": "pro_7UyhbC1NNcLHwHrl3XRb",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_ytxRTzaUUElTTCmmtdOu",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-09-24T09:44:13.497Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2025-09-24T09:29:14.277Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "card_discovery": null,
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null,
    "enable_overcapture": null,
    "is_overcapture_enabled": null,
    "network_details": null
}
Confirm page Not able to test it because of alipay sandbox error

<Screenshot 2025-09-24 at 3 02 21 PM

Checklist

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

aadityaguptaa avatar Sep 23 '25 10:09 aadityaguptaa

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_connectors/src/connectors/trustpayments/transformers.rs  12% smaller
  config/config.example.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
  config/development.toml Unsupported file format
  config/docker_compose.toml Unsupported file format
  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/hyperswitch_connectors/src/connectors/trustpayments.rs  0% smaller
  crates/payment_methods/src/configs/payment_connector_required_fields.rs  0% smaller
  loadtest/config/development.toml Unsupported file format

semanticdiff-com[bot] avatar Sep 23 '25 10:09 semanticdiff-com[bot]

Codecov Report

:x: Patch coverage is 0% with 293 lines in your changes missing coverage. Please review. :warning: Please upload report for BASE (main@24b82f3). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...ctors/src/connectors/trustpayments/transformers.rs 0.00% 257 Missing :warning:
...rswitch_connectors/src/connectors/trustpayments.rs 0.00% 36 Missing :warning:
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9512   +/-   ##
=======================================
  Coverage        ?    4.05%           
=======================================
  Files           ?     1227           
  Lines           ?   305224           
  Branches        ?        0           
=======================================
  Hits            ?    12369           
  Misses          ?   292855           
  Partials        ?        0           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Nov 10 '25 14:11 codecov[bot]