function add($args) { $this->username = $args[0]; $this->password = $args[1]; if (!$this->validate()) { return array('status' => false, 'charge_id' => false, 'error' => "Authentication failed"); } @($var['account_id'] = $args[2]); @($var['service_id'] = $args[3]); @($var['amount'] = $args[4]); @($var['sweep_type'] = $args[5]); @($var['taxable'] = $args[6]); @($var['quantity'] = $args[7]); @($var['product_id'] = $args[8]); @($var['description'] = $args[9]); @($var['attributes'] = $args[10]); $charge = new charge(); $charge->xmlrpc = true; $ret = $charge->api($var, $charge); return $ret; }