Mollie

I’m using Mollie with a valid API-key but when I click on the button ‘Pay invoice’ and cancel my payment, InvoiceNinja will ‘tell’ that this invoice is PAID?

I’m also using PayPal and this works perfectly.

I’ve asked this to Mollie and they are asking if InvoiceNinja is working with their new API’s?

Could someone help me with this problem?

Thx.

We’re looking into the problem, we should have a fix within a few days.

Hi Hillel Coren, thanks great to hear! How can I be informed about this fix?

It will be included with our next release, I’ll post here when it’s ready.

Great, thanks!

Hi Hillel, do you have any update about this issue?

Many thanks.

Sorry for not updating you, this should be fixed as of our last release.

Note: we’re releasing our next release in a few days so you may want to wait to update.

Ok, great to hear and thank you very much for you fast reply!

Another question, I’ve made some changes into the source (like logo on top,…), when I’m updating to the new version I suppose that I will configure this again?

That is correct.

Hi Hillel,

I have the same problem on version 2.6.8, white labeled version
Every payment action with Mollie gets approved…

Please help

Kind regards,

Ferenc

I think I see the problem, can you try adding the following code to line 15 in app/Ninja/PaymentDrivers/MolliePaymentDriver.php

if ($response->isCancelled()) {
    return false;
} elseif ( ! $response->isSuccessful()) {
    throw new \Exception($response->getMessage());
}

Now i get a “Whoops, looks like something went wrong.” when emailing the invoice.

My php-file:

<?php namespace App\Ninja\PaymentDrivers;

class MolliePaymentDriver extends BasePaymentDriver
{
public function completeOffsitePurchase($input)
{
$details = $this->paymentDetails();

    $details['transactionReference'] = $this-&gt;invitation-&gt;transaction_reference;

    $response = $this-&gt;gateway()-&gt;fetchTransaction($details)-&gt;send();

    return $this-&gt;createPayment($response-&gt;getTransactionReference());
}

if ($response->isCancelled()) {
return false;
} elseif ( ! $response->isSuccessful()) {
throw new \Exception($response->getMessage());
}
}

Can you check storage/logs/laravel-error.log for more details

[2016-08-11 08:18:12] production.ERROR: ErrorException [0] : /home/betaal1q/public_html/vendor/symfony/process/ProcessUtils.php [Line 74] => escapeshellarg() has been disabled for security reasons {“context”:“PHP”,“user_id”:0,“account_id”:0,“user_name”:"",“method”:“GET”,“url”:“https://www.betaaljefactuuronline.nl/public/update",“user_agent”:"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36”,“ip”:“81.70.155.81”,“count”:1} []
[2016-08-11 10:26:38] production.ERROR: exception ‘Symfony\Component\Debug\Exception\FatalErrorException’ with message ‘syntax error, unexpected ‘if’ (T_IF), expecting function (T_FUNCTION)’ in /home/betaal1q/public_html/app/Ninja/PaymentDrivers/MolliePaymentDriver.php:15 Stack trace: #0 {main} [] []
[2016-08-11 10:29:10] production.ERROR: exception ‘Symfony\Component\Debug\Exception\FatalErrorException’ with message ‘syntax error, unexpected end of file, expecting function (T_FUNCTION)’ in /home/betaal1q/public_html/app/Ninja/PaymentDrivers/MolliePaymentDriver.php:21 Stack trace: #0 {main} [] []
[2016-08-11 10:30:10] production.ERROR: exception ‘Symfony\Component\Debug\Exception\FatalErrorException’ with message ‘syntax error, unexpected ‘if’ (T_IF), expecting function (T_FUNCTION)’ in /home/betaal1q/public_html/app/Ninja/PaymentDrivers/MolliePaymentDriver.php:15 Stack trace: #0 {main} [] []

I think this is a separate problem, I believe fixing it requires changing your php.ini file.

http://stackoverflow.com/questions/32476556/composer-escapeshellarg-has-been-disabled-for-security-reasons

I enabled “escapeshellarg” on the server and with the extra code:

if ($response->isCancelled()) {
return false;
} elseif ( ! $response->isSuccessful()) {
throw new \Exception($response->getMessage());
}

i still get a “Whoops, looks like something went wrong.”

and this in the error log

[2016-08-11 16:46:42] production.ERROR: exception ‘Symfony\Component\Debug\Exception\FatalErrorException’ with message ‘syntax error, unexpected ‘if’ (T_IF), expecting function (T_FUNCTION)’ in /home/betaal1q/public_html/app/Ninja/PaymentDrivers/MolliePaymentDriver.php:15 Stack trace: #0 {main} [] []

without the code, the problem is also same as before…

Can you try copying over the whole file

https://raw.githubusercontent.com/invoiceninja/invoiceninja/develop/app/Ninja/PaymentDrivers/MolliePaymentDriver.php

I did and the cancellating worked, no errors! still payable after cancellation

Only thing left is the “payment succesfull” message when you come back on the invoice ninjasite, it should be the cancelled message

I still have to check what happens with a succesfull payment…

Kind regards, Ferenc

Live succesfull payment is working as it should

Great to hear!

Is it possible the status message was left over in the session, are you able to reproduce the problem?