feat(stripe): modern paymentintents checkout (hosted + embedded)#238
feat(stripe): modern paymentintents checkout (hosted + embedded)#238Tarunkumar0601 wants to merge 3 commits into
Conversation
|
Tick the box to add this pull request to the merge queue (same as
|
Confidence Score: 4/5Safe to merge after reviewing the two non-blocking findings; no critical breakage in the payment or authorization paths. Every security hole flagged in earlier rounds has been closed. The two remaining observations are: (1) billing_interval_count is not clamped to >= 1 in the subscription-sync path, causing silent Stripe API failures for plans with an unset count; (2) the embedded flow leaves the first Integration Request permanently Pending while a second carries the settlement — a data-quality issue that could produce confusing webhook interactions once the shared-infra webhook handler lands. Neither affects the money path in the current PR. payments/payment_gateways/stripe_subscription_sync.py (billing_interval_count guard) and payments/payment_gateways/doctype/stripe_settings/stripe_settings.py (dual Integration Request lifecycle in the embedded flow). Reviews (11): Last reviewed commit: "feat(stripe): modern PaymentIntents chec..." | Re-trigger Greptile |
662f47a to
75b8b35
Compare
75b8b35 to
a698878
Compare
a698878 to
9bc0361
Compare
9bc0361 to
4d1a433
Compare
b10e17c to
396cf86
Compare
396cf86 to
256c8cc
Compare
256c8cc to
e5d0c8f
Compare
e5d0c8f to
5242cd5
Compare
5242cd5 to
df57470
Compare
| if currency: | ||
| data["currency"] = currency | ||
| gateway_controller = get_gateway_controller(reference_doctype, reference_docname, payment_gateway) | ||
| settings = frappe.get_doc("Stripe Settings", gateway_controller) |
There was a problem hiding this comment.
Use get_cached_doc instead of get_doc for Strip Settings, as it is accessed from multiple places and does not change frequently.
| gateway_controller = get_gateway_controller(reference_doctype, reference_docname, payment_gateway) | ||
| settings = frappe.get_doc("Stripe Settings", gateway_controller) | ||
| result = settings.create_payment_intent_for_checkout(frappe._dict(data)) | ||
| frappe.db.commit() |
There was a problem hiding this comment.
Is this db.commit() really required? If so, please use it with proper rollback handling.
Replaces the deprecated Charges/token flow with PaymentIntents (SCA / 3-D Secure ready).
Selectable per account via checkout_mode. Depends on feat/stripe-shared-infra.
Backport Needed : V15 & V16