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

refactor(connector): [Paypal] Add support for both BodyKey and SignatureKey #2633

Merged
merged 23 commits into from
Nov 21, 2023

Conversation

swangi-kumari
Copy link
Contributor

@swangi-kumari swangi-kumari commented Oct 18, 2023

Type of Change

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

Description

  • Make PayPal support SignatureKey auth_type.
  • Add extra fields in orders request.

Additional Changes

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

Motivation and Context

To support PayPal onboarding flow.

How did you test it?

Postman.

Payment Connector - Create

Paypal now supports TemporaryAuth in the auth_type. You can find more details about this in this PR #2833.
Paypal also support SignatureKey in the auth_type.

curl --location 'http://localhost:8080/account/merchant_1700133263/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data '{
  "connector_type": "fiz_operations",
  "connector_name": "paypal",
  "connector_account_details": {
    "auth_type": "SignatureKey",
    "api_key": "client_secret",
    "key1": "client_id",
    "api_secret": "partner_id"
  },
  "status": "active",
  "disabled": false
}'

If all the fields are passed correctly you will a normal mca response.

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

@github-actions github-actions bot added the S-conventions-not-followed Status: This PR does not follow contributing guidelines label Oct 18, 2023
@swangi-kumari swangi-kumari changed the title Paypal auth refactor(connector): [Paypal] Add support for both BodyKey and SignatureKey Nov 3, 2023
@github-actions github-actions bot removed the S-conventions-not-followed Status: This PR does not follow contributing guidelines label Nov 3, 2023
@swangi-kumari swangi-kumari added A-connector-integration Area: Connector integration C-refactor Category: Refactor labels Nov 3, 2023
@swangi-kumari swangi-kumari marked this pull request as ready for review November 3, 2023 12:55
@swangi-kumari swangi-kumari requested a review from a team as a code owner November 3, 2023 12:55
@ThisIsMani ThisIsMani requested a review from prasunna09 November 7, 2023 08:56
@ThisIsMani ThisIsMani requested review from a team as code owners November 20, 2023 10:09
crates/router/src/connector/paypal/transformers.rs Outdated Show resolved Hide resolved
crates/router/src/connector/paypal/transformers.rs Outdated Show resolved Hide resolved
crates/router/src/connector/paypal/transformers.rs Outdated Show resolved Hide resolved
crates/router/src/connector/paypal/transformers.rs Outdated Show resolved Hide resolved
crates/router/src/connector/paypal/transformers.rs Outdated Show resolved Hide resolved
crates/router/src/connector/paypal/transformers.rs Outdated Show resolved Hide resolved
crates/router/src/core/errors.rs Outdated Show resolved Hide resolved
crates/router/src/connector/paypal.rs Outdated Show resolved Hide resolved
ArjunKarthik
ArjunKarthik previously approved these changes Nov 21, 2023
@ThisIsMani ThisIsMani linked an issue Nov 21, 2023 that may be closed by this pull request
2 tasks
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Nov 21, 2023
Merged via the queue into main with commit d8fcd3c Nov 21, 2023
12 of 14 checks passed
@Gnanasundari24 Gnanasundari24 deleted the paypal-auth branch November 21, 2023 14:33
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-refactor Category: Refactor
Projects
No open projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add partner flow for PayPal
5 participants