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

fix(connector): [Adyen] update config and add required fields #4046

Merged
merged 2 commits into from
Mar 12, 2024

Conversation

SamraatBansal
Copy link
Contributor

@SamraatBansal SamraatBansal commented Mar 12, 2024

Type of Change

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

Description

  • Update Prod URL endpoint
  • Handle refunds webhooks using hyperswitch internal refund id
  • Add card holder name

Additional Changes

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

Updated Prod URL endpoint

Motivation and Context

#4047

How did you test it?

  • Trigger a refunds transaction
curl --location 'http://localhost:8080/refunds' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_gwfA0IT4jpKdcUSmJlWMJ0jawjc5ziP6lA91du0gpc9ydEzI5HajDN18Wr72NkS7' \
--data '{
    "payment_id": "pay_ow2YSNvgVDZlGTv3o8wc",
    
    "reason": "RETURN",
    "refund_type": "instant",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }
}'
  • Check for outgoing webhook and also retrieve the refund to confirm the Status change
    Screenshot 2024-03-12 at 6 31 39 PM

  • Send card holder name in the cards request it should be visible in Adyen Dashboard for the payment

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_gwfA0IT4jpKdcUSmJlWMJ0jawjc5ziP6lA91du0gpc9ydEzI5HajDN18Wr72NkS7' \
--data-raw '{
    "amount": 6540,
    "currency": "EUR",
    "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",
    "profile_id": "pro_8Ix85cVgHD3x4DQIFZTV",
    "business_country": "US",
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "371449635398431",
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": "joseph Doe",
            "card_cvc": "7373"
        }
    },
    "routing": {
        "type": "single",
        "data": "adyen"
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "DE",
            "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": "This is me making a statement",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }
}'

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
  • I added a CHANGELOG entry if applicable

@SamraatBansal SamraatBansal self-assigned this Mar 12, 2024
@SamraatBansal SamraatBansal requested review from a team as code owners March 12, 2024 12:58
@SamraatBansal SamraatBansal linked an issue Mar 12, 2024 that may be closed by this pull request
2 tasks
@likhinbopanna likhinbopanna added this pull request to the merge queue Mar 12, 2024
Merged via the queue into main with commit 16d73cb Mar 12, 2024
21 of 24 checks passed
@likhinbopanna likhinbopanna deleted the fix/adyen-fields branch March 12, 2024 13:58
@SamraatBansal SamraatBansal added A-connector-integration Area: Connector integration C-bug Category: Bug M-configuration-changes Metadata: This PR involves configuration changes C-refactor Category: Refactor labels Mar 12, 2024
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-bug Category: Bug C-refactor Category: Refactor M-configuration-changes Metadata: This PR involves configuration changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] : [Adyen] Production URL endpoint
4 participants