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

Feature request: Implement displayPaymentEU hook #1

Open
elund opened this issue Dec 22, 2023 · 3 comments
Open

Feature request: Implement displayPaymentEU hook #1

elund opened this issue Dec 22, 2023 · 3 comments

Comments

@elund
Copy link

elund commented Dec 22, 2023

Hello,

I would like to request that you implement the displayPaymentEU hook.
Seems like you have only implemented the old approach: The displayPayment.
The problem is that some newer and more modern checkout pages only support the newer approach.

The displayPayment - the older approach - simply emits HTML code with all payment functionality into a page. And the expectation is that the page to be standard checkout page. This is very easy and convenient for developers, but it's very "hardcoded". It works on standard (or slightly modified) checkout page only.

The displayPaymentEU approach is a declarative approach. Instead of emitting HTML, the module describe what is needed to do in order to process payment. And it's responsibility of checkout page to display the HTML and call the payment functions when needed. This makes it very easy to switch between checkout pages.

Most payment modules implement both approaches. And it shouldn't be hard to implement.

Thanks in advance,
Elund

@ssandgren
Copy link
Collaborator

Hi Elund

Thank you for your request, we will look into it and see what is possible and best practice.

@Gitdyr
Copy link
Collaborator

Gitdyr commented Dec 28, 2023

Hi Elund,

The hook displayPaymentEU is not mentioned in the list of hooks for PrestaShop 8 (https://devdocs.prestashop-project.org/8/modules/concepts/hooks/list-of-hooks/). Were you thinking of the paymentOptions hook (as described here: https://devdocs.prestashop-project.org/8/modules/payment/)?

/Kjeld

@elund
Copy link
Author

elund commented Jan 27, 2024

Hej Kjeld :-)

The displayPayment hook is also not in the list of hooks for PrestaShop 8, but you can find both hooks in classes/Hook.php:

https://github.com/search?q=repo%3APrestaShop%2FPrestaShop%20displaypaymenteu&type=code

By the way, I am using ThirtyBees (PrestaShop 1.6 compatible).

BR Elund

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

No branches or pull requests

3 participants