Jump to content

Recommended Posts

After updating to WHMCS 7.9.0, we have come across an error while checking out using the Stripe payment gateway.

Error log: Smarty Error: Unable to load template 'file:D:\xxx\xxx\xxx/xxx/xxx/invoice-payment.tpl'

Where does the 'invoice-payment.tpl' even exist? As the template six does not have it.
Even while attaching the new PayPal gateway it throws an 500 error after signing in.

Capture.PNG

Edited by upalm

Share this post


Link to post
Share on other sites

For others, I found that I need to copy the missing six templates for our customer theme. This was quicker than getting a response from the theme developers upstream.

Namely:

  • the file: templates/six/invoice-payment.tpl
  • directory subfolder: templates/six/payment/

 

Share this post


Link to post
Share on other sites

Hey @brian! Could you help me with the popover as I am always landing up with 'Remote Transaction Failure' with 'Stripe' as the only change from my template and the default 'six' is that I can see is that the popover for the 3dsecure is not coming and neither does it come for the 2FA (basically it does not load the stripe.js) according to view source,

I've been trying to wrap my head around this for weeks now but I cannot seem to solve it. Please if you could help us it would be highly appreciated.

Is there a way to add the hook manually to the template?


 

add_hook("AdminAreaFooterOutput", 1, function (array $vars) {
    $filename = $vars["filename"];
    $return = "";
    if ($filename == "clientssummary") {
        $return = "<script type=\"text/javascript\" src=\"https://js.stripe.com/v3/\"></script>";
    }
    return $return;
});
add_hook("ClientAreaFooterOutput", 1, function (array $vars) {
    $filename = $vars["filename"];
    $template = $vars["templatefile"];
    $return = "";
    $requiredFiles = array("cart", "creditcard");
    $requiredTemplates = array("account-paymentmethods-manage", "invoice-payment");
    if (in_array($filename, $requiredFiles) || in_array($template, $requiredTemplates)) {
        $return = "<script type=\"text/javascript\" src=\"https://js.stripe.com/v3/\"></script>";
    }
    return $return;
});

 

Edited by upalm

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

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