I have resumed working on my Klarna payment method. My problem now is that Klarna expect a "snippet" on the confirmation page. Very similar to the snippet serving as a payment form.
I get the snippet in the PostProccessPayment method, and want it to end up as a liquid accessable property on the "Thanks" page.
As far as I can see, the proper way of doing so would be to add a "htmlConfirmationSnippet" property to the PostProcessPaymentResult class and the PaymentIn class. Add necessary modifications to the converters. Modify the models and converters for liquid.
This is probably not a good idea for me to do, but maybe it can be added as a feature request.
My next thought was to jam the snippet into a dynamic property on the payment, but this idea crashed when I realized I can't reach that property on the liquid template "thanks.liquid".
Anyone got any ideas on how to solve this?
I try to not think of the order note property even if that would probably work, but would be oh so dirty to do.
I solved it for now. Not a beautiful solution, but it works: