Hello,

I am running the Drupal Ubercart webshop:

www.calconditioner.nl

I am facing following issue with the installation of the following module for Drupal with Ubercart webshop system:

Mollie Payment

Namely the payment methods which are set in my Mollie account cannot be set in Drupal Admin

See screenshot in the attachment:

Mollie_Payment Methods.jpg

Besides the payment methods are not appearing in the front end in the check step:

Payment methods

See screenshot in the attachment:

Checkout_Payment Methods.jpg

Note

Only the iDeal payment method is showing and can be activated under Drupal:

admin - modules - TAB: UBERCART PAYMENT - Mollie iDEAL

This iDeal payment method is configured by another installed Mollie module for iDeal only:

UC Mollie iDEAL

See screenshot in the attachment:

Drupal Admin_Modules_Ubercart-Payment_Mollie iDEAL.jpg

The issue that the payment methods are not showing through the Mollie Payment module is caused by an error in the required 3th party libraries:

Mollie API client for PHP

Namely in the installation proces I have successfully installed Mollie Payment according the installation & configuration manual.

The Mollie Mollie Payment module is showing and is set activated also right in Drupal:

admin - modules - payment - Mollie Payment

The Mollie Payment module requires the following modules which I have successfully installed and set activated in the Drupal Admin:

Payment
Libraries

The Mollie payment module requires also following 3th party libraries:

Mollie API client for PHP

I have put the all the files in the folder from the Mollie API client for PHP in the libraries folder so that Autoloader.php is at the path:

sites - all - libraries - mollie_api - src - Mollie - API - Autoloader.php

('git clone https://github.com/mollie/mollie-api-php.git mollie_api' from
within the sites/all/libraries folder)

See screenshot in the attachment:

Server_Libraries_Mollie api_Autoloader php.jpg.jpg

Next I have made sure the composer.json file is in:

sites - all - libraries - mollie_api

See screenshot in the attachment:

Server_Libraries_Mollie api_Composer json.jpg

After installing and adding successfully all the required modules and libraries this error warning message is showing at Drupal:

admin - reports - libraries - mollie_api

Status report for library Mollie client API for PHP

Error: The version of the library Mollie client API for PHP was not detected.

Check that the whole library is located at sites/all/libraries/mollie_api.
The following files and directories should be contained in that directory:
• src
• Mollie
• API
• Autoloader.php

If you have moved any files, reload the page. If successful, you should see status information about this library.
If the files are placed correctly and the version can still not be detected, the library information is incorrect.
Contact the maintainer of the Mollie Payment module to correct this.

See screenshot in the attachment:

Drupal Admin_Reports_Libraries_Mollie API client for PHP.jpg

So last written in above error message I am doing right now by contacting Support by posting my issue.

Can you correct the library information right so I will to be able to set and use the payment options which are set activated in my Mollie account please?

If you need further details and login credentials in order to fix this issue you can contact me by email.

Thanks already a lot in advance!

Best regards,

Joris

J-DSGN.NL
webdesign & development

Email: joris@j-dsgn.nl
Website: J-dsgn.nl

Drupal profile: J-dsgn

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

J-dsgn created an issue. See original summary.

wesleydv’s picture

In the latest version of mollie_api_php the version is no longer available in composer.json
It is now set in src/Mollie/API/Client.php

I attached a patch that fixes this.

wesleydv’s picture

Status: Active » Needs review
J-dsgn’s picture

Hi Wesley,

Thanks for your quick reply and patch.

Can you explain me which next steps I will have to take now to make your send patch work please?

Thanks in advance.

Best regards,

Joris

wesleydv’s picture

Here's is some info on how to apply a patch https://www.drupal.org/patch/apply

However this one is a simple patch so I'll explain what it does.

In the mollie_payment.module file replace the following lines (starting on line 56)

'file' => 'composer.json',
'pattern' => '/"version": "([0-9a-zA-Z\.-]+)"/',
'lines' => 22,

with

'file' => 'src/Mollie/API/Client.php',
'pattern' => '/const CLIENT_VERSION = "([0-9a-zA-Z\.-]+)"/',
'lines' => 40,

Maybe try to apply to patch like explained in the link, and then you can check with this information if it worked.
Make sure you are in the mollie_payment dir before you apply the patch.

ricovandevin’s picture

I'll check with Mollie if reading the version from Client.php is a stable solution.

J-dsgn’s picture

Hi,

I am convioused here now what to do ?!

Is the patch working to solve my problem or not?

If yes, how do I put the patch in the Molly payment module?

Regards,

Joris

ricovandevin’s picture

The patch should solve the issue that the version of the Mollie API client for PHP can not be detected.

In https://www.drupal.org/node/2854320#comment-11955907 there is already a link explaining how to apply a patch. There is also a pretty clear instruction on how to change the file involved yourself when you are not able to apply a patch.

J-dsgn’s picture

Thanks for the confirmation and I will apply the given patch.

  • ricovandevin committed 32b232a on 7.x-1.x
    Issue #2854320 by wesleydv, ricovandevin: Mollie API client for PHP -...
ricovandevin’s picture

Version: 7.x-1.0-rc2 » 7.x-1.x-dev
Status: Needs review » Fixed

Mollie might be removing version information from the codebase in the (near) future. Since the Drupal 8 version of this module is using Composer to load the API client we have decided to hardcode the current version in mollie_payment_libraries_info() .

Fixed in dev version.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.