pfpayments / prestashop-1.6 Goto Github PK
View Code? Open in Web Editor NEWPostFinance Checkout integration for PrestaShop 1.6
Home Page: https://www.postfinance-checkout.ch
License: Apache License 2.0
PostFinance Checkout integration for PrestaShop 1.6
Home Page: https://www.postfinance-checkout.ch
License: Apache License 2.0
Describe the bug
In multishop context, the configuration setting PFC_MANUAL_TASKS
is set to 0
for all shops during installation, even if the module is installed in only one of the shops.
Additionally, the field id_shop_group
is not set accordingly to the shop group of the shop the setting belongs to. Everywhere, the shop group is set to the shop where the module was installed. It is easier to understand with an example:
Expected behavior
Postfinance Checkout
is installed and activated.PREFIX_configuration
, on each line, the field id_shop_group
must match the shop group of the shop id_shop
.To Reproduce
PFC_MANUAL_TASKS
are stored in the table PREFIX_configuration
:id_configuration | id_shop_group | id_shop | name | value | date_add | date_upd |
---|---|---|---|---|---|---|
- | 2* | 1 | PFC_MANUAL_TASKS | 0 | - | - |
- | 2 | 2 | PFC_MANUAL_TASKS | 0 | - | - |
*: This is wrong, because shop 1 is in group 1. And in the first place, this line should not even be saved.
Software versions (please complete the following information):
First of all, thank you for allowing to open issues. It is important to me to be able to address the issues directly to the developers, and giving all the details necessary. Once this communication channel established, I will still contact PFC customer supports as you recommend.
Is your feature request related to a problem?
This plugin is available only in English and German. French and Italian are missing.
Yes, Postfinance Checkout Flex is targeting whole of Switzerland. Switzerland has four national languages. Merchants in French and Italian speaking region should not be required to speak English or German in order to use this plugin.
But even more important, customers anywhere located in Switzerland should be able to buy on websites at least in the three main langages, French, Italian and German. For a merchant, selling goods in whole Switzerland and requiring their customers to speak German is not an option. With Postfinance Checkout exclusively in German, a merchant will loose 99% of his revenue in French and Italian speaking regions or be required to use a competitor's solution.
Describe the solution you'd like
It is absolutely essential, that the part of Postfinance Checkout payment that displays to the customer is 100% available in French and Italian.
It would be good, that the backoffice too is translated.
Alternatives you've considered
There is no alternative to displaying to the customer a payment interface in his native language. A Swiss payment solution MUST be translated into at least German, French and Italian. Without this, it is not a Swiss payment solution.
Hi there
We currently experiencing an issue with the images for the payment methods.
They do not show up anymore, probably the URL did chance on checkout.postfinance.ch
It affects both frontend and backend.
Can be also be seen in the productive frontend: https://www.secret-nature.ch/schnell-bestellung
Full url: https://checkout.postfinance.ch//de-de/s/21159/resource/web/image/payment/method/twint.svg?strategy=snapshot&snapshot=58422
I've tested it a bit and it seems like the language could be the problem, as the URL without de-de
seems to work fine:
https://checkout.postfinance.ch/s/21159/resource/web/image/payment/method/twint.svg
They did show up in the past without any problems but we cleared the cache and since then it is not showing up anymore.
Can you please fix this issue?
Some info about our setup:
Thanks and greets
Describe the bug
GET /module/postfinancecheckout/webhook
gives an error 500, with the error Property PrestaShopLogger->message is empty
Looking closer, this is because PostFinanceCheckoutWebhookModuleFrontController::postProcess
throws an Exception
with an empty message.
This is because https://github.com/pfpayments/prestashop-1.6/blob/master/inc/Exception/Incompleteconfig.php does not specify a default message, and no message is defined at invocation neither
Line 45 in 7c90efc
Expected behavior
Any Exception anywhere in any PHP program is supposed to have a message. This only allows for a straight forward debugging.
To Reproduce
Software versions (please complete the following information):
This module can't get installed under Presta 1.6.1.6 in the backend at all (mail-hook is installed).
If I rename the folder to 'postfinancecheckout' and install it via FTP, the whole site breaks down.
Error:
[PrestaShop] Fatal error in module file :../modules/postfinancecheckout/inc/Helper.php:
syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE)
That bug might not appear under HPH > 7.1, so are you sure this module is tested and built for Presta 1.6.1.x and PHP < 7.1 ?
Describe the bug
The webhook URL created by the module always uses the URL of the shop #1
.
In a multishop environment, when Postfinance Checkout is installed in any other shop, the webhook URL will point to the shop #1
, and thus the payment process will not work.
When Postfinance's servers make their request to the webhook URL, an error 500 is returned, and thus the payment does not succeed.
To Reproduce
Steps to reproduce the behavior:
example.net
)https://example.com/module/postfinancecheckout/webhook
, the URL of shop #1
. The webhook should of course use the domain of the shop where Postfinance Checkout Flex is configured.Expected behavior
I expect the Postfinance Checkout module pfpayment to work for every shop in a multishop installation, not only shop 1.
Software versions (please complete the following information):
Describe the bug
When placing an order on Prestashop with Postfinance Checkout, the display of the page is not coherent, there are two buttons labelled I confirm my order
, that do not have the same effect.
Additionally neither of both button confirms the order.
To Reproduce
On a default installation (see below for instructions for set up)
Steps to reproduce the behavior:
Open the shop with Chrome
Add a product to the cart
Place the order, on step 5. Paiement
, choose Carte Postfinance
Notice the strange display with the two buttons
Hit F12
to open Chrome Dev Console
Click on the first button
Note the error in the Dev console
checkout.js:90 Uncaught TypeError: Cannot read properties of undefined (reading 'processing')
at HTMLButtonElement.handler_submit (checkout.js:90:22)
at HTMLButtonElement.dispatch (jquery-1.11.0.min.js:3:8066)
at HTMLButtonElement.r.handle (jquery-1.11.0.min.js:3:4767)
Click on the second button
Expected behavior
We should be able to place an order.
Screenshots
There are two buttons I confirm my order
Software versions:
Additional Info
About the Javascript error: the offending lines in file views/js/frontend/checkout.js
are:
handler_submit : function (event) {
if(!self.processing) {
var self = event.data.self;
self.disable_pay_button();
Obviously var self = event.data.self;
should precede if(!self.processing) {
Set up a clean installation
If you do not have a test environment to reproduce this issue, this is how to set up a default installation:
Transport - Carriers
and activate the zone Europe non-EU
for shipping (This is necessary to be able to place orders from Switzerland, we installed Switzerland
).Describe the bug
When placing an order, after confirming the order, the articles of the order are still in the cart.
To Reproduce
Steps to reproduce the behavior:
Postfinance Card
as payment methodI confirm my order
.Postfinance Checkout Processing
stateExpected behavior
After placing an order, the cart must be empty
Screenshots
Order is complete, but cart still contains the ordered article:
The order remains in Postfinance Checkout Processing
state
Software versions (please complete the following information):
Additional information
This is how to set up the test installation:
Transport - Carriers
and activate the zone Europe non-EU
for shipping (This is necessary to be able to place orders from Switzerland, we installed Switzerland
).A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.