Skip to content

Conversation

@swetasharma03
Copy link
Contributor

@swetasharma03 swetasharma03 commented Jul 11, 2025

Type of Change

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

Description

Previously we were not sending some customer's details (email, shipping details) in the payload while creating the customer and thus merchant was not able to see the details in connector dashboard, this PR passes the fields and thus visible in the dashboard as well.

Populated description as None, because passing email and description together was throwing error considering it an invalid field. Have raised a query with authorize.NET for same.

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?

Previously we were not sending some customer's details (email, shipping details) in the while creating the customer and thus merchant was not able to see the details in connector dashboard, this PR passes the fields and thus visible in the dashboard as well.

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_VXSrYYAUIpSs2kzGeGUYR2iQRuMwMW3KXTTNYetsa2AtH4WNILp16V2k0fQlijtG' \
--data-raw '

{
    "amount": 0,
    "currency": "USD",
    "confirm": true,
    "customer_id": "tester123C",
    "email": "[email protected]",
    "setup_future_usage": "off_session",
    "payment_type": "setup_mandate",
    "off_session": true,
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "4111111111111111",
            "card_exp_month": "07",
            "card_exp_year": "26",
            "card_holder_name": "Joseph Does",
            "card_cvc": "123"
        }
    },
    "mandate_data": {
        "customer_acceptance": {
            "acceptance_type": "offline",
            "accepted_at": "1963-05-03T04:07:52.723Z",
            "online": {
                "ip_address": "125.0.0.1",
                "user_agent": "amet irure esse"
            }
        },
        "mandate_type": {
            "multi_use": {
                "amount": 1000,
                "currency": "USD",
                "start_date": "2023-04-21T00:00:00Z",
                "end_date": "2023-05-21T00:00:00Z",
                "metadata": {
                    "frequency": "13"
                }
            }
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "John",
            "last_name": "Doe"
        },
        "email":"[email protected]"
    }
}'
{"payment_id":"pay_XavQKzhEkDEY7aFf2dwo","merchant_id":"merchant_1752151744","status":"succeeded","amount":0,"net_amount":0,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"authorizedotnet","client_secret":"pay_XavQKzhEkDEY7aFf2dwo_secret_KXJBxcksN6IKZoCupdJS","created":"2025-07-11T13:03:06.550Z","currency":"USD","customer_id":"tester123C","customer":{"id":"tester123C","name":null,"email":"[email protected]","phone":null,"phone_country_code":null},"description":null,"refunds":null,"disputes":null,"mandate_id":"man_MhdFRQMHMNhdRuRgD5PD","mandate_data":{"update_mandate_id":null,"customer_acceptance":{"acceptance_type":"offline","accepted_at":"1963-05-03T04:07:52.723Z","online":{"ip_address":"125.0.0.1","user_agent":"amet irure esse"}},"mandate_type":{"multi_use":{"amount":1000,"currency":"USD","start_date":"2023-04-21T00:00:00.000Z","end_date":"2023-05-21T00:00:00.000Z","metadata":{"frequency":"13"}}}},"setup_future_usage":"off_session","off_session":true,"capture_on":null,"capture_method":null,"payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":"CREDIT","card_network":"Visa","card_issuer":"JP Morgan","card_issuing_country":"INDIA","card_isin":"411111","card_extended_bin":null,"card_exp_month":"07","card_exp_year":"26","card_holder_name":"Joseph Does","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"John","last_name":"Doe"},"phone":null,"email":"[email protected]"},"billing":null,"order_details":null,"email":"[email protected]","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":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"tester123C","created_at":1752238986,"expires":1752242586,"secret":"epk_e8ecb65babdd45f1bcb40c650f9501f0"},"manual_retry_allowed":false,"connector_transaction_id":null,"frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":null,"payment_link":null,"profile_id":"pro_wUwOOdqvK0JFEBlK5BhR","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_pJM3Sz2vcdU7NWLVAggw","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-11T13:18:06.550Z","fingerprint":null,"browser_info":null,"payment_method_id":"pm_n1jAH07DXUwI70oEOPkk","payment_method_status":"active","updated":"2025-07-11T13:03:07.233Z","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":"931873326-931150437","card_discovery":"manual","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}
Screenshot 2025-07-11 at 6 44 48 PM Screenshot 2025-07-11 at 6 44 57 PM

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

@swetasharma03 swetasharma03 self-assigned this Jul 11, 2025
@swetasharma03 swetasharma03 requested review from a team as code owners July 11, 2025 13:17
@semanticdiff-com
Copy link

semanticdiff-com bot commented Jul 11, 2025

Chethan-rao
Chethan-rao previously approved these changes Jul 11, 2025
@swetasharma03 swetasharma03 force-pushed the authorizedotnet-customer-fix branch 2 times, most recently from d8dc50d to d693bb2 Compare July 11, 2025 16:43
@swetasharma03 swetasharma03 force-pushed the authorizedotnet-customer-fix branch from d693bb2 to 96e55d9 Compare July 11, 2025 17:35
@likhinbopanna likhinbopanna added this pull request to the merge queue Jul 14, 2025
Merged via the queue into main with commit cb8dff0 Jul 14, 2025
24 of 28 checks passed
@likhinbopanna likhinbopanna deleted the authorizedotnet-customer-fix branch July 14, 2025 07:33
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.

5 participants