Jump to content
  • 0

Autodebit


katycomputer

Question

When invoices go out, they aren't reflecting the client's autodebit setting. In other words, they never say "Auto debit is enabled for your account, so we'll automatically process the card you have on file on..."

Where have I gone wrong? Autodebit is working, the invoice goes out and is automatically paid as expected.

 

Here is my invoice template:

Hi {contact.first_name},

An invoice has been created for your account and is attached to this email in PDF format.
{% for invoice in invoices %}Invoice: #{invoice.id_code}
Invoice Total: {invoice.total | currency_format invoice.currency}
Balance Due: {invoice.due | currency_format invoice.currency}

{% if autodebit %}{% if invoice.autodebit_date_formatted %}Auto debit is enabled for your account, so we'll automatically process the card you have on file on {invoice.autodebit_date_formatted}.{% endif %}{% endif %}

Pay Now
{% endfor %}
If you have any questions about your invoice, please let us know!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
6 hours ago, katycomputer said:

When invoices go out, they aren't reflecting the client's autodebit setting. In other words, they never say "Auto debit is enabled for your account, so we'll automatically process the card you have on file on..."

Where have I gone wrong? Autodebit is working, the invoice goes out and is automatically paid as expected.

 

Here is my invoice template:

Hi {contact.first_name},

An invoice has been created for your account and is attached to this email in PDF format.
{% for invoice in invoices %}Invoice: #{invoice.id_code}
Invoice Total: {invoice.total | currency_format invoice.currency}
Balance Due: {invoice.due | currency_format invoice.currency}

{% if autodebit %}{% if invoice.autodebit_date_formatted %}Auto debit is enabled for your account, so we'll automatically process the card you have on file on {invoice.autodebit_date_formatted}.{% endif %}{% endif %}

Pay Now
{% endfor %}
If you have any questions about your invoice, please let us know!

Here' is the default conditional for the auto debit message:

{% if autodebit %}{% if invoice.autodebit_date_formatted %}Auto debit is enabled for your account, so we'll automatically process the card you have on file on {invoice.autodebit_date_formatted} unless payment has been applied sooner.{% else %}If you would like us to automatically charge your card, login to your account at http://{client_url} to set up auto debit.{% endif %}{% else %}If you would like us to automatically charge your card, login to your account at http://{client_url} to set up auto debit.{% endif %}

It looks like you just removed the else statement, so it'll either show that message or nothing. I'd suggest putting something in between the autodebit and invoice.autodebit_date_formatted conditionals as a test to see if it is output, which will show whether autodebit is boolean true.

We have a task - https://dev.blesta.com/browse/CORE-2770 which is designed to catch cases where auto-debit is enabled but there is no account set for auto-debit. I don't think this is related to your issue.

The only other thing I would suggest is to try toggling auto-debit off and back on. If the value is not set for some reason, it may appear on anyway. If you toggle off and back on, it will ensure the setting is present.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...