Jump to content

chateaux

Member
  • Posts

    16
  • Joined

  • Last visited

Everything posted by chateaux

  1. I would like to sell some of my hosting in different currencies as we have a number of markets that we deal with. Essentially I want to set and forget the prices: A: Shared hosting in the US - $9.95 / m (USD is the base currency) B: Shared hosting in the EU - €9.95 / m I don't want the system to convert anything from A -> B or from B -> A, the prices are fixed regardless of the exchange rate fluctuation. The reason being that if prices are linked to A, and someone has paid B, their rate could go up and down each month. Now some of our hosting is in countries where the exchange rate fluctuations are pretty big which is causing people to think twice about a USD pegged hosting. I note when adding a product, I can add the fixed price in a given currency however this seems to cause problems: 1. When placing an order in currency B, customer ends up with a $0.00 in the basket and no product selected 2. When a customer logs into their account and searches for products, all products in currency B are not listed Is there a resolution for this short of setting up a WHMCS install for each regions (not a workable option). thanks
  2. More reasons for this problem to happen. When you write a hook, it seems white spaces causes the hook not to work as expected. After removing white spaces from the <? and the function name as well as before the ?> tag, the problem seemed to sort its self out.
  3. Weird behaviour: I notice that if I land on this page: http://www.domain.com/viewinvoice.php?id=68&paymentsuccess=true&tx=1JG71505CV8649611&st=Completed&amt=0.02&cc=USD&cm=68&item_number= and I hit refresh It will divert to: http://www.domain.com/cart.php?a=complete This may be due to the hook point I have created which pulls in some of the class files from my app and runs a db connection to the app db... I will test this, and if the db proves to be causing the strain I may have to reconsider how I update the app...
  4. The correct payment complete page is outlined in this thread: http://forum.whmcs.com/showthread.php?39008-what-is-the-order-success-url I added to the post, hoping someone can help me out. I have wasted the whole day trying to figure this issue out...
  5. Would like to add to this post, my order complete URL is viewinvoice.php?id=59&paymentsuccess=true&tx=53S207391F115703V&st=Completed&amt=0.01&cc=USD&cm=59&item_number= It used to be cart.php?a=complete but after chancing a setting somewhere, it changed to the viewinvoice.php link. Now none of my hooks work and I have no idea how to change it back. Has anyone else had this problem and or can advise what to do to get the system to redirect to the cart.php page Thanks!
  6. Hmm... It was working last week however I was distracted on Friday and left in the middle of finishing off the hook point code and while updating admin settings. Originally set to: Automatically forward the user to the payment gateway And payment after the merchant gateway would return to the "order complete page", without a hassle. So now the payment complete page is skipped... Maybe there is a better way to do this. I have an external app, users select a subscription and are directed to WHMCS, they select the payment option and are directed to the vendor to make payment, after payment they are redirected back to the whmcs payment complete page, the hook checks $ispaid and updates the app subscription table and finally redirects the user back to the app with a validated subscription. I have opened a support ticket for this as well... as I am completely out of ideas.
  7. Updating the settings: Setup -> General Settings -> Ordering -> Auto Redirect on Checkout influences how the customer gets to the payment pages and not what happens after payment. The process is as follows: 1. User selects product and picks payment channel (paypal in this case) 2. User is directed to paypal to make payment 3. On payment, user is directed to the viewinvoice.php instead of the usual payment complete page I have a hook that executes on ShoppingCartCheckoutCompletePage which is now being skipped...
  8. When a customer completes their order, they are directed from the payment complete page to the: viewinvoice.php page. How do I turn this off so that the customer stays at the payment complete page? Thanks!
  9. Opting to simply pull the information our of the database... but am stumped as to how to link back to products, this is what I have to work with: Invoice ID Order Number Order ID The object is to get the ID's from the order placed and find out which products where purchased and so I am looking at the following tables: 1. tbproducts - this is where my products that I created live and my ultimate destination 2. tblorders - I have the orderID for this table and OrderNum for this table, however there are no references to the tblproducts database 3. tblinvoices - I have the InvoiceID, however their are no further references to any other table 4. tblinvoiceitems - I have the InvoiceID for this table AND the product description here BUT no ID. I could match the product description in this table to the product description in tblproducts, however this is something I am not prepared to accept as a solution... I do note a 'relid' however I am unsure what table this relates to? Ahh, okay I have worked it out... in table tblinvoiceitems, the products I have created are listed as type: "hosting", so when I look in the tbl hosting table, I find the products that have been purchased. I guess the naming convention is due to the WHMCS having stemmed from a hosting background. So this is my process, hope it helps others: Create hook for: ShoppingCartCheckoutCompletePage 1. The ID from the $vars I require is: OrderID 2. Use OrderID in table tblhosting to grab the information I need Voila, Thanks!
  10. Ahh ok - that would explain why I cant find an API function to grab the product details. One more question, is there a way to pass a variable to WHMCS when a client places an order? I need this to divert the customer back to the app... or should I just add a variable to the users session?
  11. It would seem the other option would be to use: http://docs.whmcs.com/API:Get_Orders Using any of these: [orderid] => 33 [ordernumber] => 4527979924 [invoiceid] => 33 $command = "getorders"; $adminuser = "admin"; $values["id"] = $vars['orderid']; $results = localAPI($command,$values,$adminuser); I get an empty array as a result... Anyone know what to do? I just need to know what the client has ordered... should be simple, just cant work it out.
  12. Reviewing the API functionality I see I can use: http://docs.whmcs.com/API:Get_Products However the only commands available to me via the internal API are: $command = "getproducts"; $adminuser = "admin"; $values["gid"] = 5; //OR PID, GID, MODULE $results = localAPI($command,$values,$adminuser); None of which has been made available on the checkout complete page via the $vars...
  13. Hello, I am writing a hook to update an external AP which is called on the ShoppingCartCheckoutCompletePage, the following $vars relate to the product purchased are made available to me via the $vars variable: [orderid] => 33 [ordernumber] => 4527979924 [invoiceid] => 33 I need to find specific details relating to the product purchased so I can update my external app accordingly and am sure their is a simple way to do this. I just cant find the information in the documentation. Can anyone advise? Many thanks! Array ( [carttpl] => verticalsteps [currency] => Array ( [id] => 1 [c ode] => USD [prefix] => $ [suffix] => USD [format] => 1 [rate] => 1.00000 ) [ipaddress] => 55.555.55.55 [ajax] => [numitemsincart] => 0 [orderid] => 33 [ordernumber] => 4527979924 [invoiceid] => 33 [ispaid] => 1 [amount] => 0.01 [paymentmethod] => paypal [clientdetails] => Array ( [userid] => 5 [id] => 5 [firstname] => Firstname [lastname] => Lastname [companyname] => [email] => myemail@myisp.com [address1] => my address [address2] => [city] => my city [state] => my state [postcode] => 0070 [countrycode] => ZZ [country] => ZZ [countryname] => Country Name [phonecc] => 00 [phonenumber] => 000000000 [notes] => [password] => 13e535b50a1ced7a629d386ee6291678:l%G)o [currency] => 1 [defaultgateway] => [cctype] => [cclastfour] => [securityqid] => 0 [securityqans] => [groupid] => 0 [status] => Active [credit] => 0.00 [taxexempt] => [latefeeoveride] => [overideduenotices] => [separateinvoices] => [disableautocc] => [language] => [lastlogin] => Date: 24/01/2013 10:48<br>IP Address: 55.555.555.555<br>Host: hostname [billingcid] => 0 ) )
  14. One small update, I am using AutoAuth to log the users in, in step 1. TonsOfStores: I build my own apps because it is fun... I am sure DateMill is a great app though
  15. Just to follow up on this, thought my research would help other members: My first question was how do I create an account on WHMCS remotely and how do I log a user in to WHMCS from an external application. The answer it seems is surprisingly easy. Step 1: Wrote a simple php class to do all the things the WHMCS API offers. Step 2: Think logically: My APP is the dog, WHMCS is the tail The one thought was to create an account on WHMCS when a user registers with the site. This I think is overkill as only a small percentage of users will become paying members or need support. So I have opted not to do this. If users want support they can create their own account manually on WHMCS directly or log into a pre-existing account. This does not effect how my app works with WHMCS. I only start to focus on WHMCS data when a user decides to make a payment from my app and is diverted to WHMCS. In order to make a connection between the WHMCS account and the APP account, the application must take control of this process and using the whmcs API and do a couple of checks before setting a session for the user on WHMCS. Using: 1. ADD CLIENT 2. GET CLIENTS DETAILS Step1: Check to see if a whmcs ID exists in my APP - if so, grab the details from WHMCS and log them in (set the session). If not: Step2: Check to see if the users email exists in WHMCS, if so, update the customers WHMCS ID, and log them in. If not: Step3: Create an account in WHMCS, using the customers APP details, and log them. I was initially concerned that the user may change details from the wHMCS side and this would cause problems however I have come to realise that the tail does not wag the dog and that all my app needs is the correct WHMCS customer ID to serve the customer... Will post how I get WHMCS to talk back to my app once that is done.
  16. Background: ------------- I have used WHMCS for some webhosting products and like it and have decided to see if I can get it to work for a networking (similar to dating) application I am writing for fun. The application signs people up who do the usual things such as adding profiles / pictures / etc. So I essentially have two sites that need to talk to each other: 1. My app - the business logic 2. WHMCS - support and payments Here are some scenarios I need some clarity on: Scenario 1: ------------ For a user to contact another member, they need a valid subscription which can be purchased via WHMCS. To do so they are diverted to the WHMCS site to pick the desired subscription. At this point WHMCS requires the user to sign in or create an account, so my first question is this. Is it possible to automatically create an account in WHMCS, using the information from my app, and include a "custom field" such as my apps customer ID? Is there a best practice for something like this? Scenario 2: ------------ Assuming we can create a WHMCS account (and log them in) on the fly, the next question is this. When a user makes a payment via one of the payment options, (I am trialing with 2co) how do I go about telling my app that a successful purchase was made, since I will need to update its subscriptions and orders table? I am assuming I need to create a custom module for this? Scenario 3: ------------ On purchase complete, is there anyway to divert the customer back to the site from whence they came (not a biggie as the payment can be made in a new window (or iframe) which the customer can simply close). Thank you in advance for any insights on this.
×
×
  • 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