I need to implement this for a client. The idea is to authenticate a card against the bank or CC provider (if the gateway allows it) and then, when the items are shipped, actually charge the credit card by authorizing the previous authenticated transaction.
The gateway I am planning to use is protx (VPS Direct module contributed here: http://www.ubercart.org/forum/development/2149/protx_payment_gateway_has...) but I think that finding a way to do this would apply to any gateway.
My question is what hooks or schemes should I use for doing this kind of things. I don't the uc_payment support this with the API hooks currently available so I am thinking about the workflow-ng module.
So this is my idea, please let me know what you think and if you can think of a different/better way of doing this:
1. On checkout, have the actual uc_payment with the gateway authenticate the card.
2. Have the contributed module exports some actions and default rules (conditions and events might be needed as well) that would be in charge of authorizing (eventually cancelling) the transaction
3. configure new status on the order status configuration screen or use the ones there. (new status could be: payment authenticated, payment authorized, and shipped for instance), I have to think properly the order status part.
4. Define rules in a way that when the order of the status changed, the transaction is authorized against the gateway and, depending on the result from the gateway, update the stauts or do something else.
Now, what do you think? Does this make sense?. I will definitely need to code the workflow into the gateway module.
Can you think of any other better way of doing this?
Thanks a lot!
It's been an interesting time setting up/developing for ubercart.
a.=


