Hi,
In very simple terms you need an implementation of "PaymentGatewayExternalForm" and "CallbackAware". External form will allow to generate hidden fields that spec refers to "data and sign" and render a submit button. Callback from paysera would be sent to callback filter implementation but you do not need to implement that one - filter from base module can be reused which will invoke "CallbackAware" methods on your PG implementation to decode the parameters from Base64 and should check the signature (by the looks of it ss1 is simplest approach). All the "private" parameters like "projectId", "password" and callback configurations would be PaymentGatewayParameters, so SQL should be added to put those parameter definitions. Lastly there would be some configuration properties work to allow togging this module on and off.
One strange thing about the API though is that it does not ever seem to send "payment rejected" result, which could present a challenge.
From the docs:
Payment status:- 0 - payment has not been executed
- 1 - payment successful
- 2 - payment order accepted, but not yet executed (this status does not guarantee execution of the payment)
- 3 - additional payment information
So if you get a callback anything other than 1 - what happens? That is probably a clarification that should be addressed to Paysera. Potentially it could be only few cases that return anything other than 1 but then if we receive 2 and accept the order and then the order payment is rejected on their end - how will we get notified?
It sounds like a mouthful but it is not that complicated to put together, just few bits on the integration behaviour to clarify and you are golden.
What we can suggest is that if you are willing to collaborate on this, we can put out a branch on github with skeleton module (that will cover all the configs and basic classes) but then we will be waiting for your pull request on the actual implementation. Also that would mean that your plugin would become part of the core project, which could mean easier upgrades going forward.
Hope this was helpful and let us know your thoughts on the collaboration.
Regards,
YC team