Page 1 of 1

Aimeos Pay - Omnipay does not work

Posted: 13 Jun 2017, 13:56
by derJu
Hi aimeos,

Omnipay does not work after update to the latest version of Aimeos.

I got a Error when i came back to the confirm in aimeos:
Invalid response from payment gateway
You have an idea how to fix this problem?

Re: Aimeos Pay - Omnipay does not work

Posted: 13 Jun 2017, 22:43
by aimeos
Which versions do you exactly use and most important, which Omnipay payment driver?

Re: Aimeos Pay - Omnipay does not work

Posted: 14 Jun 2017, 04:23
by derJu
Hi Aimeos,

I use the Omnipay payment driver Postfinance:
https://github.com/bummzack/omnipay-postfinance

TYPO3 8.7.1
Aimeos 17.4.1
Aimeos_Pay 16.10.0

Re: Aimeos Pay - Omnipay does not work

Posted: 14 Jun 2017, 19:19
by aimeos
Does this also happen with the latest aimeos_pay version (17.6.0)?

Re: Aimeos Pay - Omnipay does not work

Posted: 15 Jun 2017, 07:16
by derJu
It does not change anything! The same error in aimeos_pay 17.06.0.

Code: Select all

Invalid response from payment gateway

Re: Aimeos Pay - Omnipay does not work

Posted: 15 Jun 2017, 07:33
by derJu
I have found out that the orderid is not attached to the following values.

Code: Select all

	<input type="hidden" name="ACCEPTURL" value="https://www.doami.de/shop/confirm/cc/postfinance/"/>
       <input type="hidden" name="CANCELURL" value="https://www.doami.de/shop/confirm/cc/postfinance/"/>
in the old version with aimeos 16 it looks like

Code: Select all

 
          <input type="hidden" name="ACCEPTURL" value="https://www.domain.de/shop/confirm/cc/postfinance/215/"/>
          <input type="hidden" name="CANCELURL" value="https://www.domain.de/shop/confirm/cc/postfinance/215/"/>
Where are the set?

Re: Aimeos Pay - Omnipay does not work

Posted: 15 Jun 2017, 16:11
by aimeos
The order ID isn't necessary and can't be trusted so it was removed. But the removed order ID in the URL shouldn't be the source of the problem.

The message is created by the Omnipay/Postfinance driver:
https://github.com/bummzack/omnipay-pos ... st.php#L97

Re: Aimeos Pay - Omnipay does not work

Posted: 16 Jun 2017, 14:49
by derJu
i think the orderid is necessary, in the vardump of $signData is the orderid empty:
https://github.com/bummzack/omnipay-postfinance/blob/master/src/Message/CompletePurchaseRequest.php#L87

Code: Select all

"3021[/url]417812" ["STATUS"]=> string(1) "5" } array(4) { ["NCERROR"]=> string(1) "0" ["ORDERID"]=> string(0) "" ["PAYID"]=> string(10) "3021417812" ["STATUS"]=> string(1) "5" } array(4) { ["NCERROR"]=> string(1) "0" ["ORDERID"]=> string(0) "" ["PAYID"]=> string(10) "3021417812" ["STATUS"]=> string(1) "5" } array(4) { ["NCERROR"]=> string(1) "0" ["ORDERID"]=> string(0) "" ["PAYID"]=> string(10) "3021417812" ["STATUS"]=> string(1) "5" } array(4) { ["NCERROR"]=> string(1) "0" ["ORDERID"]=> string(0) "" ["PAYID"]=> string(10) "3021417812" ["STATUS"]=> string(1) "5" }

Re: Aimeos Pay - Omnipay does not work

Posted: 18 Jun 2017, 09:12
by aimeos
The ORDERID parameter is one that is sent as POST payload FROM the payment gateway and it only has the same name as the previously used Aimeos URL parameter:
https://github.com/bummzack/omnipay-pos ... st.php#L59

If it's an empty string, it might be a problem that it's not sent within the original POST request TO the payment gateway, even if it should be passed correctly as "transactionId" to the Omnipay driver:
https://github.com/aimeoscom/ai-payment ... y.php#L616

Can you confirm that there's an empty ORDERID value passed to the driver?
https://github.com/bummzack/omnipay-pos ... st.php#L31