IP 1.5.3 Mollie payment error


i’am currently test with payments with mollie. every time when i try to pay i get the following error

using version 1.5.3

An uncaught Exception was encountered

Type: Omnipay\Common\Exception\InvalidRequestException

Message: The transactionReference parameter is required

Filename: /home/stefan/domains/(domain)/private_html/vendor/omnipay/mollie/src/Message/CompletePurchaseRequest.php

Line Number: 26


File: /home/stefan/domains/(domain)/private_html/vendor/omnipay/common/src/Omnipay/Common/Message/AbstractRequest.php
Line: 610
Function: getData

File: /home/stefan/domains/(domain)/private_html/application/modules/guest/controllers/Payment_handler.php
Line: 244
Function: send

File: /home/stefan/domains/(domain)/private_html/application/modules/guest/controllers/Payment_handler.php
Line: 198
Function: payment_validate

File: /home/stefan/domains/(domain)/private_html/index.php
Line: 327
Function: require_once

bump, anyone?

Mollie has changed its API.
You need to update Omnipay:

how do i update? overwrite the mollie folder in the omnipay folder? that didn’t work.

I will update the files as soon as possible.

1 Like

Hi Kovah, Any update on this topic? I have experienced the same issue.

Great work though! :smile:

Unfortunately the Mollie payment package was not updated by the original author by now. We have to wait for the fix to arrive.

we’re a couple of weeks further - any updates?

No, still no update for the payment driver.

Hey all,
I’m the maintainer of Omnipay. What you get is an error because you’re not providing the transactionReference to the completePurchaseRequest. This is not an issue with Omnipay or Mollie, but with the integration.

You should receive a transactionReference in your fetchPurchaseResponse (see https://github.com/thephpleague/omnipay-mollie/blob/a8534c97464c4be59db15a3e48f8f3b3634b7a8b/src/Message/FetchTransactionResponse.php#L101-L109)

You can store that in the database/session/whatever and use it in your completePurchaseCall, together with the other parameters.


Good day all, I “fixed” this by modifying ;

In the section $request = array( (line 75)

Add :

			'issuer' => '',
			'description' => 'Factuurnummer 000' . $invoice->invoice_number,

Then , it works.

But. it will always report succesfull transaction (and add the payment in invoiceplane), even if it’s cancelled at Mollie.

Is this because I do something wrong with the Issuer ? Or still a problem with the TransAction reference

Edit : This only works in Mollie Test mode I Think.
I Remember now and also modified TransAction reference to ;

$params[‘transactionReference’] = ‘Nothing’;

So now I understand why it’s always succesfull.

Will try to figure out how to set the correct transaction reference because like barry said that is the actual problem


Hi guys,

I still have the same problem even when I read and done all above writen.
Anyone a solution for this?

It has been quiet over here. Did someone find a solution?

Yes and one extra quiet some time, I guess we have to look for another invoice script.
Had the same problem with mbstring and did never found a solution.
too bad…

See https://development.invoiceplane.com/browse/IP-612

Thanks Kovah!

But like I said before, it does not work…

try application/modules/guest/controllers/Payment_handler.php
add after line 96 ($response = $gateway->purchase($request)->send())
$data = $this->session->userdata($invoice->invoice_url_key . '_online_payment');
$data['transactionReference'] = $response->getTransactionReference();
$this->session->set_userdata($invoice->invoice_url_key . '_online_payment', $data);

(edit: changed code because it could break other payment methods)


Just tested with the modifications of laemol against the Mollie test environment (test API key).
When i cancel the payment in the test environment the invoice gets the status PAID where it should not change the Invoice status.
Any clue???

Quick solution to prevent paid status on return/cancel is to wrap the return statement on line 268 in an if statement, followed by a return false.
if ($response->isPaid()) { return true; } return false;
It would be even better to use the Mollie webhook to update the status. The cancelUrl (line 85) that is used and the payment_cancel (line 274) don’t do anything in this case.