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): add support for payments overcapture #6824

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

AkshayaFoiger
Copy link
Contributor

@AkshayaFoiger AkshayaFoiger commented Dec 12, 2024

Note: This feature is supported only via manual capture
-> Cypress test not added because it cannot be tested, via stripe. As this functionality has to be enabled by stripe.
-> Integrated only for stripe card flow

Type of Change

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

Description

Overcapture allows you to capture with an amount that’s higher than the authorised amount for a card payment. Unlike incremental authorisations, overcapture doesn’t result in additional authorisations with the card networks.

Additional Changes

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

API contract changes:

a) /payments create request to include request_overcapture boolean

b) /payments response to include

overcapture_applied (boolean)
maximum_capturable_amount (int)

DB changes:

a) request_overcapture boolean field to be introduced in payment_intent

b) overcapture_details struct to be introduced in payment_attempt

{"overcapture_applied": false, "overcaptured_amount": null, "request_overcapture": false, "maximum_capturable_amount": 6540}

c) overcaptured_amount int field to be introduced in payment_attempt's net_amount field

d) always_request_overcapture boolean field to be introduced in business_profiles table

Not Handled

a) Error is not thrown, when not supported by the connector.

b)List of supported connector and payment method not maintained. These changes will be taken as a phase 2 change

How did you test it?

  1. Create/ Update a business_profile with "always_request_overcapture": true
curl --location 'http://localhost:8080/account/postman_merchant_GHAction_358cf835-2879-4d90-8475-ef0e1a246611/business_profile/pro_bzfd1zHHxs30uUyc2TQg' \
--header 'Content-Type: application/json' \
--header 'api-key: test_admin' \
--data '{
  "profile_name": "US_default",
  "always_request_overcapture": true
}'

Response

{
    "merchant_id": "postman_merchant_GHAction_358cf835-2879-4d90-8475-ef0e1a246611",
    "profile_id": "pro_bzfd1zHHxs30uUyc2TQg",
    "profile_name": "US_default",
    "return_url": "https://duck.com/success",
    "enable_payment_response_hash": true,
    "payment_response_hash_key": "83d4dikvQDLVgKR2jQDWYODswS1Tw6R2IP40rBatKGBEJwX6LhNeuNQbLzQIrX7T",
    "redirect_to_merchant_with_http_post": false,
    "webhook_details": {
        "webhook_version": "1.0.1",
        "webhook_username": "ekart_retail",
        "webhook_password": "password_ekart@123",
        "webhook_url": null,
        "payment_created_enabled": true,
        "payment_succeeded_enabled": true,
        "payment_failed_enabled": true
    },
    "metadata": null,
    "routing_algorithm": null,
    "intent_fulfillment_time": 900,
    "frm_routing_algorithm": null,
    "payout_routing_algorithm": null,
    "applepay_verified_domains": null,
    "session_expiry": 900,
    "payment_link_config": null,
    "authentication_connector_details": null,
    "use_billing_as_payment_method_billing": true,
    "extended_card_info_config": null,
    "collect_shipping_details_from_wallet_connector": false,
    "collect_billing_details_from_wallet_connector": false,
    "always_collect_shipping_details_from_wallet_connector": false,
    "always_collect_billing_details_from_wallet_connector": false,
    "is_connector_agnostic_mit_enabled": false,
    "payout_link_config": null,
    "outgoing_webhook_custom_http_headers": null,
    "tax_connector_id": null,
    "is_tax_connector_enabled": false,
    "is_network_tokenization_enabled": false,
    "is_auto_retries_enabled": false,
    "max_auto_retries_enabled": null,
    "is_click_to_pay_enabled": false,
    "authentication_product_ids": null,
    "always_request_overcapture": true
}

DB - business_profile will have a field called always_request_overcapture , marked as true
Screenshot 2024-12-23 at 3 07 37 PM

  1. Do a payment via stripe, without sending request_overcapture in the payment request
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_oqtfJBx4JGn0Pmr3ZLtDMyUEzRZQ0IBeqnvImk4W1lbRHnh07rqLSXNTv8JKYk9L' \
--data-raw '{
    "amount": 6540,
    "currency": "USD",
    "confirm": true,
    "capture_method": "manual",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 6540,
    "customer_id": "StripeCustomer",
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://duck.com",
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "4242424242424242",
            "card_exp_month": "10",
            "card_exp_year": "25",
            "card_holder_name": "joseph Doe",
            "card_cvc": "123"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        },
        "email": "example@example.com"
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "routing": {
        "type": "single",
        "data": {
            "connector": "stripe",
            "merchant_connector_id": "mca_5SMXtr84AcZ8zhBefG8d"
        }
    }
    
}'

Cannot be tested because, this feature needs to be enabled at stripe
Response

{
    "payment_id": "pay_AmT397cniDgIldfJbugG",
    "merchant_id": "postman_merchant_GHAction_77b1a97f-001b-458d-b185-67998995c880",
    "status": "failed",
    "amount": 6540,
    "net_amount": 6540,
    "shipping_cost": null,
    "amount_capturable": 6540,
    "amount_received": null,
    "connector": "stripe",
    "client_secret": "pay_AmT397cniDgIldfJbugG_secret_KTnMJZjgrKg9ABMSZ4hP",
    "created": "2024-12-23T09:51:43.572Z",
    "currency": "USD",
    "customer_id": "StripeCustomer",
    "customer": {
        "id": "StripeCustomer",
        "name": "John Doe",
        "email": "guest@example.com",
        "phone": "999999999",
        "phone_country_code": "+1"
    },
    "description": "Its my first payment request",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "manual",
    "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": "10",
            "card_exp_year": "25",
            "card_holder_name": "joseph Doe",
            "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": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        },
        "email": "example@example.com"
    },
    "order_details": null,
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": "https://duck.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "next_action": null,
    "cancellation_reason": null,
    "error_code": "payment_intent_invalid_parameter",
    "error_message": "This account is not eligible for the requested card features. See https://stripe.com/docs/payments/flexible-payments for more details.",
    "unified_code": "UE_9000",
    "unified_message": "Something went wrong",
    "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": "StripeCustomer",
        "created_at": 1734947503,
        "expires": 1734951103,
        "secret": "epk_2fc47b302b284925926a5e8ad5e658c5"
    },
    "manual_retry_allowed": true,
    "connector_transaction_id": "pi_3QZ8IdIVaesDjvMP001jsdN2",
    "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_ZzurAEZrSqx46L8gNMk5",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_5SMXtr84AcZ8zhBefG8d",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-12-23T10:06:43.572Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2024-12-23T09:51:44.486Z",
    "split_payments": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "overcapture_applied": null,               // Because connector sends an error msg
    "maximum_capturable_amount": null. // Because connector sends an error msg
}
  1. Create a update the business account "always_request_overcapture": false
curl --location 'http://localhost:8080/account/postman_merchant_GHAction_77b1a97f-001b-458d-b185-67998995c880/business_profile/pro_ZzurAEZrSqx46L8gNMk5' \
--header 'Content-Type: application/json' \
--header 'api-key: test_admin' \
--data '{
  "profile_name": "US_default",
  "always_request_overcapture": false
}'

Response

{
    "merchant_id": "postman_merchant_GHAction_77b1a97f-001b-458d-b185-67998995c880",
    "profile_id": "pro_ZzurAEZrSqx46L8gNMk5",
    "profile_name": "US_default",
    "return_url": "https://duck.com/success",
    "enable_payment_response_hash": true,
    "payment_response_hash_key": "iJLfkEZljBCu2mNKSoAp2fOOh84X4WJPBAtkAJE4s4Tqjne78DrKkJUjWcv01PEG",
    "redirect_to_merchant_with_http_post": false,
    "webhook_details": {
        "webhook_version": "1.0.1",
        "webhook_username": "ekart_retail",
        "webhook_password": "password_ekart@123",
        "webhook_url": null,
        "payment_created_enabled": true,
        "payment_succeeded_enabled": true,
        "payment_failed_enabled": true
    },
    "metadata": null,
    "routing_algorithm": null,
    "intent_fulfillment_time": 900,
    "frm_routing_algorithm": null,
    "payout_routing_algorithm": null,
    "applepay_verified_domains": null,
    "session_expiry": 900,
    "payment_link_config": null,
    "authentication_connector_details": null,
    "use_billing_as_payment_method_billing": true,
    "extended_card_info_config": null,
    "collect_shipping_details_from_wallet_connector": false,
    "collect_billing_details_from_wallet_connector": false,
    "always_collect_shipping_details_from_wallet_connector": false,
    "always_collect_billing_details_from_wallet_connector": false,
    "is_connector_agnostic_mit_enabled": false,
    "payout_link_config": null,
    "outgoing_webhook_custom_http_headers": null,
    "tax_connector_id": null,
    "is_tax_connector_enabled": false,
    "is_network_tokenization_enabled": false,
    "is_auto_retries_enabled": false,
    "max_auto_retries_enabled": null,
    "is_click_to_pay_enabled": false,
    "authentication_product_ids": null,
    "always_request_overcapture": false
}
  1. Create an overcapture payment with stripe
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_oqtfJBx4JGn0Pmr3ZLtDMyUEzRZQ0IBeqnvImk4W1lbRHnh07rqLSXNTv8JKYk9L' \
--data-raw '{
    "amount": 6540,
    "currency": "USD",
    "confirm": true,
    "capture_method": "manual",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 6540,
    "customer_id": "StripeCustomer",
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://duck.com",
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "4242424242424242",
            "card_exp_month": "10",
            "card_exp_year": "25",
            "card_holder_name": "joseph Doe",
            "card_cvc": "123"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        },
        "email": "example@example.com"
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "routing": {
        "type": "single",
        "data": {
            "connector": "stripe",
            "merchant_connector_id": "mca_5SMXtr84AcZ8zhBefG8d"
        }
    }
    ,"request_overcapture": false
}'

Response

{
    "payment_id": "pay_FKzjYUzqpSigIfzoXolG",
    "merchant_id": "postman_merchant_GHAction_77b1a97f-001b-458d-b185-67998995c880",
    "status": "requires_capture",
    "amount": 6540,
    "net_amount": 6540,
    "shipping_cost": null,
    "amount_capturable": 6540,
    "amount_received": 0,
    "connector": "stripe",
    "client_secret": "pay_FKzjYUzqpSigIfzoXolG_secret_sB7pumP3GJcc4ZnSvCxX",
    "created": "2024-12-23T09:57:04.620Z",
    "currency": "USD",
    "customer_id": "StripeCustomer",
    "customer": {
        "id": "StripeCustomer",
        "name": "John Doe",
        "email": "guest@example.com",
        "phone": "999999999",
        "phone_country_code": "+1"
    },
    "description": "Its my first payment request",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "manual",
    "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": "10",
            "card_exp_year": "25",
            "card_holder_name": "joseph Doe",
            "payment_checks": {
                "cvc_check": "pass",
                "address_line1_check": "pass",
                "address_postal_code_check": "pass"
            },
            "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": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        },
        "email": "example@example.com"
    },
    "order_details": null,
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": "https://duck.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": "StripeCustomer",
        "created_at": 1734947824,
        "expires": 1734951424,
        "secret": "epk_54c122be30324503a3199e33d42fff0f"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "pi_3QZ8NpIVaesDjvMP1f6ANdO7",
    "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_3QZ8NpIVaesDjvMP1f6ANdO7",
    "payment_link": null,
    "profile_id": "pro_ZzurAEZrSqx46L8gNMk5",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_5SMXtr84AcZ8zhBefG8d",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-12-23T10:12:04.620Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2024-12-23T09:57:06.130Z",
    "split_payments": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "overcapture_applied": false,
    "maximum_capturable_amount": 6540
}

Screenshot 2024-12-24 at 3 05 48 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

@AkshayaFoiger AkshayaFoiger requested review from a team as code owners December 12, 2024 07:09
Copy link

semanticdiff-com bot commented Dec 12, 2024

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/core/payments/helpers.rs  41% smaller
  crates/openapi/src/openapi_v2.rs  21% smaller
  crates/router/src/connector/stripe/transformers.rs  15% smaller
  api-reference-v2/openapi_spec.json  9% smaller
  api-reference/openapi_spec.json  4% smaller
  crates/diesel_models/src/payment_attempt.rs  1% smaller
  crates/router/src/types.rs  1% smaller
  connector-template/transformers.rs Unsupported file format
  crates/api_models/src/admin.rs  0% smaller
  crates/api_models/src/payments.rs  0% smaller
  crates/common_enums/Cargo.toml Unsupported file format
  crates/common_enums/src/enums.rs  0% smaller
  crates/common_enums/src/transformers.rs  0% smaller
  crates/common_utils/src/types.rs  0% smaller
  crates/diesel_models/Cargo.toml Unsupported file format
  crates/diesel_models/src/business_profile.rs  0% smaller
  crates/diesel_models/src/payment_intent.rs  0% smaller
  crates/diesel_models/src/schema.rs  0% smaller
  crates/diesel_models/src/user/sample_data.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/amazonpay/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/bambora/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/bamboraapac/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/billwerk/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/bitpay/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/bluesnap.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/boku/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/cashtocode/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/coinbase/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/cryptopay/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/deutschebank/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/digitalvirgo/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/dlocal/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/elavon/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/fiservemea/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/forte/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/globepay/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/helcim/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/inespay/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/mollie/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/nomupay/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/paybox/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/payeezy/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/payu/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/placetopay/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/powertranz/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/prophetpay/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/rapyd/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/square/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/stax/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/thunes/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/volt/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/worldline/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/worldpay.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/zen/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/zsl/transformers.rs  0% smaller
  crates/hyperswitch_domain_models/src/business_profile.rs  0% smaller
  crates/hyperswitch_domain_models/src/payments.rs  0% smaller
  crates/hyperswitch_domain_models/src/payments/payment_attempt.rs  0% smaller
  crates/hyperswitch_domain_models/src/payments/payment_intent.rs  0% smaller
  crates/hyperswitch_domain_models/src/router_data.rs  0% smaller
  crates/hyperswitch_domain_models/src/router_response_types.rs  0% smaller
  crates/router/src/connector/aci/transformers.rs  0% smaller
  crates/router/src/connector/adyen/transformers.rs  0% smaller
  crates/router/src/connector/authorizedotnet/transformers.rs  0% smaller
  crates/router/src/connector/bankofamerica/transformers.rs  0% smaller
  crates/router/src/connector/braintree/transformers.rs  0% smaller
  crates/router/src/connector/checkout/transformers.rs  0% smaller
  crates/router/src/connector/cybersource/transformers.rs  0% smaller
  crates/router/src/connector/dummyconnector/transformers.rs  0% smaller
  crates/router/src/connector/globalpay/transformers.rs  0% smaller
  crates/router/src/connector/iatapay/transformers.rs  0% smaller
  crates/router/src/connector/itaubank/transformers.rs  0% smaller
  crates/router/src/connector/klarna/transformers.rs  0% smaller
  crates/router/src/connector/mifinity/transformers.rs  0% smaller
  crates/router/src/connector/nmi/transformers.rs  0% smaller
  crates/router/src/connector/noon/transformers.rs  0% smaller
  crates/router/src/connector/nuvei/transformers.rs  0% smaller
  crates/router/src/connector/opayo/transformers.rs  0% smaller
  crates/router/src/connector/opennode/transformers.rs  0% smaller
  crates/router/src/connector/payme/transformers.rs  0% smaller
  crates/router/src/connector/paypal.rs  0% smaller
  crates/router/src/connector/paypal/transformers.rs  0% smaller
  crates/router/src/connector/plaid/transformers.rs  0% smaller
  crates/router/src/connector/trustpay/transformers.rs  0% smaller
  crates/router/src/connector/wellsfargo/transformers.rs  0% smaller
  crates/router/src/connector/wellsfargopayout/transformers.rs  0% smaller
  crates/router/src/core/admin.rs  0% smaller
  crates/router/src/core/authentication/transformers.rs  0% smaller
  crates/router/src/core/fraud_check/flows/checkout_flow.rs  0% smaller
  crates/router/src/core/fraud_check/flows/fulfillment_flow.rs  0% smaller
  crates/router/src/core/fraud_check/flows/record_return.rs  0% smaller
  crates/router/src/core/fraud_check/flows/sale_flow.rs  0% smaller
  crates/router/src/core/fraud_check/flows/transaction_flow.rs  0% smaller
  crates/router/src/core/mandate/utils.rs  0% smaller
  crates/router/src/core/payments/operations/payment_capture.rs  0% smaller
  crates/router/src/core/payments/operations/payment_confirm.rs  0% smaller
  crates/router/src/core/payments/operations/payment_create.rs  0% smaller
  crates/router/src/core/payments/operations/payment_response.rs  0% smaller
  crates/router/src/core/payments/operations/payment_update.rs  0% smaller
  crates/router/src/core/payments/operations/payment_update_intent.rs  0% smaller
  crates/router/src/core/payments/retry.rs  0% smaller
  crates/router/src/core/payments/transformers.rs  0% smaller
  crates/router/src/core/relay/utils.rs  0% smaller
  crates/router/src/core/unified_authentication_service/utils.rs Unsupported file format
  crates/router/src/core/utils.rs  0% smaller
  crates/router/src/core/webhooks/utils.rs  0% smaller
  crates/router/src/services/conversion_impls.rs  0% smaller
  crates/router/src/types/api/admin.rs  0% smaller
  crates/router/src/types/api/verify_connector.rs  0% smaller
  crates/router/src/types/storage/payment_attempt.rs  0% smaller
  crates/router/src/utils/user/sample_data.rs  0% smaller
  crates/router/tests/connectors/utils.rs  0% smaller
  crates/storage_impl/src/mock_db/payment_attempt.rs  0% smaller
  crates/storage_impl/src/payments/payment_attempt.rs  0% smaller
  migrations/2024-12-24-072648_add_always_request_overcapture/down.sql Unsupported file format
  migrations/2024-12-24-072648_add_always_request_overcapture/up.sql Unsupported file format
  migrations/2024-12-24-123457_add_overcapture_fields_to_payment_attempt/down.sql Unsupported file format
  migrations/2024-12-24-123457_add_overcapture_fields_to_payment_attempt/up.sql Unsupported file format
  migrations/2024-12-24-83746_add_request_overcapture_to_payment_intent/down.sql Unsupported file format
  migrations/2024-12-24-83746_add_request_overcapture_to_payment_intent/up.sql Unsupported file format

