Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single page payment #150

Open
wants to merge 10 commits into
base: 1.7
Choose a base branch
from
Open

Conversation

SirDomin
Copy link
Contributor

@SirDomin SirDomin commented Oct 26, 2020

image
instead of default sylius button we get paypal form to finish our payment
fixes #116

@SirDomin SirDomin force-pushed the single-page-payment branch 2 times, most recently from cc82d09 to c72e6d7 Compare October 26, 2020 09:57
/** @var PaymentMethodInterface $paymentMethod */
$paymentMethod = $payment->getMethod();
/** @var GatewayConfigInterface $gatewayConfig */
$gatewayConfig = $paymentMethod->getGatewayConfig();
Copy link
Member

Choose a reason for hiding this comment

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

There are so many places where we get data from the gateway config :/ We should definitely extract some service for that (but, of course, not in this PR 🖖)

Copy link
Member

@Zales0123 Zales0123 left a comment

Choose a reason for hiding this comment

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

We need some more tests on that :/

  • after successful payment, there is another, cart payment in the fulfilled order

  • when you try to pay by PayPal or hosted payment method (like Przelewy24) and cancel it, it returns to complete page with processing payment - and after clicking "Place order" there is a "Unable to generate a URL for the named route "sylius_paypal_plugin_pay_with_paypal_form" as such route does not exist. exception.

@Zales0123
Copy link
Member

I've pushed some visual changes, which I think would be more consistent with the default "Place order" UI:

Zrzut ekranu 2020-10-29 o 09 24 19

Zrzut ekranu 2020-10-29 o 09 24 29

@Zales0123
Copy link
Member

Zales0123 commented Oct 29, 2020

There is still a problem with duplicated payments after the successful PayPal payment :/ EDIT: Solved

Zrzut ekranu 2020-10-29 o 09 16 12

It would be nice to fix it. I would also like to merge it after the 1.0.0 release, as it's the improvement/change of the currently working feature, that could quite possibly change a lot :)

src/Controller/CompletePayPalOrderAction.php Outdated Show resolved Hide resolved
@@ -135,4 +150,39 @@ public function renderPaymentPageButtonsAction(Request $request): Response
return new Response('');
}
}

public function renderPayPalPaymentAction(Request $request): Response
Copy link
Member

Choose a reason for hiding this comment

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

I'm not a huge fan of the "no verification at all" to who is the owner of the order. Changing the orderId in the request could lead to some issues here. Is it right?

@Zales0123 Zales0123 added this to the 1.1.0 milestone Nov 13, 2020
@Zales0123 Zales0123 removed this from the 1.1.0 milestone Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Single page payment page
3 participants