Transaction Status Controller

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Dennis
Posts: 15
Joined: 30 Nov 2016, 09:16

Transaction Status Controller

Post by Dennis » 06 Apr 2017, 11:30

Hello!

I'm using the aimeos_pay extension and especially the Omnipay service provider with configuration omnipay.type = Payone_ShopFrontend due to having PAYONE as payment service provider.

On https://github.com/academe/OmniPay-Payone (the library which is included within aimeos_pay) it is described within the section "The Shop Front End API Gateway":
After the user has completed their details on the PAYONE site, a notification of the result will be sent back to your merchant site, and then the user will be returned to either the "success" page or the "failure" page. No data will be carried with that redirect, so the transaction details must be retained in the session to match up with the results in the notification back-channel.
Within the PAYONE merchant interface you can enter a "TransactionStatus URL" which is obviously this back-channel. Is it right that something like a "transaction status controller" is still needed to specify and not yet implemented in aimeos/aimeos_pay? Something like https://github.com/quafzi/payone-magent ... roller.php, which is in this case implemented for Magento.

In the function updateSync of typo3conf\ext\aimeos_pay\Resources\Private\Extensions\ai-payments\lib\custom\src\MShop\Service\Provider\Payment\OmniPay.php I see no chance to succeed. This would be my second approach.

Is it right that the transaction status controller stuff is missing here? What would you recommend to do now? And is there something new regarding this topic?


Many thanks in advance!!!

TYPO3 7.6.15, Aimeos web shop 17.3.0, PHP version 5.6.30-0+deb8u1, Linux

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Transaction Status Controller

Post by aimeos » 06 Apr 2017, 16:30

No, you don't need to implement any controller. The updateSync() method of the Omnipay provider in the ai-payments extensions accepts the notifications sent by the PayOne server. The URL you have to enter in the PayOne interface must point to the "checkout update" page that contains the Aimeos plugin of the same name.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Dennis
Posts: 15
Joined: 30 Nov 2016, 09:16

Re: Transaction Status Controller

Post by Dennis » 19 Apr 2017, 15:11

Hello!

Many thanks for your answer!
The updateSync() method of the Omnipay provider in the ai-payments extensions accepts the notifications sent by the PayOne server.
Now I am facing the problem that in the method updateSync() (https://github.com/aimeoscom/ai-payment ... mniPay.php) the order object will not be updated. I am using the "Payone_ShopFrontend" gateway as it is suggested on the site https://aimeos.org/docs/User_Manual/Adm ... ist#Payone.

The expressions defined in https://github.com/aimeoscom/ai-payment ... y.php#L457 and https://github.com/aimeoscom/ai-payment ... y.php#L462 are always evaluated to false. Therefore the order object is always returned unchanged (please, see https://github.com/aimeoscom/ai-payment ... y.php#L467).

Is there something wrong with the code or is something missing?

The URL you have to enter in the PayOne interface must point to the "checkout update" page that contains the Aimeos plugin of the same name.
I have entered the mentioned page for the "TransactionStatus URL" in the PAYONE interface but as a response always "No service for code "" found" is given. The method "process" inside typo3conf\ext\MYEXTENSIONKEY\Resources\Private\Extensions\MYEXTENSIONKEY\client\html\src\Client\Html\Checkout\Update\Customized.php (copied from the original source https://github.com/aimeos/ai-client-htm ... andard.php) tries to access the service provider code and the order id from the associated view (https://github.com/aimeos/ai-client-htm ... d.php#L288) but without success. The problem is that PAYONE calls the update page without context and apparently the parameters are not there.

Could provide me some further help, please?

Again, many thanks in advance!!!

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Transaction Status Controller

Post by aimeos » 20 Apr 2017, 16:01

Dennis wrote: The expressions defined in https://github.com/aimeoscom/ai-payment ... y.php#L457 and https://github.com/aimeoscom/ai-payment ... y.php#L462 are always evaluated to false. Therefore the order object is always returned unchanged (please, see https://github.com/aimeoscom/ai-payment ... y.php#L467).


The problem starts there as the URL contains no order ID:
https://github.com/aimeoscom/ai-payment ... y.php#L440

The solution would be to extend a "PayOne" specific class from the OmniPay class and overwrite the updateSync() method. Instead of checking for "orderid", it must look for "reference" instead. A patch is very welcome :-)
Dennis wrote: I have entered the mentioned page for the "TransactionStatus URL" in the PAYONE interface but as a response always "No service for code "" found" is given. The method "process" inside typo3conf\ext\MYEXTENSIONKEY\Resources\Private\Extensions\MYEXTENSIONKEY\client\html\src\Client\Html\Checkout\Update\Customized.php (copied from the original source https://github.com/aimeos/ai-client-htm ... andard.php) tries to access the service provider code and the order id from the associated view (https://github.com/aimeos/ai-client-htm ... d.php#L288) but without success. The problem is that PAYONE calls the update page without context and apparently the parameters are not there.
Try to add "&code=..." to the URL you've configured in the PayOne admin interface where "..." is the code you've entered for the payment service item in the "service" tab of the Aimeos expert mode admin interface, e.g. "payone". We need at least to know which service provider is used and the code is static compared to the order ID.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Kai
Posts: 5
Joined: 08 Dec 2016, 15:00

Re: Transaction Status Controller

Post by Kai » 20 Apr 2017, 16:28

Hey,

so, i understand you right, that you consider that the payone-module ist broken? We didn't tried to patch the module or rewrite it, because we thought it were working as we read the following twitter status:
https://twitter.com/aimeos/status/768354058335846400

We are using multiple service-providers, for different payment types (like payone-creditcard, payone-paypal, etc.).

Best regards
Kai

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Transaction Status Controller

Post by aimeos » 21 Apr 2017, 16:06

Kai wrote:so, i understand you right, that you consider that the payone-module ist broken?
The payment itself works but the status update in the Aimeos shop doesn't yield the expected result.
Kai wrote: We are using multiple service-providers, for different payment types (like payone-creditcard, payone-paypal, etc.).
That shouldn't matter. Just choose one of them.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply