Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(connector): [Adyenplatform] add webhooks for payout #5749

Merged
merged 4 commits into from
Sep 2, 2024

Conversation

Sakilmostak
Copy link
Contributor

@Sakilmostak Sakilmostak commented Aug 30, 2024

Type of Change

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

Description

Webhooks are added for payout events in adyenplatform

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?

Tested through Postman:

  • Create an mca with merchant_secret of adyenplatform (hmac key):
{
    "connector_type": "payout_processor",
    "connector_name": "adyenplatform",
    "connector_account_details": {
        "auth_type": "HeaderKey",
        "api_key": "{{adyen_platform_api_key}}"
    },
    "test_mode": true,
    "disabled": false,
    "metadata": {
        "city": "NY",
        "unit": "245",
        "source_balance_account": "{{adyen_platform_balance_account_id}}"
    },
    "connector_webhook_details": {
        "merchant_secret": "{{merchant_secret}}"
    }
}
  • Setup webhook endpoint at adyenplatform dasbhoard
  • Create a payment through adyenplatform
{
    "amount": 100,
    "currency": "EUR",
    "customer_id": "{{customer_id}}",
    "email": "payout_customer@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Its my first payout request",
    "payout_type": "bank",
    "priority": "regular",
    "payout_method_data": {
        "bank": {
            "iban": "NL91ABNA0417164300"
        }
    },
    "connector": [
        "adyenplatform"
    ],
    "billing": {
        "address": {
            "line1": "Raadhuisplein",
            "line2": "92",
            "city": "Hoogeveen",
            "state": "FL",
            "zip": "7901 BW",
            "country": "NL",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "0650242319",
            "country_code": "+31"
        }
    },
    "entity_type": "Individual",
    "recurring": true,
    "metadata": {
        "ref": "123"
    },
    "confirm": true,
    "auto_fulfill": true
}
  • You should receive following webhook at your set endpoint
image

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

@Sakilmostak Sakilmostak added A-connector-integration Area: Connector integration C-feature Category: Feature request or enhancement Payouts Area: Payouts labels Aug 30, 2024
@Sakilmostak Sakilmostak self-assigned this Aug 30, 2024
@Sakilmostak Sakilmostak requested a review from a team as a code owner August 30, 2024 07:55
Copy link

semanticdiff-com bot commented Aug 30, 2024

Review changes with SemanticDiff.

Analyzed 2 of 2 files.

Overall, the semantic diff is 10% smaller than the GitHub diff.

Filename Status
✔️ crates/router/src/connector/adyenplatform.rs 16.33% smaller
✔️ crates/router/src/connector/adyenplatform/transformers/payouts.rs Analyzed

AkshayaFoiger
AkshayaFoiger previously approved these changes Aug 30, 2024
kashif-m
kashif-m previously approved these changes Sep 2, 2024
@Sakilmostak Sakilmostak dismissed stale reviews from kashif-m and AkshayaFoiger via 27cd0e8 September 2, 2024 10:02
@likhinbopanna likhinbopanna added this pull request to the merge queue Sep 2, 2024
Merged via the queue into main with commit 258212d Sep 2, 2024
16 of 18 checks passed
@likhinbopanna likhinbopanna deleted the adyenplatform_webhook branch September 2, 2024 14:16
pixincreate added a commit that referenced this pull request Sep 3, 2024
…config-fix

* 'main' of github.com:juspay/hyperswitch:
  feat: add profile_id authentication for business profile update and list (#5673)
  chore(version): 2024.09.03.0
  feat(user): implement invitations api (#5769)
  feat(connector): [Adyenplatform] add webhooks for payout (#5749)
  refactor(v2_migrations): re-organize v2 migrations (#5760)
  chore: add wasm support for connector additional details (#5712)
  refactor(connector): Move globepay, powertranz, tsys, worldline to hyperswitch_connectors (#5758)
  fix(cypress): fix cypress throwing error when `connectorId` is not passed and miscellaneous fixes (#5746)
  chore: fix typos (#5766)
  refactor(business_profile): change id for business profile (#5748)
@Sakilmostak Sakilmostak modified the milestone: October 2024 Release Oct 9, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-connector-integration Area: Connector integration C-feature Category: Feature request or enhancement Payouts Area: Payouts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants