Skip to content

Conversation

dgeee13
Copy link
Contributor

@dgeee13 dgeee13 commented Oct 18, 2024

Type of Change

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

Description

  1. Integrated Googlepay and Paypal for Novalnet
  2. Integrated mandates for Googlepay and Paypal

Additional Changes

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

Motivation and Context

https://github.com/juspay/hyperswitch-cloud/issues/6731

How did you test it?

Tested manually.
Test cases:

  1. Googlepay payment
    • manual
    • automatic
    • mandates
  2. Paypal
    • manual
    • automatic
    • mandates

Manual Testing Doc

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

@dgeee13 dgeee13 requested a review from a team as a code owner October 18, 2024 12:58
Copy link

semanticdiff-com bot commented Oct 18, 2024

Review changes with SemanticDiff.

Analyzed 2 of 5 files.

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

Filename Status
✔️ crates/hyperswitch_connectors/src/connectors/novalnet.rs 71.43% smaller
✔️ crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs 10.87% smaller
crates/connector_configs/toml/development.toml Unsupported file format
crates/connector_configs/toml/production.toml Unsupported file format
crates/connector_configs/toml/sandbox.toml Unsupported file format

@dgeee13 dgeee13 changed the title Novalnet wallets feat(connector): [Novalnet] integrate Paypal and Googlepay wallets Oct 18, 2024
@dgeee13 dgeee13 self-assigned this Oct 18, 2024
@dgeee13 dgeee13 added A-connector-integration Area: Connector integration C-feature Category: Feature request or enhancement labels Oct 18, 2024
@dgeee13 dgeee13 changed the title feat(connector): [Novalnet] integrate Paypal and Googlepay wallets feat(connector): [Novalnet] Integrate Paypal and Googlepay wallets Oct 18, 2024
@dgeee13 dgeee13 changed the title feat(connector): [Novalnet] Integrate Paypal and Googlepay wallets feat(connector): [Novalnet] Integrate wallets Paypal and Googlepay Oct 18, 2024
Ok(api_models::webhooks::ObjectReferenceId::RefundId(
api_models::webhooks::RefundIdType::ConnectorRefundId(notif.event.tid.to_string()),
api_models::webhooks::RefundIdType::ConnectorRefundId(parent_tid.to_string()),
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the difference between event.parent_tid and event.tid ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

according to docs,
event.tid - The TID which is relevant to this event.
event.parent_tid - During the course of followup events like chargebacks, credit entry etc.., this field will contain the value of the original/initial transaction TID.

I have removed this change. Not needed.

let transaction_status = item
.response
.transaction
.clone()
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 pass reference here ?

@@ -195,8 +195,11 @@ impl ConnectorValidation for Novalnet {
pm_type: Option<enums::PaymentMethodType>,
pm_data: PaymentMethodData,
) -> CustomResult<(), errors::ConnectorError> {
let mandate_supported_pmd: HashSet<PaymentMethodDataType> =
HashSet::from([PaymentMethodDataType::Card]);
let mandate_supported_pmd: HashSet<PaymentMethodDataType> = HashSet::from([
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add the changes in crates/connector_configs/toml as well

Ok(api_models::webhooks::ObjectReferenceId::RefundId(
api_models::webhooks::RefundIdType::ConnectorRefundId(notif.event.tid.to_string()),
api_models::webhooks::RefundIdType::ConnectorRefundId(parent_tid.to_string()),
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we supposed to populate ConnectorRefundId with parent_tid?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, I have removed this code. notif.event.tid should work.

@deepanshu-iiitu
Copy link
Contributor

@cookieg13
Did you test Google Pay and Paypal Flows?

srujanchikke
srujanchikke previously approved these changes Oct 21, 2024
@dgeee13
Copy link
Contributor Author

dgeee13 commented Oct 21, 2024

@cookieg13 Did you test Google Pay and Paypal Flows?

yes tested locally, webhooks and mandates are tested too

@dgeee13 dgeee13 force-pushed the novalnetWallets branch 2 times, most recently from c1b4501 to a415817 Compare October 21, 2024 11:55
@dgeee13 dgeee13 requested a review from srujanchikke October 21, 2024 11:57
srujanchikke
srujanchikke previously approved these changes Oct 21, 2024
@dgeee13 dgeee13 requested a review from srujanchikke October 21, 2024 12:11
@Gnanasundari24
Copy link
Contributor

Gnanasundari24 commented Oct 23, 2024

@cookieg13 Can you add the response aswell then only will get to know whether its worked or not. and add the mandate req and res also

@dgeee13
Copy link
Contributor Author

dgeee13 commented Oct 24, 2024

@cookieg13 Can you add the response aswell then only will get to know whether its worked or not. and add the mandate req and res also

added testing doc with req and responses in readme

@dgeee13 dgeee13 dismissed stale reviews from deepanshu-iiitu and srujanchikke via a398832 October 24, 2024 11:21
@dgeee13 dgeee13 requested a review from a team as a code owner October 24, 2024 11:21
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Oct 24, 2024
@dgeee13 dgeee13 removed the request for review from a team October 24, 2024 13:08
Merged via the queue into main with commit 673b869 Oct 24, 2024
17 checks passed
@Gnanasundari24 Gnanasundari24 deleted the novalnetWallets branch October 24, 2024 13:35
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.

4 participants