Jump to content

avans

Member
  • Posts

    13
  • Joined

  • Last visited

Everything posted by avans

  1. We've created a third-party gateway module which seems to be working well, except for 1 thing.... For some reason, WHMCS is not providing any of the “Client Variables” to the submit form. Other variables DO get passed successfully (such as invoice ID and amount). According to the gateway module template and this page we seem to have the correct variables. Here is the module code: <?php function hosted_config() { $configarray = array( "FriendlyName" => array("Type" => "System", "Value"=>"Hosted"), "accountId" => array("FriendlyName" => "Account ID", "Type" => "text", "Size" => "20", ), "token" => array("FriendlyName" => "Payment Page Token", "Type" => "text", "Size" => "20", ), "testmode" => array("FriendlyName" => "Test Mode", "Type" => "yesno", "Description" => "Tick this to run test transactions only", ), ); return $configarray; } function helcimhosted_link($params) { # Gateway Specific Variables $gatewayaccountid = $params['accountId']; $gatewaytoken = $params['token']; $gatewaytestmode = $params['testmode'] == 'Yes' ? 1 : 0; # Invoice Variables $invoiceid = $params['invoiceid']; $description = $params["description"]; $amount = $params['amount']; # Format: ##.## $currency = $params['currency']; # Currency Code # Client Variables $clientid = $params['clientdetails']['id']; $firstname = $params['clientdetails']['firstname']; $lastname = $params['clientdetails']['lastname']; $email = $params['clientdetails']['email']; $address1 = $params['clientdetails']['address1']; $address2 = $params['clientdetails']['address2']; $city = $params['clientdetails']['city']; $state = $params['clientdetails']['state']; $postcode = $params['clientdetails']['postcode']; $country = $params['clientdetails']['country']; $phone = $params['clientdetails']['phonenumber']; # Enter your code submit to the gateway... $code = '<form action="https://gateway.HOSTED.com/hosted/" method="post"> <input type="hidden" name="merchantId" value="'.$gatewayaccountid.'" /> <input type="hidden" name="token" value="'.$gatewaytoken.'" /> <input type="hidden" name="testmode" value="'.$gatewaytestmode.'" /> <input type="hidden" name="customerId" value="'.$clientid.'" /> <input type="hidden" name="orderId" value="'.$invoiceid.'" /> <input type="hidden" name="amount" value="'.$amount.'" /> <input type="hidden" name="billingName" value="'.$firstname.' '.$lastname.'" /> <input type="hidden" name="billingAddress" value="'.$address1.' '.$address2.'" /> <input type="hidden" name="billingCity" value="'.$city.'" /> <input type="hidden" name="billingProvince" value="'.$state.'" /> <input type="hidden" name="billingPostalCode" value="'.$postcode.'" /> <input type="hidden" name="billingCountry" value="'.$country.'" /> <input type="hidden" name="billingPhoneNumber" value="'.$phone.'" /> <input type="hidden" name="billingEmailAddress" value="'.$email.'" /> <input type="submit" value="Pay Now" /> </form>'; return $code; } ?> What am I doing wrong?? Or is it a typo in the documentation?? Any help is appreciated.
  2. After running a quick test, it now adds the tax. I think because I didn't have any quantities, it considered the generated invoices "custom". I'm not sure why that's not selected by default. But anyways, works now!
  3. This link makes it sound like "custom invoices" was my problem: http://docs.whmcs.com/Tax/VAT#Setting_Custom_Invoices_as_Taxable ....I'm testing now.
  4. ...Do I need to have "Custom Invoices" checked under tax rules?
  5. Thanks for the quick response. Yes, I have enabled "Tax Enabled" and I use taxes regularly with no problems for manual invoices and products. I'm generating monthly invoices for non-product items (such as labor or monthly contracts), so I have "0" in hours, since all I want on the invoices are a description and amount.
  6. I've searched the forum, but have only found threads relating to the opposite problem I'm having.... I need tax to be automatically added to every invoice generated via billable items. It is my understanding by some other threads, that WHMCS is supposed to function like that by default. I went in to tax rules, and checked "billable items", but it did not seem to have an effect. Every month, my invoices are generated without taxes. Any thoughts would be appreciated. I'm using 4.5.2 Thanks in advance.
  7. WHMCS staff.... Any comment on this? I agree this is a bug (or missing feature). It's very important, as applying payments is pain right now. For those of us paying someone to handle the books, missing features like this cost us time and thus money. WHMCS is so great overall, so why not fix some of these important features to try and achieve perfection???
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated