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(connector): [Paypal] implement vaulting for paypal wallet and cards while purchasing #5323

Merged
merged 22 commits into from
Nov 5, 2024

Conversation

KiranKBR
Copy link
Contributor

@KiranKBR KiranKBR commented Jul 15, 2024

Type of Change

  • New feature

Description

This PR implements Vaulting while purchasing(Mandate flows) for Paypal connector for Card, Paypal redirection and Paypal SDK payment methods.

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?

  1. Create a Paypal Card Request (CIT)
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: {}' \
--data-raw '{
    "amount": 6540,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "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",
    "setup_future_usage": "off_session",
    "customer_acceptance": {
        "acceptance_type": "offline",
        "accepted_at": "1963-05-03T04:07:52.723Z",
        "online": {
            "ip_address": "13.232.74.226",
            "user_agent": "amet irure esse"
        }
    },
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "4012000033330026",
            "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": "PiX"
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "PiX"
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }
}'

Response

{
    "payment_id": "pay_01ATaA81YclH6LewH4i6",
    "merchant_id": "merchant_1730195598",
    "status": "succeeded",
    "amount": 6540,
    "net_amount": 6540,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 6540,
    "connector": "paypal",
    "client_secret": "pay_01ATaA81YclH6LewH4i6_secret_vX7C6F7gK7C95VgdECLi",
    "created": "2024-11-03T15:59:28.560Z",
    "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": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "0026",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "401200",
            "card_extended_bin": null,
            "card_exp_month": "10",
            "card_exp_year": "25",
            "card_holder_name": null,
            "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": "PiX",
            "last_name": null
        },
        "phone": null,
        "email": null
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "PiX",
            "last_name": null
        },
        "phone": null,
        "email": null
    },
    "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": 1730649568,
        "expires": 1730653168,
        "secret": "epk_4ee06de7056e47fdae8101ed372be814"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "6MP9513504803263N",
    "frm_message": null,
    "metadata": {
        "udf1": "value1",
        "login_date": "2019-09-10T10:11:12Z",
        "new_customer": "true"
    },
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "pay_01ATaA81YclH6LewH4i6_1",
    "payment_link": null,
    "profile_id": "pro_tGKR3r2IFzb9PRFzuLAj",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_kqW3BOGnobT4zfviyywR",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-11-03T16:14:28.560Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": "pm_SdAe0ppJf2EPfKKRbEw3",
    "payment_method_status": "active",
    "updated": "2024-11-03T15:59:36.984Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": "20a564405w922772c"
}

Check for payment_method_id in response

  1. Create a Payment with vault:
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: __' \
--data-raw '{
    "amount": 499,
    "currency": "USD",
    "confirm": true,
    "profile_id": "pro_tGKR3r2IFzb9PRFzuLAj",
    "capture_method": "automatic",
    "customer_id": "StripeCustomer",
    "email": "guest@example.com",
    "off_session": true,
    "recurring_details": {
        "type": "payment_method_id",
        "data": "{__}"
    },
    "authentication_type": "no_three_ds"
}'

Response

{
    "payment_id": "pay_6e8D6lCZPx1EbBjDVJXf",
    "merchant_id": "merchant_1730195598",
    "status": "succeeded",
    "amount": 499,
    "net_amount": 499,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 499,
    "connector": "paypal",
    "client_secret": "pay_6e8D6lCZPx1EbBjDVJXf_secret_59QXsN51aTiHer7uz0Zp",
    "created": "2024-11-03T15:59:43.371Z",
    "currency": "USD",
    "customer_id": "StripeCustomer",
    "customer": {
        "id": "StripeCustomer",
        "name": "John Doe",
        "email": "guest@example.com",
        "phone": "999999999",
        "phone_country_code": "+1"
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": true,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "0026",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "401200",
            "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": null,
    "billing": null,
    "order_details": null,
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "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": "StripeCustomer",
        "created_at": 1730649583,
        "expires": 1730653183,
        "secret": "epk_3ff4d701d6af456fb712548809fa7a59"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "2TH799216G1813319",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "pay_6e8D6lCZPx1EbBjDVJXf_1",
    "payment_link": null,
    "profile_id": "pro_tGKR3r2IFzb9PRFzuLAj",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_kqW3BOGnobT4zfviyywR",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-11-03T16:14:43.371Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": "pm_SdAe0ppJf2EPfKKRbEw3",
    "payment_method_status": "active",
    "updated": "2024-11-03T15:59:48.133Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": "20a564405w922772c"
}

  1. Create a Paypal Redirect Payment: (CIT)
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_eIrDR05fM0F4gf5fOhzrRYMpLEWfOWH5uVozax981I2THdaCrgmwiow3dGaGxVKP' \
--data-raw '{
    "amount": 654,
    "currency": "EUR",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 654,
    "customer_id": "StripeCustomer223",
    "email": "abcdef123@gmail.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Its my first payment request",
    
    "return_url": "https://duck.com",
    
    "setup_future_usage": "off_session",
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US"
        }
    },
    "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"
    },
    "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"
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "payment_method": "wallet",
    "payment_method_type": "paypal",
    "payment_method_data": {
        "wallet": {
            "paypal_redirect": {}
        }
    },
    "customer_acceptance": {
        "acceptance_type": "offline",
        "accepted_at": "1963-05-03T04:07:52.723Z",
        "online": {
            "ip_address": "13.232.74.226",
            "user_agent": "amet irure esse"
        }
    }
}'

response:

{
    "payment_id": "pay_42hrpyxeWTS7NS0NXW0j",
    "merchant_id": "merchant_1724323374",
    "status": "requires_customer_action",
    "amount": 654,
    "net_amount": 654,
    "amount_capturable": 654,
    "amount_received": null,
    "connector": "paypal",
    "client_secret": "pay_42hrpyxeWTS7NS0NXW0j_secret_X48UnGBeTRElSVzcOMvI",
    "created": "2024-08-22T11:04:56.338Z",
    "currency": "EUR",
    "customer_id": "StripeCustomer223",
    "customer": {
        "id": "StripeCustomer223",
        "name": "John Doe",
        "email": "abcdef123@gmail.com",
        "phone": "999999999",
        "phone_country_code": "+65"
    },
    "description": "Its my first payment request",
    "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": "wallet",
    "payment_method_data": {
        "wallet": {},
        "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": null
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": null,
            "last_name": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": "abcdef123@gmail.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": {
        "type": "redirect_to_url",
        "redirect_to_url": "http://localhost:8080/payments/redirect/pay_42hrpyxeWTS7NS0NXW0j/merchant_1724323374/pay_42hrpyxeWTS7NS0NXW0j_1"
    },
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "paypal",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "StripeCustomer223",
        "created_at": 1724324696,
        "expires": 1724328296,
        "secret": "epk_d7d4396e232a4c83bf734b9091cb4dd6"
    },
    "manual_retry_allowed": null,
    "connector_transaction_id": "8NY95914BG6889731",
    "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_SmhBWSeP2rbSxK4jK1jE",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_RCqgqX4n5WsNHdbzwHO6",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-08-22T11:19:56.337Z",
    "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": "pm_M0zZ4dHkloCyaX6H6vV1",
    "payment_method_status": null,
    "updated": "2024-08-22T11:04:58.745Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null
}

Check for payment_method_id in response
Complete the payment using redirect url.

  1. Payment with vault: (MIT)
    request:
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_eIrDR05fM0F4gf5fOhzrRYMpLEWfOWH5uVozax981I2THdaCrgmwiow3dGaGxVKP' \
--data-raw '{
    "amount": 499,
    "currency": "EUR",
    "confirm": true,
    "profile_id": "pro_SmhBWSeP2rbSxK4jK1jE",
    "capture_method": "automatic",
    "customer_id": "StripeCustomer223",
    "email": "guest@example.com",
    "off_session": true,
    "recurring_details": {
        "type": "payment_method_id",
        "data": "{__}"
    },
    "authentication_type": "no_three_ds"
}'

response:

{
    "payment_id": "pay_1BPTB4CGBhGuUGEEwMOZ",
    "merchant_id": "merchant_1724323374",
    "status": "succeeded",
    "amount": 499,
    "net_amount": 499,
    "amount_capturable": 0,
    "amount_received": 499,
    "connector": "paypal",
    "client_secret": "{_}",
    "created": "2024-08-22T11:06:48.700Z",
    "currency": "EUR",
    "customer_id": "StripeCustomer223",
    "customer": {
        "id": "StripeCustomer223",
        "name": "John Doe",
        "email": "guest@example.com",
        "phone": "999999999",
        "phone_country_code": "+65"
    },
    "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": "wallet",
    "payment_method_data": null,
    "payment_token": null,
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "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": "paypal",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "StripeCustomer223",
        "created_at": 1724324808,
        "expires": 1724328408,
        "secret": "epk_34b80fb13f764e80b2ac0054b35fcec4"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "2LR05925G7676561P",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_SmhBWSeP2rbSxK4jK1jE",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_RCqgqX4n5WsNHdbzwHO6",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-08-22T11:21:48.700Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": "pm_M0zZ4dHkloCyaX6H6vV1",
    "payment_method_status": "active",
    "updated": "2024-08-22T11:06:52.436Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null
}
  • Note: We have to test test same flow for Paypal SDK.

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

@KiranKBR KiranKBR requested a review from a team as a code owner July 15, 2024 09:45
@KiranKBR KiranKBR force-pushed the paypal-wallet-vaulting-while-purchasing branch from fde6085 to 19cb59c Compare July 16, 2024 09:00
@KiranKBR KiranKBR requested a review from a team as a code owner July 16, 2024 09:00
@KiranKBR KiranKBR requested a review from a team as a code owner July 17, 2024 01:01
@KiranKBR KiranKBR force-pushed the paypal-wallet-vaulting-while-purchasing branch from 41b8e3d to 6020ff0 Compare July 23, 2024 07:35
@KiranKBR KiranKBR force-pushed the paypal-wallet-vaulting-while-purchasing branch from 1b93889 to 1d46cab Compare August 6, 2024 10:34
@KiranKBR KiranKBR requested review from a team as code owners August 6, 2024 10:34
@KiranKBR KiranKBR force-pushed the paypal-wallet-vaulting-while-purchasing branch from 8ce2657 to 6020ff0 Compare August 6, 2024 17:38
@KiranKBR KiranKBR force-pushed the paypal-wallet-vaulting-while-purchasing branch from e1e5cfc to 7a23d81 Compare August 22, 2024 06:57
@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Aug 22, 2024
@KiranKBR KiranKBR force-pushed the paypal-wallet-vaulting-while-purchasing branch from 79d3ea7 to 4e3bb00 Compare August 22, 2024 07:54
@hyperswitch-bot hyperswitch-bot bot added M-api-contract-changes Metadata: This PR involves API contract changes and removed M-api-contract-changes Metadata: This PR involves API contract changes labels Aug 22, 2024
@KiranKBR KiranKBR self-assigned this Aug 22, 2024
@KiranKBR KiranKBR force-pushed the paypal-wallet-vaulting-while-purchasing branch from eda1dc5 to 0ad1603 Compare August 22, 2024 10:30
@hyperswitch-bot hyperswitch-bot bot removed the M-api-contract-changes Metadata: This PR involves API contract changes label Aug 22, 2024
@KiranKBR KiranKBR force-pushed the paypal-wallet-vaulting-while-purchasing branch from 7f60ea2 to b6bcb25 Compare August 22, 2024 11:22

#[derive(Debug, Serialize, Deserialize)]
pub struct CardVaultStruct {
vault_id: String,
Copy link
Member

Choose a reason for hiding this comment

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

We can make this a Secret if this is considered sensitive information.

Comment on lines 252 to 250
pub struct PaypalVaultStruct {
vault_id: String,
}
Copy link
Member

Choose a reason for hiding this comment

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

How is this different from CardVaultStruct?

name: item
.router_data
.get_optional_billing_full_name()
.unwrap_or(Secret::new("".to_string())),
Copy link
Member

Choose a reason for hiding this comment

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

Are we okay with sending empty strings for name?

Comment on lines 1677 to 1680
)) {
Ok(url) => Some(url),
Err(_) => None,
},
Copy link
Member

Choose a reason for hiding this comment

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

Are we okay with doing nothing when we receive an error? Can we at least log it?

@KiranKBR KiranKBR removed request for a team and SanchithHegde September 1, 2024 06:15
swangi-kumari
swangi-kumari previously approved these changes Sep 1, 2024
AkshayaFoiger
AkshayaFoiger previously approved these changes Sep 2, 2024
@swangi-kumari swangi-kumari dismissed stale reviews from AkshayaFoiger and themself via b3b0316 October 28, 2024 10:47
@swangi-kumari swangi-kumari self-assigned this Oct 29, 2024
SanchithHegde
SanchithHegde previously approved these changes Nov 4, 2024
deepanshu-iiitu
deepanshu-iiitu previously approved these changes Nov 4, 2024
@likhinbopanna likhinbopanna added this pull request to the merge queue Nov 4, 2024
github-merge-queue bot pushed a commit that referenced this pull request Nov 4, 2024
…rds while purchasing (#5323)

Co-authored-by: swangi-kumari <swangi.12015941@lpu.in>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 4, 2024
@likhinbopanna likhinbopanna added this pull request to the merge queue Nov 5, 2024
Merged via the queue into main with commit 22ba2db Nov 5, 2024
16 of 17 checks passed
@likhinbopanna likhinbopanna deleted the paypal-wallet-vaulting-while-purchasing branch November 5, 2024 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-connector-integration Area: Connector integration C-feature Category: Feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants