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(core): Added integrity framework for Authorize and Sync flow with connector as Stripe #5109

Merged
merged 168 commits into from
Jul 4, 2024

Conversation

sahkal
Copy link
Contributor

@sahkal sahkal commented Jun 24, 2024

Type of Change

  • New feature

Description

With this PR, we are implementing connector integrity checks for the authorize and sync flow. After receiving a response from the connector, we will validate on our end whether the data sent to the connector matches the data received from their end.

If the validation fails we will mark the transaction as processing so that if the connector fixes the response in sync, the status will move to respective terminal state.

At api level the response will be 5xx with connector_transaction_id in response for merchant to reference in case if integrity failures for both sync and authorize.

How did you test it?

Since its a blackbox scenario, we cannot test until and unless there is a error data from connectors end!

Local testing scenario

Scenario[1] Where Connector send wrong currency in both authorize and sync flow

Payments Create
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_ng5enE9FcquL9C0eYO1Jr0E6U8V8vbriDijpN4EgVpr1o31zWAMrVzkIt3q5ZvRh' \
--data-raw '
{
    "amount": 250,
    "currency": "USD",
    "confirm": true,
    "amount_to_capture": 250,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "customer_id": "StripeCustomer123",
    "email": "[email protected]",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Please Pay for your XYZ",
    "authentication_type": "no_three_ds",
    "return_url": "https://google.com",
    "setup_future_usage": "off_session",
    "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"
    },
    "routing": {
        "type": "single",
        "data": "nmi"
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "4242424242424242",
            "card_exp_month": "08",
            "card_exp_year": "25",
            "card_holder_name": "joseph Doe",
            "card_cvc": "999"
        }
    }
}
'
Screenshot 2024-06-24 at 4 34 48 PM

#####Payments Sync

with force_sync as False

curl --location 'http://localhost:8080/payments/pay_x99f0Q4DO2drPrt3QZX0' \
--header 'Accept: application/json' \
--header 'api-key: dev_ng5enE9FcquL9C0eYO1Jr0E6U8V8vbriDijpN4EgVpr1o31zWAMrVzkIt3q5ZvRh'

response

{
    "payment_id": "pay_x99f0Q4DO2drPrt3QZX0",
    "merchant_id": "merchant_1718267057",
    "status": "processing",
    "amount": 250,
    "net_amount": 250,
    "amount_capturable": 250,
    "amount_received": 250,
    "connector": "stripe",
    "client_secret": "pay_x99f0Q4DO2drPrt3QZX0_secret_0A6rPzdRv1pvBLdZ61GA",
    "created": "2024-06-24T11:03:39.655Z",
    "currency": "USD",
    "customer_id": "StripeCustomer123",
    "customer": {
        "id": "StripeCustomer123",
        "name": "John Doe",
        "email": "[email protected]",
        "phone": "999999999",
        "phone_country_code": "+65"
    },
    "description": "Please Pay for your XYZ",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4242",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "424242",
            "card_extended_bin": null,
            "card_exp_month": "08",
            "card_exp_year": "25",
            "card_holder_name": "joseph Doe",
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": "[email protected]",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": "https://google.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": "Integrity Check Failed! Value mismatched for fields currency",
    "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": null,
    "manual_retry_allowed": false,
    "connector_transaction_id": "pi_3PVAgTCuXDMKrYZe0L9s7DNy",
    "frm_message": null,
    "metadata": {
        "udf1": "value1",
        "login_date": "2019-09-10T10:11:12Z",
        "new_customer": "true"
    },
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_rhbVuxclv1iy3M2pZkkI",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_sKlZxW37AYQNFv4Z4LGy",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-06-24T11:18:39.655Z",
    "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_method_id": null,
    "payment_method_status": null,
    "updated": "2024-06-24T11:03:42.546Z",
    "charges": null,
    "frm_metadata": null
}

we should get error message as integrity check failed with status as processing.

with force_sync as true

curl --location 'http://localhost:8080/payments/pay_x99f0Q4DO2drPrt3QZX0?force_sync=true' \
--header 'Accept: application/json' \
--header 'api-key: dev_ng5enE9FcquL9C0eYO1Jr0E6U8V8vbriDijpN4EgVpr1o31zWAMrVzkIt3q5ZvRh'
Screenshot 2024-06-24 at 4 38 30 PM

Scenario[2] Where Connector send wrong currency in both authorize but fixes the same sync flow

#####Payments Create

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_ng5enE9FcquL9C0eYO1Jr0E6U8V8vbriDijpN4EgVpr1o31zWAMrVzkIt3q5ZvRh' \
--data-raw '
{
    "amount": 250,
    "currency": "USD",
    "confirm": true,
    "amount_to_capture": 250,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "customer_id": "StripeCustomer123",
    "email": "[email protected]",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Please Pay for your XYZ",
    "authentication_type": "no_three_ds",
    "return_url": "https://google.com",
    "setup_future_usage": "off_session",
    "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"
    },
    "routing": {
        "type": "single",
        "data": "nmi"
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "4242424242424242",
            "card_exp_month": "08",
            "card_exp_year": "25",
            "card_holder_name": "joseph Doe",
            "card_cvc": "999"
        }
    }  
}
'
Screenshot 2024-06-24 at 4 41 51 PM
Payments Sync

with force_sync true

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

Response

{
    "payment_id": "pay_ExsGuWmhYUqDrkkAJnVg",
    "merchant_id": "merchant_1718267057",
    "status": "succeeded",
    "amount": 250,
    "net_amount": 250,
    "amount_capturable": 0,
    "amount_received": 250,
    "connector": "stripe",
    "client_secret": "pay_ExsGuWmhYUqDrkkAJnVg_secret_upTfAFa5sOSTcGTMKKIO",
    "created": "2024-06-24T11:11:45.150Z",
    "currency": "USD",
    "customer_id": "StripeCustomer123",
    "customer": {
        "id": "StripeCustomer123",
        "name": "John Doe",
        "email": "[email protected]",
        "phone": "999999999",
        "phone_country_code": "+65"
    },
    "description": "Please Pay for your XYZ",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4242",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "424242",
            "card_extended_bin": null,
            "card_exp_month": "08",
            "card_exp_year": "25",
            "card_holder_name": "joseph Doe",
            "payment_checks": {
                "address_line1_check": null,
                "address_postal_code_check": null,
                "cvc_check": "pass"
            },
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": "[email protected]",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": "https://google.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "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": null,
    "manual_retry_allowed": false,
    "connector_transaction_id": "pi_3PVAoICuXDMKrYZe1GvfbMYa",
    "frm_message": null,
    "metadata": {
        "udf1": "value1",
        "login_date": "2019-09-10T10:11:12Z",
        "new_customer": "true"
    },
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "pi_3PVAoICuXDMKrYZe1GvfbMYa",
    "payment_link": null,
    "profile_id": "pro_rhbVuxclv1iy3M2pZkkI",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_sKlZxW37AYQNFv4Z4LGy",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-06-24T11:26:45.150Z",
    "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_method_id": null,
    "payment_method_status": null,
    "updated": "2024-06-24T11:12:40.350Z",
    "charges": null,
    "frm_metadata": null
}

Status should move to succeeded!

Scenario[3] Where connector sends correct data in both authorize and sync flow

#####Payments Create

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_ng5enE9FcquL9C0eYO1Jr0E6U8V8vbriDijpN4EgVpr1o31zWAMrVzkIt3q5ZvRh' \
--data-raw '
{
    "amount": 250,
    "currency": "USD",
    "confirm": true,
    "amount_to_capture": 250,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "customer_id": "StripeCustomer123",
    "email": "[email protected]",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Please Pay for your XYZ",
    "authentication_type": "no_three_ds",
    "return_url": "https://google.com",
    "setup_future_usage": "off_session",
    "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"
    },
    "routing": {
        "type": "single",
        "data": "nmi"
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "4242424242424242",
            "card_exp_month": "08",
            "card_exp_year": "25",
            "card_holder_name": "joseph Doe",
            "card_cvc": "999"
        }
    }
}
'

Response

{
    "payment_id": "pay_HD0mGNbh3sY4SDzEJsPv",
    "merchant_id": "merchant_1718267057",
    "status": "succeeded",
    "amount": 250,
    "net_amount": 250,
    "amount_capturable": 0,
    "amount_received": 250,
    "connector": "stripe",
    "client_secret": "pay_HD0mGNbh3sY4SDzEJsPv_secret_EpmbV93ry8SiEMGIjCDF",
    "created": "2024-06-24T11:16:26.868Z",
    "currency": "USD",
    "customer_id": "StripeCustomer123",
    "customer": {
        "id": "StripeCustomer123",
        "name": "John Doe",
        "email": "[email protected]",
        "phone": "999999999",
        "phone_country_code": "+65"
    },
    "description": "Please Pay for your XYZ",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4242",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "424242",
            "card_extended_bin": null,
            "card_exp_month": "08",
            "card_exp_year": "25",
            "card_holder_name": "joseph Doe",
            "payment_checks": {
                "address_line1_check": null,
                "address_postal_code_check": null,
                "cvc_check": "pass"
            },
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": "[email protected]",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": "https://google.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "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": "StripeCustomer123",
        "created_at": 1719227786,
        "expires": 1719231386,
        "secret": "epk_3f099e2eb5f74a1db265f81af40082b3"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "pi_3PVAsqCuXDMKrYZe1FwwRbez",
    "frm_message": null,
    "metadata": {
        "udf1": "value1",
        "login_date": "2019-09-10T10:11:12Z",
        "new_customer": "true"
    },
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "pi_3PVAsqCuXDMKrYZe1FwwRbez",
    "payment_link": null,
    "profile_id": "pro_rhbVuxclv1iy3M2pZkkI",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_sKlZxW37AYQNFv4Z4LGy",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-06-24T11:31:26.868Z",
    "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_method_id": null,
    "payment_method_status": null,
    "updated": "2024-06-24T11:16:29.856Z",
    "charges": null,
    "frm_metadata": null
}

#####Payments Sync

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

Response

{
    "payment_id": "pay_HD0mGNbh3sY4SDzEJsPv",
    "merchant_id": "merchant_1718267057",
    "status": "succeeded",
    "amount": 250,
    "net_amount": 250,
    "amount_capturable": 0,
    "amount_received": 250,
    "connector": "stripe",
    "client_secret": "pay_HD0mGNbh3sY4SDzEJsPv_secret_EpmbV93ry8SiEMGIjCDF",
    "created": "2024-06-24T11:16:26.868Z",
    "currency": "USD",
    "customer_id": "StripeCustomer123",
    "customer": {
        "id": "StripeCustomer123",
        "name": "John Doe",
        "email": "[email protected]",
        "phone": "999999999",
        "phone_country_code": "+65"
    },
    "description": "Please Pay for your XYZ",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4242",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "424242",
            "card_extended_bin": null,
            "card_exp_month": "08",
            "card_exp_year": "25",
            "card_holder_name": "joseph Doe",
            "payment_checks": {
                "cvc_check": "pass",
                "address_line1_check": null,
                "address_postal_code_check": null
            },
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": "[email protected]",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": "https://google.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "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": null,
    "manual_retry_allowed": false,
    "connector_transaction_id": "pi_3PVAsqCuXDMKrYZe1FwwRbez",
    "frm_message": null,
    "metadata": {
        "udf1": "value1",
        "login_date": "2019-09-10T10:11:12Z",
        "new_customer": "true"
    },
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "pi_3PVAsqCuXDMKrYZe1FwwRbez",
    "payment_link": null,
    "profile_id": "pro_rhbVuxclv1iy3M2pZkkI",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_sKlZxW37AYQNFv4Z4LGy",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-06-24T11:31:26.868Z",
    "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_method_id": null,
    "payment_method_status": null,
    "updated": "2024-06-24T11:16:29.856Z",
    "charges": null,
    "frm_metadata": 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

sahkal and others added 30 commits May 13, 2024 16:50
@hyperswitch-bot hyperswitch-bot bot removed the M-api-contract-changes Metadata: This PR involves API contract changes label Jul 1, 2024
jarnura
jarnura previously approved these changes Jul 2, 2024
@sahkal sahkal requested review from Narayanbhat166, a team and SamraatBansal and removed request for a team July 2, 2024 13:10
@@ -69,6 +69,14 @@ pub enum ValidationError {
InvalidValue { message: String },
}

/// Integrity check errors.
#[allow(missing_docs)] // Only to prevent warnings about struct fields not being documented
Copy link
Member

Choose a reason for hiding this comment

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

why do you not want to provide docs to fields?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

provided docs

status: updated_attempt_status,
connector: None,
connector_transaction_id: connector_transaction_id.clone(),
authentication_type: None,
Copy link
Member

Choose a reason for hiding this comment

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

why is this update made as None?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

had removed it while resolving merge conflicts my bad! Adding it back

(router): added error_code to integrity check failures
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.

LGTM from connector module stripe.rs

@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Jul 4, 2024
Merged via the queue into main with commit c8c0cb7 Jul 4, 2024
11 checks passed
@Gnanasundari24 Gnanasundari24 deleted the 4889-enable-integrity-check-for-authorize-flow branch July 4, 2024 09:56
pixincreate added a commit that referenced this pull request Jul 5, 2024
…ify-cypress

* 'main' of github.com:juspay/hyperswitch: (22 commits)
  refactor: Adding millisecond to Kafka timestamp (#5202)
  chore(version): 2024.07.05.0
  fix(user_auth_method): make id option in auth select (#5213)
  Docs: Updated API - ref for payments (#5172)
  feat(core): add merchant order reference id (#5197)
  feat(analytics): Refund status serialization issue for ckh analytics (#5199)
  fix(router): `override setup_future_usage` filed to on_session based on merchant config (#5195)
  feat(cypress): make tests forcefully skippable (#5176)
  feat(core): Added integrity framework for Authorize and Sync flow with connector as Stripe (#5109)
  ci(cypress): Update card number for adyen and status for paypal (#5192)
  refactor(cypress): error handling and add sync refunds in places where missing (#5128)
  feat(analytics): FRM Analytics (#4880)
  chore(version): 2024.07.04.0
  feat(pm_auth): Added balance check for PM auth bank account (#5054)
  refactor(payment_methods): add appropriate missing logs (#5190)
  refactor(migrations): add commands to make file to run migrations for api v2 (#5169)
  chore(version): 2024.07.03.0
  fix(event): Updated the ApiEventMetric (#5126)
  feat(router): add refunds manual-update api (#5094)
  refactor(payment_link): logs payment links logs coverage (#4918)
  ...
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Jul 7, 2024
Narayanbhat166 added a commit that referenced this pull request Jul 8, 2024
…h connector as Stripe (#5109)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Hrithikesh <[email protected]>
Co-authored-by: Narayan Bhat <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows A-framework Area: Framework C-feature Category: Feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants