Skip to content

PPSYL-138 - Use Payment request flow for payplug#169

Merged
Jibbarth merged 11 commits into
feature/upgrade-v2from
feature/PPSYL-138-payment-request
Jul 29, 2025
Merged

PPSYL-138 - Use Payment request flow for payplug#169
Jibbarth merged 11 commits into
feature/upgrade-v2from
feature/PPSYL-138-payment-request

Conversation

@Jibbarth

@Jibbarth Jibbarth commented Jun 1, 2025

Copy link
Copy Markdown

No description provided.

@Jibbarth Jibbarth added the v2 label Jun 1, 2025
@Jibbarth Jibbarth force-pushed the feature/PPSYL-138-payment-request branch from 601bca8 to df00d8d Compare July 15, 2025 14:34
@Jibbarth Jibbarth marked this pull request as ready for review July 15, 2025 15:29
Comment thread src/Command/Handler/CapturePaymentRequestHandler.php Outdated
Comment thread src/Command/Handler/NotifyPaymentRequestHandler.php Outdated
Comment thread src/Command/Provider/CapturePaymentRequestCommandProvider.php Outdated
Comment thread src/Command/Provider/CapturePaymentRequestCommandProvider.php
Comment thread src/OrderPay/Provider/CaptureHttpResponseProvider.php
);
}

private function updatePaymentState(PaymentInterface $payment): void

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.

Duplicate of NotifyPaymentRequestHandler::updatePaymentState, should we refactor it?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Let's keep like that for now. We may have to come back on these developments. On a next iteration, we could add a new service to apply state machine change

@Jibbarth Jibbarth merged commit 86a3cb0 into feature/upgrade-v2 Jul 29, 2025
0 of 3 checks passed
@Jibbarth Jibbarth deleted the feature/PPSYL-138-payment-request branch July 29, 2025 12:07
'cancel_url' => $returnUrl . '?&' . http_build_query(['status' => PayPlugApiClientInterface::STATUS_CANCELED]),
];

$notificationUrl = $this->urlGenerator->generate('sylius_payment_method_notify', ['code' => $payment->getMethod()?->getCode()], UrlGeneratorInterface::ABSOLUTE_URL);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I can see why a specific service to create this url can be required...

$notificationUrl = $this->urlGenerator->generate('sylius_payment_method_notify', ['code' => $payment->getMethod()?->getCode()], UrlGeneratorInterface::ABSOLUTE_URL);
$details['notification_url'] = $notificationUrl;

$paymentRequest->setPayload($data);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I understand why you set this here, but the purpose of the payload is to serve as the input of the PaymentRequest, meaning a payload can be already set by an API call for example.
Then you can avoid setting this here but instead keep it inside the responseData or the Payment->setDetails().

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants