Skip to content

[UPMERGE] 3.3 -> 4.0 - #340

Open
SyliusBot wants to merge 37 commits into
4.0from
upmerge/3.3_4.0
Open

[UPMERGE] 3.3 -> 4.0#340
SyliusBot wants to merge 37 commits into
4.0from
upmerge/3.3_4.0

Conversation

@SyliusBot

Copy link
Copy Markdown
Collaborator

This PR has been generated automatically.
For more details see upmerge_pr.yaml.

Remember! The upmerge should always be merged with using Merge pull request button.

In case of conflicts, please resolve them manually with usign the following commands:

git fetch upstream
gh pr checkout <this-pr-number>
git merge upstream/4.0 -m "Resolve conflicts between 3.3 and 4.0"

If you use other name for the upstream remote, please replace upstream with the name of your remote pointing to the Sylius/MolliePlugin repository.

Once the conflicts are resolved, please run git merge --continue and push the changes to this PR.

TheMilek and others added 30 commits April 21, 2026 16:02
…urring charge (#342)

## Third PR from the series related with feature Integration with Mollie
##

  ## Goal

A recurring (off-session) Mollie charge must not include fields the PSP
does not expect. When Mollie charges against an existing mandate it
derives the payment method from that
mandate — sending `method` or `cardToken` in the payload is unnecessary
and can cause API errors during automated renewal cycles.

This PR fixes the recurring charge payload to contain only what Mollie
requires for mandate-based charging. SubscriptionPlugin remains the
source of truth for scheduling; this change
  makes the Mollie engine behave correctly when it executes that charge.

  ## How it works

`CreateOnDemandPaymentAction` builds the `payments->create` payload from
the mandate identifiers (`customerId`, `mandateId`), amount,
description, webhook URL, metadata, and
`sequenceType: recurring`. `method` and `cardToken` are added to the
payload **only when explicitly present and non-empty**. Keys are omitted
entirely rather than set to `null` — the
Mollie SDK serializes via raw `json_encode` with no null-stripping, so a
`null` value would still reach the API.

`ConvertMollieSubscriptionPaymentAction` gains a null-guard on the
`cartToken` metadata read that feeds into this flow.

  ## Scope

The fix targets the `sequenceType: recurring` path only. The
`sequenceType: first` path (`CreateOnDemandSubscriptionAction`) is
untouched. `idempotencyKey` is out of scope — belongs
  to a later PR.

  ## Pattern

Conditional payload construction — include a field only when it carries
a meaningful value, omit otherwise. This is the **HOW to charge** layer
for the off-session recurring case.
…esolver

Add unit tests for MolliePaymentsMethodResolver
Co-authored-by: rust-le <61462609+rust-le@users.noreply.github.com>
Co-authored-by: rust-le <61462609+rust-le@users.noreply.github.com>
This PR has been generated automatically.
For more details see
[upmerge_pr.yaml](/Sylius/MolliePlugin/blob/1.0/.github/workflows/upmerge_pr.yaml).

**Remember!** The upmerge should always be merged with using `Merge pull
request` button.

In case of conflicts, please resolve them manually with usign the
following commands:
```
git fetch upstream
gh pr checkout <this-pr-number>
git merge upstream/3.3 -m "Resolve conflicts between 3.2 and 3.3"
```

If you use other name for the upstream remote, please replace `upstream`
with the name of your remote pointing to the `Sylius/MolliePlugin`
repository.

Once the conflicts are resolved, please run `git merge --continue` and
push the changes to this PR.
michalkaczmarek-bitbag and others added 7 commits July 7, 2026 19:27
This PR has been generated automatically.
For more details see
[upmerge_pr.yaml](/Sylius/MolliePlugin/blob/1.0/.github/workflows/upmerge_pr.yaml).

**Remember!** The upmerge should always be merged with using `Merge pull
request` button.

In case of conflicts, please resolve them manually with usign the
following commands:
```
git fetch upstream
gh pr checkout <this-pr-number>
git merge upstream/3.3 -m "Resolve conflicts between 3.2 and 3.3"
```

If you use other name for the upstream remote, please replace `upstream`
with the name of your remote pointing to the `Sylius/MolliePlugin`
repository.

Once the conflicts are resolved, please run `git merge --continue` and
push the changes to this PR.
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.

4 participants