@AkshayaFoiger AkshayaFoiger marked this pull request as draft December 12, 2024 07:10
@hyperswitch-bot hyperswitch-bot bot added M-database-changes Metadata: This PR involves database schema changes M-api-contract-changes Metadata: This PR involves API contract changes labels Dec 12, 2024
@AkshayaFoiger AkshayaFoiger added the C-feature Category: Feature request or enhancement label Dec 12, 2024
@AkshayaFoiger AkshayaFoiger self-assigned this Dec 12, 2024
@AkshayaFoiger AkshayaFoiger changed the title feat(core): Core changes for support overcapture feat(core): Core changes to support overcapture Dec 16, 2024
@AkshayaFoiger AkshayaFoiger marked this pull request as ready for review December 17, 2024 06:47
@AkshayaFoiger AkshayaFoiger requested a review from a team as a code owner December 17, 2024 06:47
@AkshayaFoiger AkshayaFoiger marked this pull request as draft December 19, 2024 11:06
@AkshayaFoiger AkshayaFoiger marked this pull request as ready for review December 20, 2024 05:47
@AkshayaFoiger AkshayaFoiger changed the title feat(core): Core changes to support overcapture feat(core): add core support for overcapture for manual payments Dec 23, 2024
@AkshayaFoiger AkshayaFoiger changed the title feat(core): add core support for overcapture for manual payments feat(core): add core support for overcapture Dec 23, 2024
@AkshayaFoiger AkshayaFoiger changed the title feat(core): add core support for overcapture feat(core): add support for payments overcapture Dec 23, 2024
Comment on lines 1579 to 1582
println!(
"$$$$$4request_overcapture: {:?}",
item.router_data.request_overcapture
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we please remove this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: Feature request or enhancement M-api-contract-changes Metadata: This PR involves API contract changes M-database-changes Metadata: This PR involves database schema changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants