I’m developing a custom payment gateway which uses a totally different payment flow for its processing and need some advice on the best approach to adapt invoice plane to this payment gateway approach.
The payment gateway logic entails having the credit card form hosted on the gateway servers…thus I do not need to have a “credit card details” form displayed on the payment_information view. I do however, need to have some custom form input captures and “posted” specifically related for this gateway. Thus the process would be sort of like…
Click on Pay Now Button and either:-
- Post custom values to payment gateway URL
- Redirect to Custom payment information form which would then post custom values to the payment gateway URL
My idea for this would be require one or more of the following to be considered:-
- Modify the payment_information form method to load a custom form
- Add a setting for the gateway specifying a custom view with the form
- Modify the payment_information view to load a custom form or default to packaged payment_information form
- Use custom javascript to manipulate DOM elements based on the payment method selected.
Based on this what would be a good approach to implement?