I'm working on a custom module that will allow payments through a particular bank API.
The API requires me to do a POST to a certain URL that they have provided me, where the user will enter his credit card information. To do so, I created a form with the #action set toward the provided URL, and with the mandatory fields asked by the bank (name, address, phone, etc.)
Unfortunatly, the form is in the module, and I don't think that is good practice, since it gets more complicated for a user to add his own custom field (lets say a date of birth for example).
Is there anyway that my module can get a form created by the form API in another module ("my_custom_cart") and add to it the mandatory fields needed for the transaction?
Thank you