You are working on the hyperswitch repository (Rust payment processing system).…
- User
You are working on the hyperswitch repository (Rust payment processing system).
REPOSITORY SETUP:
- Repository: juspay/hyperswitch
- Working directory: ./repos/hyperswitch_pool_9 (already cloned)
- Base commit: 7f5ec7439b3469df7d77b8151ae3f4218847641a
- Task ID: juspay__hyperswitch-8537
- Version: v1.115.0
TASK DESCRIPTION: Bug: [FEATURE] Multisafe pay : EPS | MBWAY | SOFORT
Feature Description
Integrate EPS | MBWAY | SOFORT for multisafepay
Possible Implementation
integrate payments menthods
Have you spent some time checking if this feature request has been raised before?
- I checked and didn't find a similar issue
Have you read the Contributing Guidelines?
- I have read the Contributing Guidelines
Are you willing to submit a PR?
None
DETAILED CONTEXT & HINTS:
Type of Change
- Bugfix
- New feature
- Enhancement
- Refactoring
- Dependency updates
- Documentation
- CI/CD
Description
ADD new pm for multisafepay
- EPS
- SOFORT
- MBWAY
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?
{ "connector_type": "payment_processor", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "****" }, "connector_name": "multisafepay", "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "paypal", "payment_experience": "redirect_to_url" } ] }, { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "we_chat_pay", "payment_experience": "redirect_to_url" } ] }, { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "ali_pay", "payment_experience": "redirect_to_url" } ] }, { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "amazon_pay", "payment_experience": "redirect_to_url" } ] }, { "payment_method": "bank_redirect", "payment_method_types": [ { "payment_method_type": "trustly" } ] }, { "payment_method": "bank_redirect", "payment_method_types": [ { "payment_method_type": "eps", "payment_experience": "redirect_to_url" } ] }, { "payment_method": "bank_redirect", "payment_method_types": [ { "payment_method_type": "mb_way", "payment_experience": "redirect_to_url" } ] }, { "payment_method": "bank_redirect", "payment_method_types": [ { "payment_method_type": "sofort", "payment_experience": "redirect_to_url" } ] }, { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "debit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "metadata": { "city": "NY", "unit": "245" }, "business_country": "US", "business_label": "default" }SOFORT
{ "amount": 333, "currency": "EUR", "confirm": true, "capture_method": "automatic", "payment_method": "bank_redirect", "payment_method_type": "sofort", "authentication_type": "no_three_ds", "description": "hellow world", "billing": { "address": { "zip": "560095", "first_name": "Sakil", "last_name": "Mostak", "line1": "Fasdf", "country": "CN", "line2": "Fasdf", "city": "Fasdf" } }, "payment_method_data": { "bank_redirect": { "sofort": {} } } }{ "payment_id": "pay_2VuZLa8gqY25CfYd0j9g", "merchant_id": "merchant_1751348844", "status": "succeeded", "amount": 333, "net_amount": 333, "shipping_cost": null, "amount_capturable": 0, "amount_received": 333, "connector": "multisafepay", "client_secret": "pay_2VuZLa8gqY25CfYd0j9g_secret_uJ6cIqUaMlLLZjxdduEB", "created": "2025-07-01T05:49:46.290Z", "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": "CN", "line1": "Fasdf", "line2": "Fasdf", "line3": null, "zip": "560095", "state": null, "first_name": "Sakil", "last_name": "Mostak" }, "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": "sofort", "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": "pay_2VuZLa8gqY25CfYd0j9g_1", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_2VuZLa8gqY25CfYd0j9g_1", "payment_link": null, "profile_id": "pro_3OEvbwtJss77rpYRZpK9", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_lpvLYRnYLwlFl8HyiR3C", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-01T06:04:46.290Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-01T05:50:08.187Z", "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 }EPS
{ "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": {} } } }NOTE there is a bug in confirm page by multisafe page where it shows gyropay instead eps. But after success the payment is regestered under eps only in the merchant page{ "payment_id": "pay_5wcVD9r07H9USnvnkmj8", "merchant_id": "merchant_1751348844", "status": "succeeded", "amount": 333, "net_amount": 333, "shipping_cost": null, "amount_capturable": 0, "amount_received": 333, "connector": "multisafepay", "client_secret": "pay_5wcVD9r07H9USnvnkmj8_secret_gszuW3VnyepDNGQycnkG", "created": "2025-07-01T06:03:45.907Z", "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" }, "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": false, "connector_transaction_id": "pay_5wcVD9r07H9USnvnkmj8_1", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_5wcVD9r07H9USnvnkmj8_1", "payment_link": null, "profile_id": "pro_3OEvbwtJss77rpYRZpK9", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_lpvLYRnYLwlFl8HyiR3C", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-01T06:18:45.907Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-01T06:04:06.199Z", "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 }MB WAY
{ "amount": 333, "currency": "EUR", "confirm": true, "capture_method": "automatic", "payment_method": "wallet", "payment_method_type": "mb_way", "authentication_type": "no_three_ds", "description": "hellow world", "billing": { "address": { "zip": "560095", "first_name": "Sakil", "last_name": "Mostak", "line1": "Fasdf", "country": "PT", "line2": "Fasdf", "city": "Fasdf" } }, "payment_method_data": { "wallet": { "mb_way_redirect": {} } } }{ "payment_id": "pay_5FG8mrPdW4jnQERhOSSW", "merchant_id": "merchant_1751348844", "status": "requires_customer_action", "amount": 333, "net_amount": 333, "shipping_cost": null, "amount_capturable": 333, "amount_received": null, "connector": "multisafepay", "client_secret": "pay_5FG8mrPdW4jnQERhOSSW_secret_OZ8fONDt6UUY4YyCHZRh", "created": "2025-07-01T06:10:53.544Z", "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": "PT", "line1": "Fasdf", "line2": "Fasdf", "line3": null, "zip": "560095", "state": null, "first_name": "Sakil", "last_name": "Mostak" }, "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_5FG8mrPdW4jnQERhOSSW/merchant_1751348844/pay_5FG8mrPdW4jnQERhOSSW_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "mb_way", "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": "pay_5FG8mrPdW4jnQERhOSSW_1", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_5FG8mrPdW4jnQERhOSSW_1", "payment_link": null, "profile_id": "pro_3OEvbwtJss77rpYRZpK9", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_NafK7LHPOhPMyNsUBOfH", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-01T06:25:53.544Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-01T06:10:55.158Z", "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 }SOME PROBLEM WITH CONFIRMATION
UNABLE TO VERIFY due to issue from multisafepay . Needs alpha testingcypress test
- UNABLE TO TEST REDIRECTION VIA CYPRESS DUE TO CSRF BLOCKING
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
CRITICAL INSTRUCTIONS - WORK FAST AND EFFICIENTLY:
-
Create DENSE, ACTION-FOCUSED todos IMMEDIATELY
- Make todos specific and actionable
- Focus on HIGH-IMPACT actions only
- 5-8 todos maximum - be surgical, not exhaustive
-
Execute aggressively:
- Use bash commands to search efficiently
- Read multiple related files in quick succession
- Make ALL related changes in one edit
- Skip unnecessary exploration
-
File operations:
- All repo files: './repos/hyperswitch_pool_9/'
- Use targeted edits over whole file rewrites
-
NO TESTING UNLESS CRITICAL:
- Focus on making the actual code changes
- Only test if explicitly required
-
Maximize information density:
- Each turn should accomplish significant work
- Batch file reads when examining related code
- Use search commands to locate code quickly
EFFICIENCY IS CRITICAL. Make substantial progress every turn.
Assistant
I'll help you implement the multisafepay EPS, MBWAY, and SOFORT payment methods integration. Let me start by exploring the codebase to understand how payment methods are structured and where I need to make changes.
Assistant
First, let me explore the multisafepay connector implementation to understand the current structure.
Assistant
Now let me examine the main multisafepay connector file to understand its structure:
Assistant
Now let me check the transformers module to understand how payment methods are handled:
Assistant
Now let me check how other payment methods are handled in the codebase by looking at the enum definitions and existing payment method mappings:
Assistant
Let me also look for the specific enums definition for PaymentMethodType to understand the existing payment method types:
Assistant
(no content)
Assistant
Now I have enough context. Let me look at the bank redirect enum to see how other bank redirect payment methods are implemented:
Assistant
Let me now look at the specific BankRedirectType enum definition:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →