bramwolf Posted April 30, 2019 Share Posted April 30, 2019 Hey Guys, I've been trying to install the Mollie-Payment module for apeisa's PaymentModule, but apparently I cannot get it to work without Composer. I've have no real clue of what it is or does, everything written about it confused me a complete 100% and I don't know how to install it. Could someone please give me some basic stept as to how to install this fucking thing onto my existing Processwire install? ? Any help would be greatly appreciated! Link to comment Share on other sites More sharing options...
dragan Posted April 30, 2019 Share Posted April 30, 2019 This one? https://github.com/mollie/mollie-api-php#manual-installation You don't need Composer, you can just as well do it manually. But using Composer is so easy, I don't know what exactly seems confusing to you? Just read the docs. Link to comment Share on other sites More sharing options...
bramwolf Posted April 30, 2019 Author Share Posted April 30, 2019 Actually it's this one: https://modules.processwire.com/modules/payment-mollie/ I think it has been adjusted from the original a bit to work with Padloper. I tried installing it manually but Processwire gives me the Error that the module "PaymentModule" which is needed by the module mentioned above can't be found, even though it is installed. As for composer. I think I can download the installer file and run it with some commands from a shell connection, however I don't even know where to put this without breaking the site. Site/modules seems the obvious place to put it but that will result in Processwire always showing it in the modules to be installed page? Or maybe i'm completely wrong.. Link to comment Share on other sites More sharing options...
BitPoet Posted April 30, 2019 Share Posted April 30, 2019 54 minutes ago, bramwolf said: Processwire gives me the Error that the module "PaymentModule" which is needed by the module mentioned above can't be found, even though it is installed. It might be a dumb question, but since the dependency check that gives the message is a core function reliably used by many modules, are you sure PaymentModule is really installed (i.e. showing up in "Modules" -> "Site" in the backend)? Link to comment Share on other sites More sharing options...
bramwolf Posted April 30, 2019 Author Share Posted April 30, 2019 Yes ? most definitely. I'm pretty used to all things processwire, but not at all to shell commands and composer thingies ? however the error does mention that it can't find the module within the path of PaymentMollie, totally lost as to why this might be the case. Link to comment Share on other sites More sharing options...
MoritzLost Posted April 30, 2019 Share Posted April 30, 2019 Sounds like your issue is in fact with the ProcessWire module. But if you need help integrating the Mollie SDK, I wrote a tutorial on setting up Composer with ProcessWire, this includes how to initialize a Composer project, require (i.e. install) third-party dependendencies and connect the autoloader. If you're having problems with the setup, let me know in the comments and I'll try to answer ? 2 hours ago, bramwolf said: As for composer. I think I can download the installer file and run it with some commands from a shell connection, however I don't even know where to put this without breaking the site. Site/modules seems the obvious place to put it but that will result in Processwire always showing it in the modules to be installed page? Or maybe i'm completely wrong.. A good place to install the libraries is one directory above the webroot. since you don't want individual files of external libraries to be publicly accessible (since this opens up quite a lot of security issues). My tutorial includes an explanation of the directory structure I would recommend. 1 Link to comment Share on other sites More sharing options...
bramwolf Posted May 1, 2019 Author Share Posted May 1, 2019 @MoritzLost thanks for your offer! ? However, i'm not planning on reinstalling Processwire inside composer, and also I don't need composer for anything other than this module so I decided to bedug the adapted PaymentMollie module instead and use prepackaged files provided by the original Mollie package from github. So to be clear, I'm trying to install this module ( Mollie compatible with Padloper )https://github.com/Typografics/PaymentMollie-PW3With the composer vendor files from this package ( The original Mollie api )https://github.com/mollie/mollie-api-phpThe error I get after upload the files and going to the "Install Module" page is this: Fatal Error: Uncaught Error: Class 'ProcessWire\PaymentModule' not found in /customers/a/4/3/big-in-fabric.com/httpd.www/site/modules/PaymentMollie/PaymentMollie.module:7 Stack trace: #0 /customers/a/4/3/big-in-fabric.com/httpd.www/wire/core/Modules.php(1545): include_once() #1 /customers/a/4/3/big-in-fabric.com/httpd.www/wire/core/Modules.php(2842): ProcessWire\Modules->includeModuleFile('/customers/a/4/...', 'PaymentMollie') #2 /customers/a/4/3/big-in-fabric.com/httpd.www/wire/core/Modules.php(3023): ProcessWire\Modules->getModuleInfo('PaymentMollie', Array) #3 /customers/a/4/3/big-in-fabric.com/httpd.www/wire/modules/Process/ProcessModule/ProcessModule.module(380): ProcessWire\Modules->getModuleInfoVerbose('PaymentMollie') #4 /customers/a/4/3/big-in-fabric.com/httpd.www/wire/modules/Process/ProcessModule/ProcessModule.module(343): ProcessWire\ProcessModule->renderList() #5 /customers/a/4/3/big-in-fabric.com/httpd.www/wire/core/Wire.php(380): ProcessWire\ProcessModule->___execute() #6 /customers/a/4/3/big-in-fabric.com/ (line 7 of /customers/a/4/3/big-in-fabric.com/httpd.www/site/modules/PaymentMollie/PaymentMollie.module) This error message was shown because: you are logged in as a Superuser. Error has been logged. I have the PaymentModule installed and am using version 3.0.123 of Processwire, the module requires version 3.0.90 at least. This is the start of the PaymentMollie.module file: <?php namespace ProcessWire; // Here you can find more information about the Mollie php api https://github.com/mollie/mollie-api-php require_once __DIR__ . "/vendor/autoload.php"; class PaymentMollie extends PaymentModule { public static function getModuleInfo() { return array( 'title' => 'PaymentMollie', 'version' => '0.0.2', 'summary' => 'Mollie Payment method', 'singular' => false, 'autoload' => false, 'requires' => 'ProcessWire>=3.0.90, PaymentModule', ); } Anybody had any clues? ? thanks again Link to comment Share on other sites More sharing options...
BitPoet Posted May 1, 2019 Share Posted May 1, 2019 Any change if you use the version from the PW3 branch in the github repo for PaymentModule (which is basically the same with the namespace added)? 2 Link to comment Share on other sites More sharing options...
elabx Posted May 1, 2019 Share Posted May 1, 2019 Maybe I'm being obvious, but have you tried running the shell command "composer require" on the root the module (site/modules/PaymentMollie)? Like this: composer require mollie/mollie-api-php EDIT: Fixed for correctness, thanks @MoritzLost 1 Link to comment Share on other sites More sharing options...
MoritzLost Posted May 1, 2019 Share Posted May 1, 2019 1 minute ago, elabx said: Maybe I'm being obvious, but have you tried running the shell command "composer install" on the root of your processwire site? Like this: composer install mollie/mollie-api-php This won't work, you need to use the require command to add dependencies to your project. This will add the dependency to your composer.json and download it. The install command is used to read the composer.lock file and download all the dependencies listed in there, as well as update the autoloader. This is why install doesn't take a library as an argument. @bramwolf Pretty sure that BitPoet is right. That error indicates that the class ProcessWire\PaymentModule doesn't exist. If you installed the PaymentModule through the backend or downloaded it from the module page, you would get the master branch, which doesn't have the correct namespace. So this version of the module would have the \PaymentModule class inside the root namespace, but not inside the Processwire namespace (which is what the PaymentMollie module tries to extend). Install the PW3 branch and you should be fine. 2 1 Link to comment Share on other sites More sharing options...
bramwolf Posted May 3, 2019 Author Share Posted May 3, 2019 On 5/1/2019 at 7:50 PM, MoritzLost said: @bramwolf Pretty sure that BitPoet is right. That error indicates that the class ProcessWire\PaymentModule doesn't exist. If you installed the PaymentModule through the backend or downloaded it from the module page, you would get the master branch, which doesn't have the correct namespace. So this version of the module would have the \PaymentModule class inside the root namespace, but not inside the Processwire namespace (which is what the PaymentMollie module tries to extend). Install the PW3 branch and you should be fine. Crazy!! ? You fixed my problem ^_^ First, I just updated to already installed files of PaymentModule and PaymentInvoice to the PW3 versions, which crashed everything ? Than uninstalled both modules, updated the files and reinstalled them. Afterwards, I installed the MollieModule and now it worked fine! ? Thank you so much, now let's see if I can actually get it to work with the vendor files from composer ? 1 Link to comment Share on other sites More sharing options...
bramwolf Posted May 3, 2019 Author Share Posted May 3, 2019 Well, here we go again. I was testing to see if the Mollie module works and got this error on the checkout page: Checkout Warning: include(/customers/a/4/3/big-in-fabric.com/httpd.www/site/modules/PaymentMollie-PW3/vendor/composer/../../src/MollieApiClient.php): failed to open stream: No such file or directory in /customers/a/4/3/big-in-fabric.com/httpd.www/site/modules/PaymentMollie-PW3/vendor/composer/ClassLoader.php on line 444 Warning: include(): Failed opening '/customers/a/4/3/big-in-fabric.com/httpd.www/site/modules/PaymentMollie-PW3/vendor/composer/../../src/MollieApiClient.php' for inclusion (include_path='.:/usr/share/php') in /customers/a/4/3/big-in-fabric.com/httpd.www/site/modules/PaymentMollie-PW3/vendor/composer/ClassLoader.php on line 444 I checked to see but the files it is referring to, like: /customers/a/4/3/big-in-fabric.com/httpd.www/site/modules/PaymentMollie-PW3/vendor/composer/ClassLoader.php Is actually right there. Any ideas on how to fix that? ? Thanks again guys. Link to comment Share on other sites More sharing options...
Krlos Posted April 10, 2020 Share Posted April 10, 2020 Hi @bramwolf, Could you solve the problem? I also need to integrate a payment module in an existing Processwire installation. Can you share how you did it? Link to comment Share on other sites More sharing options...
bramwolf Posted April 14, 2020 Author Share Posted April 14, 2020 Hi Krlos, I did get it to work in the end! I used the onepagecheckout template found in padloper. I will send you a zip file with all modules en templates of my site needed for this integration you can just copy the Mollie module in it's entirety. Be sure to select it in PaymentModule. Yoiu can check my checkout scripts on how I invoked Mollie. You can copy what you need from my files and stitch your own version of the integration together ? Hope this helps! Grts, Bram Link to comment Share on other sites More sharing options...
veravandeseyp Posted March 1, 2022 Share Posted March 1, 2022 Hi @bramwolf, I'm running into the same issue, curious how you solved it. Do you have a Github or other webpage where you could share the working configuration? Thanks! Link to comment Share on other sites More sharing options...
bramwolf Posted March 31, 2022 Author Share Posted March 31, 2022 Hi! Sorry for the late reply, I don't check here often nowadays. I'll attach a zip file with my related files, out of that you might be able to pick and choose what you need to get your setup running ? In the end a major issue for me was Mollies callback urls in conjunction with a multilanguage site. Originally they don't include the current users language extension, so site.com/en/payment or /de/ or /nl/. That prevented the script for running correctly. Once a added those. bases on the users current language in the callback URL I got things up and working ? PaymentMollie-PW3.zip Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now