Calling Card PIN email variable

What’s the variable name for the email templates. When activating a new customer we need to email the calling card PIN or he can’t make calls. #PIN# does not work.

adding the below line in …/web_interface/astpp/application/libraries/astpp/common.php
fixed it. Now the email template sends the calling card PIN

case ‘create_account’:
$message = str_replace(‘#PIN#’, $accountinfo[‘pin’], $message);

1 Like

Seems that could be added as a switch in the admin client management area to send a PIN or not.

The way it’s done now is weird. Each email template has only access to a watered-down set of variables and only the variables that are used in the default template provided by ASTPP are functional. No one considered that end users might change these templates and may want to use other variables. In a2billing for example, all variables can be used for any email template which is better IMHO.

To send the PIN simply requires the use of #PIN# in the email template with the above code so no need to use the admin client management area. The template wording can be changed according to your requirements and that will do nicely as long as the variables are enabled in the PHP file which is a minor change.

That’s why I suggested you go with a2billing for your needs.

I see some did some pull requests so it now supports PHP version 7.x

a2billing was a great product but the code is no longer supported and there are many issues besides PHP support. We still have one server running it, but it’s no longer a viable option. I aim to get astpp to perform the way we like and then switch. Most code changes are minor anyway. It’s just weird that I even have to make these changes in a mature version 6 product. For example, it’s blowing my mind that there are no access number surcharges in astpp. I mean, the code is already there for DIDs so why not develop this feature? Every other billing platform has it.

Version 6 Community is not that mature. Version 5 and 6 were released a year apart, and literally only a handful of lines of code were changed at the initial release of version 6 from 5.