Add Backup Payment Method Capability to Invoice System
Many merchants accept more than one form of payment that use tokenized payment methods. A common arrangement is a merchant that accepts credit cards and PayPal or who uses two different credit card gateways.
Take the scenario where a merchant has a tokenized gateway where the gateway holds the card data and gives the merchant a token to use on future payments. The same merchant uses PayPal billing agreements and receives a token from PayPal to bill on demand (not a typical one-off PayPal payment or subscription where PayPal sends $x on y day of the month.)
Many customers like the idea of having a backup payment method, whether a second credit card or PayPal, so that they do not have to worry about interrupted service or other issues if a payment fails. Equally, almost all merchants would like this, too, as it helps preserve active business if a payment fails.
Currently, if a client uses a tokenized payment method, that token is stored in the tbl_clients.gatewayid field. The problem is that if a client adds a new or 'backup' method, it overwrites the value in that field. So a client cannot have more than one token (or payment method) available.
My request it to make WHMCS aware of the concept of a backup payment method so that the automatic cron / admin area is able to utilize a second or even third backup payment method in the event that the primary payment method fails.
My thoughts are that we need additional fields to store backup payment method tokens and for the daily cron to be made aware that if a payment fails, try an alternate method. The client area would need to be updated so that clients could manage primary/backup methods and choose whether they want to use a certain payment method as a backup.
The only way to do this today is with a fair amount of kludging around with custom fields and a separate cron that retries failed invoice payments using other payment methods. It's sort of a pain.