Code Monkey home page Code Monkey logo

prestashop-1.6's Introduction

Build Status

PrestaShop 1.6 PostFinance Checkout Integration

This repository contains the PrestaShop PostFinance Checkout payment module that enables the shop to process payments with PostFinance Checkout.

To use this extension, a PostFinance Checkout account is required.

Requirements

Documentation

Support

Support queries can be issued on the PostFinance Checkout support site.

License

Please see the license file for more information.

Other PrestaShop Versions

Find the module for different PrestaShop versions here.

To install module manually by dragging up zip file, please download .zip archive of module with correct structure required by Prestashop installation

prestashop-1.6's People

Contributors

alberto-wallee avatar andrewrowanwallee avatar edgaraswallee avatar nicoeigenmanncw avatar sauliususoniswallee avatar sbossert avatar schurter-wallee avatar theodorspringwallee avatar victoralbala avatar vttn avatar

Watchers

 avatar  avatar  avatar  avatar

prestashop-1.6's Issues

National languages are missing

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.

PostFinanceCheckoutWebhookModuleFrontController::postProcess throws an Exception with an empty message

Describe the bug

GET /module/postfinancecheckout/webhook gives an error 500, with the error Property PrestaShopLogger->message is empty
image

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

throw new PostFinanceCheckoutExceptionIncompleteconfig();

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

  1. Create a multishop installation of Prestashop
  2. Configure Postfinance Checkout in a shop different from the first.
  3. The webhook will throw an error 500.
  4. Look at the error log on the server.

Software versions (please complete the following information):

  • Prestashop: 1.6, reproduced with v.1.6.1.1 and 1.6.1.24
  • Postfinance Checkout: latest version 1.2.18
  • PHP: reproduced with 7.1.32 and 7.2.34

No Transaction ID saved

Dear all

With the old module there was always a transaction id stored with an order. with this plugin this is not the case:

grafik

This transaction ID is necessary in order to track the payouts by others like worldline.

How to fix?

BR wucherpfennig

When placing an order, the articles remain in the cart, while the order stays in 'Processing' state

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:

  1. Put an article into the cart
  2. Place an order, selecting Postfinance Card as payment method
  3. Click on the first button I confirm my order.
  4. Notice that the order is complete and that the cart still contains the same article
  5. Log into the BO
  6. Go to the list of the orders
  7. Notice that the order is in Postfinance Checkout Processing state

Expected behavior
After placing an order, the cart must be empty

Screenshots
Order is complete, but cart still contains the ordered article:
2022-01-28_164441
The order remains in Postfinance Checkout Processing state
2022-01-28_165231

Software versions (please complete the following information):

  • Prestashop: 1.6.1.24, fresh install, default demo data.
  • Postfinance Checkout: 1.2.17, latest version as of today, with PR #3 applied
  • PHP: 7.1.32

Additional information

This is how to set up the test installation:

  • Get XAMPP Version 7.1.32 portable
  • Unzip Prestashop 1.6.24 in C:\xampp\htdocs\prestashop-1.6.1.24
  • In phpmyadmin create a database and a user
  • Install Prestashop the standard way, choose Switzerland as a country
  • In the BO, got to Transport - Carriers and activate the zone Europe non-EUfor shipping (This is necessary to be able to place orders from Switzerland, we installed Switzerland).
  • Install the latest version of Postfinance Checkout (currently 1.2.17)

The webhook URL always points to shop #1, thus Postfinance Checkout cannot work on any other shop

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:

  1. On a Prestashop multishop environment, with shop 1 on example.com and shop 2 on example.net, install and configure Postfinance Checkout on shop 2 (domain example.net)
  2. Log into your account on https://checkout.postfinance.ch/
  3. Under Webhooks - URL notice the new entry pointing to 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):

  • Prestashop: 1.6.1.24
  • Postfinance Checkout: latest version 1.2.18
  • PHP: 7.2.34

Can't get installed under Presta 1.6.1 at all

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 ?

Payment selection displays two buttons, and both of them are not working

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:

  1. Open the shop with Chrome

  2. Add a product to the cart

  3. Place the order, on step 5. Paiement, choose Carte Postfinance

  4. Notice the strange display with the two buttons

  5. Hit F12 to open Chrome Dev Console

  6. Click on the first button

  7. 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)
    
  8. Click on the second button

  9. An empty page displays, with an error in Dev console
    2022-01-28_152409
    2022-01-28_152420

Expected behavior
We should be able to place an order.

Screenshots
There are two buttons I confirm my order
2022-01-28_152117

Software versions:

  • Prestashop: 1.6.1.24, fresh install, default demo data.
  • Postfinance Checkout: 1.2.17, latest version as of today
  • PHP: 7.1.32

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:

  • Get XAMPP Version 7.1.32 portable
  • Unzip Prestashop 1.6.24 in C:\xampp\htdocs\prestashop-1.6.1.24
  • In phpmyadmin create a database and a user
  • Install Prestashop the standard way, choose Switzerland as a country
  • In the BO, got to Transport - Carriers and activate the zone Europe non-EUfor shipping (This is necessary to be able to place orders from Switzerland, we installed Switzerland).
  • Install the latest version of Postfinance Checkout (currently 1.2.17)

Broken paths to images for the payment methods

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.

grafik

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:

  • PrestaShop 1.6.1.24 (latest 1.6)
  • pfpayments: 1.2.39 (latest)
  • PHP 7.4

Thanks and greets

Configuration settings are wrongly saved in multishop context

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

  1. The configuration settings must be saved only for the shops where Postfinance Checkout is installed and activated.
  2. In the table PREFIX_configuration, on each line, the field id_shop_group must match the shop group of the shop id_shop.

To Reproduce

  1. Create a multishop install in Prestashop with shop 1 in shop group 1 and shop 2 in shop group 2.
  2. Install Postfinance Checkout 1.6, version 1.2.17
  3. Go to phpmyadmin and notice how the settings with name 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):

  • Prestashop: 1.6, reproduced with v.1.6.1.1 and 1.6.1.24
  • Postfinance Checkout: latest version 1.2.17
  • PHP: reproduced with 7.1.32 and 7.2.34

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.