hello,
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
Backtrace:
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
musa
July 16, 2017, 3:38pm
3
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.
Kovah
July 17, 2017, 7:32am
5
I will update the files as soon as possible.
1 Like
Niek_M
July 20, 2017, 5:40pm
6
Hi Kovah, Any update on this topic? I have experienced the same issue.
Great work though!
Thanks!
Kovah
July 20, 2017, 6:30pm
7
Unfortunately the Mollie payment package was not updated by the original author by now. We have to wait for the fix to arrive.
Joris
September 4, 2017, 10:23am
8
we’re a couple of weeks further - any updates?
Kovah
September 4, 2017, 2:05pm
9
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.
2 Likes
Good day all, I “fixed” this by modifying ;
application/modules/guest/controllers/Payment_handler.php
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
2 Likes
Johnny
September 26, 2017, 11:11am
12
Hi guys,
I still have the same problem even when I read and done all above writen.
Anyone a solution for this?
Thanks
It has been quiet over here. Did someone find a solution?
Johnny
November 1, 2017, 8:58pm
14
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…
Kovah
November 2, 2017, 9:10am
15
Johnny
November 3, 2017, 11:04pm
16
Thanks Kovah!
But like I said before, it does not work…
laemol
November 16, 2017, 8:07pm
17
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)
laemol
November 16, 2017, 8:18pm
18
Benny54
November 16, 2017, 9:19pm
19
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???
laemol
November 16, 2017, 9:32pm
20
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.