Questions around the TYPO3 integration and plugins as well as Flow and NeosCMS
Forum rules: Always add your TYPO3/Flow, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#4315 by derJu
13 Jun 2017, 13:56
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?
Attachments
Screen Shot 2017-06-13 at 15.54.50.png
Screen Shot 2017-06-13 at 15.54.50.png (120.62 KiB) Viewed 312 times
#4323 by derJu
15 Jun 2017, 07:33
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?
#4324 by aimeos
15 Jun 2017, 16:11
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-postfinance/blob/5ee06bc9ffd132d31021f9dc6c9d13ae78d43cc4/src/Message/CompletePurchaseRequest.php#L97
#4325 by derJu
16 Jun 2017, 14:49
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" }
#4328 by aimeos
18 Jun 2017, 09:12
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-postfinance/blob/master/src/Message/CompletePurchaseRequest.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-payments/blob/master/lib/custom/src/MShop/Service/Provider/Payment/OmniPay.php#L616

Can you confirm that there's an empty ORDERID value passed to the driver?
https://github.com/bummzack/omnipay-postfinance/blob/master/src/Message/PurchaseRequest.php#L31