[UPMERGE] 3.3 -> 4.0 - #340
Open
SyliusBot wants to merge 37 commits into
Open
Conversation
…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.
…epository queries
…epository queries (#347)
…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.
…lugin-general-fixes
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR has been generated automatically.
For more details see upmerge_pr.yaml.
Remember! The upmerge should always be merged with using
Merge pull requestbutton.In case of conflicts, please resolve them manually with usign the following commands:
If you use other name for the upstream remote, please replace
upstreamwith the name of your remote pointing to theSylius/MolliePluginrepository.Once the conflicts are resolved, please run
git merge --continueand push the changes to this PR.