Quantcast
Channel: WHMCS Community Forums
Viewing all articles
Browse latest Browse all 13458

Add Order api

$
0
0
So I wanted to use add order to price override for shipping, can I use this from a hook then have payment proceed as usual or do I need to cancel the default action somehow and how do I do that. Say in OnBeforeCheckout

function inject_beforecheckout($vars){
global $smarty;
pull smarty variables from checkout page total price, my shipping variable add them together to get my real total.
//Create client with details from smarty variables
call addorder from internal api.
//call capture payment here? or is it necessary?
//Generate my own invoice here?
//Prevent default action... Somehow.
}

Basically I just want to avoid charging the customer twice for a custom product.
I'll run some test cases now and see what I come up with. Otherwise I'd be willing to pay the creator a modest sum to give me some help with it. Or anybody that can do this in a way that three requirements are met.

Shipping shows on the invoice and
The customer pays only once.
Tax works as usual.

Viewing all articles
Browse latest Browse all 13458

Trending Articles