Skip to content

fix(checkout): preserve paid transactions from stale cancellations - #798

Open
Daniel Vien (daniel3010) wants to merge 4 commits into
trunkfrom
fix/19221-preserve-paid-paypal-state
Open

fix(checkout): preserve paid transactions from stale cancellations#798
Daniel Vien (daniel3010) wants to merge 4 commits into
trunkfrom
fix/19221-preserve-paid-paypal-state

Conversation

@daniel3010

Copy link
Copy Markdown
Contributor

1. Why is this change necessary?

Late PayPal cancellation callbacks or negative webhooks can change an already paid transaction to cancelled.

2. What does this change do, exactly?

Keep paid transactions unchanged for these inputs, and treat authorized transactions as finalized for browser callbacks. Also load transaction state for v1 webhooks and add regression tests.

3. Describe each step to reproduce the issue or behaviour.

  1. Complete a PayPal payment so its transaction is paid.
  2. Invoke the finalize URL with cancel=1, or send a matching negative webhook.
  3. The transaction previously became cancelled; it now remains paid.

4. Please link to the relevant issues (if any).

5. Checklist

  • I have written tests and verified that they fail without my change
  • I have created an entry in the CHANGELOG.md files with all necessary user information about my changes
  • This change has comments for package types, values, functions, and non-obvious lines of code
  • I have read the contribution requirements and fulfill them.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T14:55:25.424639Z ef7ce4f Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ee44c4ed61

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment thread src/Checkout/Payment/Method/AbstractPaymentMethodHandler.php Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it still possible to change the paid state to (partial_)refund?

Comment thread src/Checkout/Payment/Method/AbstractPaymentMethodHandler.php
Comment thread CHANGELOG.md
Ignore late cancel callbacks once a transaction is paid or authorized, and prevent negative PayPal webhooks from demoting paid transactions.

Fixes shopware/shopware#19221
@daniel3010
Daniel Vien (daniel3010) force-pushed the fix/19221-preserve-paid-paypal-state branch from 5bd1f62 to 10d7de8 Compare September 1, 2026 09:58

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 10d7de8d2c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment thread src/Checkout/Payment/Method/AbstractPaymentMethodHandler.php Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: ef7ce4fab3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PayPal payment status changes from Paid to Cancelled after successful payment

2 participants