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(payment_methods): remove duplicated pm entry creation during network token payment when customer acceptance is passed #6498

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ impl<F: Send + Clone> PostUpdateTracker<F, PaymentData<F>, types::PaymentsAuthor
.ok();
}
};
let payment_method_id = payment_data
.payment_method_info
.clone()
.map(|pm_info| pm_info.payment_method_id);
let connector_mandate_reference_id = payment_data
.payment_attempt
.connector_mandate_detail
Expand All @@ -198,6 +202,7 @@ impl<F: Send + Clone> PostUpdateTracker<F, PaymentData<F>, types::PaymentsAuthor
payment_method_billing_address,
business_profile,
connector_mandate_reference_id.clone(),
payment_method_id.clone(),
));

let is_connector_mandate = resp.request.customer_acceptance.is_some()
Expand Down Expand Up @@ -313,6 +318,7 @@ impl<F: Send + Clone> PostUpdateTracker<F, PaymentData<F>, types::PaymentsAuthor
payment_method_billing_address.as_ref(),
&business_profile,
connector_mandate_reference_id,
payment_method_id.clone(),
))
.await;

Expand Down Expand Up @@ -1097,6 +1103,7 @@ impl<F: Clone> PostUpdateTracker<F, PaymentData<F>, types::SetupMandateRequestDa
payment_method_billing_address,
business_profile,
connector_mandate_reference_id,
None,
))
.await?;

Expand Down
Loading
Loading