jmtech Posted January 26, 2017 Share Posted January 26, 2017 I'm currently accepting credit card orders from the website (running on WHMCS) and it works well. A visitor comes to the site, selects a product, proceeds to checkout, enters credit card details, the invoice is generated and paid immediately by credit card and the site is provisioned. In order to entice new customers, I want to offer a "no upfront payment, try free for 14 days". I am wanting the process to be one of the following. 1) A visitor comes to the site, selects a product, proceeds to checkout, enters credit card details and the site is provisioned. In 14 days the invoice is generated and paid automatically using the card details on file. or 2) A visitor comes to the site, selects a product, proceeds to checkout, enters credit card details, the invoice is generated with a due date 14 days in the future and the site is provisioned. After 14 days the invoice is automatically paid by credit card. I was thinking of the following approach for each option. 1) Add a PendingOrder hook to set the first payment amount to $0 and the NextDueDate to 14days from the Registration Date. I'm hoping this is run before the invoice is generated and thus doesn't charge immediately. I imagine a $0 invoice will likely be generated and marked as paid - which is ok. Then when the next due date comes up, an invoice should be generated with the full amount of the original order and then charged. This way, someone could purchase an annual hosting subscription, pay nothing upfront and then automatically be charged after 14 days. 2) Add a InvoiceCreationPreEmail hook to set the invoice due date to 14 days after the invoice date. what I want to know is, if I set this- for website orders through the cart part, will WHMCS charge the card immediately, or will it wait for the due date? There's not really any info on when the payment gateway is charged in relation to the hooks for an online order. Anyone done something similar or know the answers to the above questions? I'm a software engineer so have no issues creating all the above, I just need a little more info to avoid a lengthy trial and error process (if possible). Thanks a bunch in advance. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.