Closed Mesign closed 4 years ago
This fix should address the failing install: https://github.com/concrete5-community-store/community_store_mollie/commit/cd6e51d0f9c1d7aa153005b61df8633d83f8388b
and this one I believe should fix the issue with the invalid key: https://github.com/concrete5-community-store/community_store_mollie/commit/0292134adc3d06c10d00b73747196e40d7f883fb
With those in place, I was able to put in a real Mollie test key, and have payment methods start to list under: /index.php/dashboard/store/settings/paymollie
Thank you! Seems to work. Both site I work on are now in dev- / testmode. When I have trouble going live I will post the results here.
I started testing. When I make a test payment it gives me an error "Het formulier is verlopen, probeer het opnieuw." (The form has expired, try again). If I go on an set the transaction to succesfull I get directed back to the checkout form. Screenshot: https://ibb.co/PhS06Dz
In the store reports I don't see any transactions succesfull or failed.
In the concrete5 logs I see the following:
Exception Occurred: /home/xxxxxx/domains/xxxxxx/private_html/packages/community_store_mollie/src/Mollie/Order/Transaction.php:132 Argument 1 passed to Concrete\Package\CommunityStoreMollie\Src\Mollie\Order\Transaction::getByMolliePaymentID() must be of the type integer, string given, called in /home/xxxxxx/domains/xxxxxx/private_html/packages/community_store_mollie/src/CommunityStore/Payment/Methods/Mollie/MolliePaymentMethod.php on line 88 (0)
Additional information : I moved my entire site/shop from 'domain.ext/test/' to 'domain.ext/' (cleared all cache). Don't know If that could be a problem somewhere.
Interesting, I was putting through test orders successfully when I tested this previously.
You said it was working previously? Did it only start with this error after moving the domain?
Just thought it worked because I got the payment pop-up. Did not notice the form error.
I just tested it on a second webshop in production (without any moving of documents and on a other domain) and I get the same result.
Looking at the code, I think this might be a PHP version related issue.
On this line here: https://github.com/concrete5-community-store/community_store_mollie/blob/master/src/CommunityStore/Payment/Methods/Mollie/MolliePaymentMethod.php#L86
Try changing it to: $molliePaymentID = (int)$_POST['id'];
Thank you for your time and suggestion. Unfortunately there is no change.
Perhaps try these changes instead: https://github.com/concrete5-community-store/community_store_mollie/commit/c5157bc6c99a10a84bab8016ecc9856cc8510b3a
Changed the code, cleared cache, refreshed entities added a new product to test. But no change.
Are you getting that same error in the logs?
First error:
Exception Occurred: /home/xxxxxx/domains/xxxxxx/private_html/packages/community_store_mollie/src/Mollie/Order/Transaction.php:132 Argument 1 passed to Concrete\Package\CommunityStoreMollie\Src\Mollie\Order\Transaction::getByMolliePaymentID() must be of the type integer, string given, called in /home/xxxxxx/domains/xxxxxx/private_html/packages/community_store_mollie/src/CommunityStore/Payment/Methods/Mollie/MolliePaymentMethod.php on line 88 (0)
Error now:
Exception Occurred: /home/xxxxxx/domains/xxxxxx/private_html/packages/community_store_mollie/src/Mollie/Order/Transaction.php:136 Return value of Concrete\Package\CommunityStoreMollie\Src\Mollie\Order\Transaction::getByMolliePaymentID() must be an instance of Concrete\Package\CommunityStoreMollie\Src\Mollie\Order\Transaction, null returned (0)
That error suggests that you've still got the word self
on this line here:
https://github.com/concrete5-community-store/community_store_mollie/commit/c5157bc6c99a10a84bab8016ecc9856cc8510b3a#diff-7a46eacccadded7246fc75cd4792c367L183
(however, I don't know why it's not returning a transaction)
I didn't build this gateway, I'm wondering if @Jozzeh can help explain why this might be happening.
A huge update was done by @wardhache and he knows the ins and outs of the module now much better than me.
We've been in contact and he'll have a look asap.
(I've pivoted my career more to the frontend, which is why I haven't been very active here.)
@Jozzeh Great, I'd appreciate the help here from @wardhache, as there may be something obvious we're overlooking, and I've only casually tested this. He may also want to revert my last commit!
I did actually spot you shifted more to the frontend, I was taking a look at your site earlier. Would be great to keep in touch, my work is still very broad, but I'm trying to do more these days with Javascript myself (vuejs in particular). I'd be interested to hear your thoughts on AdonisJS for example.
Hi @wardhache, great to hear that you want to look into this problem. Any idea when you have some time to check this out? I have 2 clients waiting for a fix so would be really grateful if this problem could be solved.
Could this have something to do with the PHP version (now running on 7.2.27) if so, I could ask the host to change the PHP version.
I did a Pull Request #4 provided with the description of all the changes!
To provide some further information. All errors that you stumbled upon were not because of problems on your side. I separated the commits so you can check out all the solutions for the problems you were facing.
I would like to apologise for the wait, it took me some time to figure it out and I had some other ongoing urgent matters.
Thanks for your patience and I hope you can make those 2 clients very happy!
@wardhache No need for apologies! I'm really thankful for your time and this plugin.
I downloaded the master and installed it. I got an error. (Created a pull request for the fix). I could make a (test)payment so it works. @Mesuva also thank you again for your time aswell. Would like to donate some cup of coffee to you guys.
I get an error installing the Package:
Class 'Concrete\Package\CommunityStoreMollie\Config' not found
On refresh the package seems to be installed. But when entering (copy/paste) the test API key from Mollie I get the following:
Invalid API key: ''. An API key must start with 'test_' or 'live_' and must be at least 30 characters long.
I cleared cache, refeshed database entities, reinstalled plugin. Unfortunately no change.
Both on 8.5.2 as 8.5.4