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)
#3228 by andreas.allacher
20 Aug 2016, 01:31

our Payment provider is basically a payment page, however it is integrated via Javascript and therefore looks exactly like the main page, the result is transmitted to the payment provider.

So therefore, I would need to be able to add the corresponding payment provider code instead of a form.

Is there an easy solution for this or will there be support for this in the future?

I currently have two possibilities:
1.) Redirect to own page which only displays the payment provider form by corresponding GET parameters.
2.) Override client/html/templates/checkout/standard/process-body-default.php and modify the form via JavaScript and pass corresponding values via the form Attribute-Array.

Number 2 is a bit hacky though but I am also not completely happy about number 1.
#3229 by andreas.allacher
20 Aug 2016, 09:05
I have now done the following, still a bit hacky but better than an own page or overwriting the whole form:
I added hidden fields to the form that contains my parameters.
Then I created 3 Decorators, that overwrite / modify the Template HTML code, here I check if the view has the corresponding form parameters set, if so then I modify the HTML code accordingly.
Once I do a regex to remove the double form tag and otherwise I just return the correct HTML code / header.
#3236 by aimeos
20 Aug 2016, 15:48
We've also noticed that it's difficult to integrate the upcoming client side payment integrations via Javascript into that step into the checkout. Until October, we can't do any breaking changes which would be necessary but afterwards, I think we will split this up.
#3237 by andreas.allacher
20 Aug 2016, 16:29
Great, let me know when the change is finished. I have for now done it with the solution I mentioned in the comment above and I have it completely working now - however it is still a bit hacky.

Also in Javascript solutions it might make sense to also be able to display certain parts of the order too, I have now at least added the amount of the order but showing the complete shopping card would be nice too :)

The payment provider is for PayUnity.Flex
If you want I could give you access to the aimeos extension and the TYPO3 extension, so you can take a look at it.
(Before making it public I would definitely like feedback).
TYPO3 was necessary here because aimeos returns the checkoutId upon success with "id=" and that is reserved in TYPO3, so I had to add a remap feature too, I have not tested that part with realurl yet but I think it should still work (actually it should be a bit easier with realurl).

testMode checks are not complete though, currently it is always in testMode :)