I've been developing a custom token gateway module, but I'm stuck on creating a function to be called on Invoice Attempt Capture button. I didn't find it anywhere inside WHMCS docs, but but my best guess is that it should call `_capture` function. I've tried adding a blank function with default return array, added some logging to see if it goes inside the function but to avail. Please advise if there are some useful docs on this as I keep banging my head on it.
Thanks in advance,
Viktor

Hey guys,
I'm trying to create a way for client to do an upgrade of his package from monthly to annually and I'm completely lost on how to do that. I tried the UpgradeProduct API approach but I always get back the invoiceid as 0 while upgrading the actual plan without user actually paying for it. Also I tried the way to create a custom Invoice for the user so he make the payment and I'm not sure how to actually upgrade the product once it's paid.
Thanks in advance,
Viktor