Skip to content

Sylius refund plugin support#20

Open
Prometee wants to merge 15 commits into
1.0from
sylius-refund-plugin
Open

Sylius refund plugin support#20
Prometee wants to merge 15 commits into
1.0from
sylius-refund-plugin

Conversation

@Prometee

Copy link
Copy Markdown
Contributor

Sylius Refund Plugin Integration

This branch adds full integration with Sylius Refund Plugin for both Stripe Checkout and Stripe Web Elements payment methods.

Features

  • Automatic Stripe Refund Processing: When a refund is generated through Sylius Refund Plugin, the plugin automatically creates and dispatches a payment request to process the refund via Stripe API.
  • Partial Refund Support: Full support for partial refunds, allowing administrators to refund specific amounts rather than the full payment.
  • Gateway Auto-Registration: Stripe gateways are automatically added to the Sylius Refund Plugin's supported gateways list via a compiler pass.

Implementation Details

  1. RefundPaymentGeneratedEventListener: Listens to RefundPaymentGenerated events and creates corresponding payment requests for Stripe refunds.

  2. SyliusRefundSupportedGatewaysCompilerPass: Automatically registers Stripe payment factories as supported gateways in Sylius Refund Plugin.

  3. Conditional Configuration: The integration is only loaded when Sylius Refund Plugin is installed, ensuring backward compatibility.

Testing

  • Unit tests for RefundPaymentGeneratedEventListener and SyliusRefundSupportedGatewaysCompilerPass
  • Behat scenarios for full and partial order refunds (Stripe Checkout and Web Elements)

Rafikooo added a commit to Sylius/RefundPlugin that referenced this pull request Jan 28, 2026
| Q               | A
| --------------- | -----
| Branch?         | 2.0
| Bug fix?        | yes
| New feature?    | no
| Related tickets | none

While using the behat context from this plugin for this PR :
Sylius/StripePlugin#20
I Discovered an odd bug that should make the CI fail normally.

This is just a quick fix there is other things to fix to make this
contexts usable externaly.
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.

1 participant