Skip to content

feat(connector): [Gigadat] store intearc customer_info in additional data#10749

Merged
likhinbopanna merged 3 commits intomainfrom
gigadat-additional-data
Dec 23, 2025
Merged

feat(connector): [Gigadat] store intearc customer_info in additional data#10749
likhinbopanna merged 3 commits intomainfrom
gigadat-additional-data

Conversation

@swangi-kumari
Copy link
Contributor

@swangi-kumari swangi-kumari commented Dec 20, 2025

Type of Change

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

Description

  • store intearc customer_info in additional data for gigadat

  • refactor type of customer_info in core and respective change in Loonio
    Before
    pub customer_info: Option<pii::SecretSerdeValue>,

    Change in this PR, we are making strict type

pub customer_info: Option<InteracCustomerInfoDetails>,
{
    pub struct InteracCustomerInfoDetails {
    #[schema(value_type = Option<String>)]
    pub customer_name: Option<Secret<String>>,
    #[schema(value_type = Option<String>)]
    pub customer_email: Option<Secret<String>>,
    #[schema(value_type = Option<String>)]
    pub customer_phone_number: Option<Secret<String>>,
    #[schema(value_type = Option<String>)]
    pub customer_bank_id: Option<Secret<String>>,
    #[schema(value_type = Option<String>)]
    pub customer_bank_name: Option<Secret<String>>,
}

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?

Create a Gigadat Payment

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_GBaAGux4fPM2ykuqXNtBl510wFWkYoJLsQZDrTt0vj6vDi2KjyXxuTlM0VFV7sgU' \
--data-raw '{
    "amount": 100,
    "currency": "CAD",
    "confirm": true,
    "capture_method": "automatic",
    "customer_id": "aaaa",
    "profile_id": "pro_b6e2nUpSBCXKVeJ0y7Rk",
    
    
    
    
    
    
    
    
    
    
    
    "authentication_type": "three_ds",
    "payment_method": "bank_redirect",
    "payment_method_type": "interac",
    "payment_method_data": {
        "bank_redirect": {
            "interac": {}
        }
    },
    "billing": {
        "address": {
            "line1": "Singapore Changi Airport. 2nd flr",
            "line2": "",
            "line3": "",
            "city": "Downtown Core",
            "state": "Central Indiana America",
            "zip": "039393",
            "country": "CA",
            "first_name": "Swangi",
            "last_name": "Kumari"
        },
        "phone": {
            "number": "12345",
            "country_code": "+91"
        },
        "email": "etransfer@orderdeposi1t.com"
    },
    "browser_info": {
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "language": "nl-NL",
        "color_depth": 24,
        "screen_height": 723,
        "screen_width": 1536,
        "time_zone": 0,
        "java_enabled": true,
        "java_script_enabled": true,
        "ip_address": "127.0.0.1"
    }
}
'

Response

{
    "payment_id": "pay_4ponnyqx0PPcPDghedsa",
    "merchant_id": "merchant_1766224893",
    "status": "requires_customer_action",
    "amount": 100,
    "net_amount": 100,
    "shipping_cost": null,
    "amount_capturable": 100,
    "amount_received": null,
    "connector": "gigadat",
    "client_secret": "pay_4ponnyqx0PPcPDghedsa_secret_M8nYkKYj4f9VOgJc1iZP",
    "created": "2025-12-20T10:02:05.550Z",
    "modified_at": "2025-12-20T10:02:07.006Z",
    "currency": "CAD",
    "customer_id": "aaaa",
    "customer": {
        "id": "aaaa",
        "name": null,
        "email": null,
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "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,
            "interac": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Downtown Core",
            "country": "CA",
            "line1": "Singapore Changi Airport. 2nd flr",
            "line2": "",
            "line3": "",
            "zip": "039393",
            "state": "Central Indiana America",
            "first_name": "Swangi",
            "last_name": "Kumari",
            "origin_zip": null
        },
        "phone": {
            "number": "1234567",
            "country_code": "+91"
        },
        "email": "etransfer@orderdeposi1t.com"
    },
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "return_url": null,
    "authentication_type": "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_4ponnyqx0PPcPDghedsa/merchant_1766224893/pay_4ponnyqx0PPcPDghedsa_1"
    },
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "interac",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "pay_4ponnyqx0PPcPDghedsa_1",
    "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": null,
    "payment_link": null,
    "profile_id": "pro_b6e2nUpSBCXKVeJ0y7Rk",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_4p5xh0nSulIjgf7pLWr4",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-12-20T10:17:05.550Z",
    "fingerprint": null,
    "browser_info": {
        "language": "nl-NL",
        "time_zone": 0,
        "ip_address": "127.0.0.1",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
        "color_depth": 24,
        "java_enabled": true,
        "screen_width": 1536,
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "screen_height": 723,
        "java_script_enabled": true
    },
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2025-12-20T10:02:07.006Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": 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,
    "is_stored_credential": null,
    "mit_category": null,
    "billing_descriptor": null,
    "tokenization": null,
    "partner_merchant_identifier_details": null,
    "payment_method_tokenization_details": null
}

Complete payment using redirection
2. Do psync

curl --location 'http://localhost:8080/payments/pay_4ponnyqx0PPcPDghedsa?force_sync=true' \
--header 'Accept: application/json' \
--header 'api-key: dev_GBaAGux4fPM2ykuqXNtBl510wFWkYoJLsQZDrTt0vj6vDi2KjyXxuTlM0VFV7sgU'

Response

{
    "payment_id": "pay_4ponnyqx0PPcPDghedsa",
    "merchant_id": "merchant_1766224893",
    "status": "processing",
    "amount": 100,
    "net_amount": 100,
    "shipping_cost": null,
    "amount_capturable": 100,
    "amount_received": null,
    "connector": "gigadat",
    "client_secret": "pay_4ponnyqx0PPcPDghedsa_secret_M8nYkKYj4f9VOgJc1iZP",
    "created": "2025-12-20T10:02:05.550Z",
    "modified_at": "2025-12-20T10:02:41.067Z",
    "currency": "CAD",
    "customer_id": "aaaa",
    "customer": {
        "id": "aaaa",
        "name": null,
        "email": null,
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "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,
            "interac": {
                "customer_info": {
                    "customer_name": "Swangi Kumari",
                    "customer_email": "etransfer@orderdeposi1t.com",
                    "customer_phone_number": "12355",
                    "customer_bank_id": null,
                    "customer_bank_name": null
                }
            }
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Downtown Core",
            "country": "CA",
            "line1": "Singapore Changi Airport. 2nd flr",
            "line2": "",
            "line3": "",
            "zip": "039393",
            "state": "Central Indiana America",
            "first_name": "Swangi",
            "last_name": "Kumari",
            "origin_zip": null
        },
        "phone": {
            "number": "12345679",
            "country_code": "+91"
        },
        "email": "etransfer@orderdeposi1t.com"
    },
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "return_url": null,
    "authentication_type": "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": "interac",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "pay_4ponnyqx0PPcPDghedsa_1",
    "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": null,
    "payment_link": null,
    "profile_id": "pro_b6e2nUpSBCXKVeJ0y7Rk",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_4p5xh0nSulIjgf7pLWr4",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-12-20T10:17:05.550Z",
    "fingerprint": null,
    "browser_info": {
        "language": "nl-NL",
        "time_zone": 0,
        "ip_address": "127.0.0.1",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
        "color_depth": 24,
        "java_enabled": true,
        "screen_width": 1536,
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "screen_height": 723,
        "java_script_enabled": true
    },
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2025-12-20T10:02:41.067Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": 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,
    "is_stored_credential": null,
    "mit_category": null,
    "billing_descriptor": null,
    "tokenization": null,
    "partner_merchant_identifier_details": null,
    "payment_method_tokenization_details": null
}

We have to check payment_method_data, customer_info should be populated

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

@swangi-kumari swangi-kumari self-assigned this Dec 20, 2025
@swangi-kumari swangi-kumari requested review from a team as code owners December 20, 2025 10:21
@semanticdiff-com
Copy link

semanticdiff-com bot commented Dec 20, 2025

@codecov
Copy link

codecov bot commented Dec 20, 2025

Codecov Report

❌ Patch coverage is 0% with 60 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@ce8dae6). Learn more about missing BASE report.

Files with missing lines Patch % Lines
..._connectors/src/connectors/gigadat/transformers.rs 0.00% 24 Missing ⚠️
...h_connectors/src/connectors/loonio/transformers.rs 0.00% 23 Missing ⚠️
crates/common_types/src/payments.rs 0.00% 13 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10749   +/-   ##
=======================================
  Coverage        ?    6.38%           
=======================================
  Files           ?     1265           
  Lines           ?   318332           
  Branches        ?        0           
=======================================
  Hits            ?    20340           
  Misses          ?   297992           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@swangi-kumari swangi-kumari changed the title feat: store intearc customer_info in additional data for gigadat feat(connector): store intearc customer_info in additional data for gigadat Dec 22, 2025
@swangi-kumari swangi-kumari changed the title feat(connector): store intearc customer_info in additional data for gigadat feat(connector): [Gigadat] store intearc customer_info in additional data Dec 22, 2025
@likhinbopanna likhinbopanna added this pull request to the merge queue Dec 23, 2025
Merged via the queue into main with commit d2802ac Dec 23, 2025
36 of 37 checks passed
@likhinbopanna likhinbopanna deleted the gigadat-additional-data branch December 23, 2025 11:56
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.

4 participants