diff --git a/app/Services/TemplateService.php b/app/Services/TemplateService.php index f47038fe82..fe20a55c4a 100644 --- a/app/Services/TemplateService.php +++ b/app/Services/TemplateService.php @@ -74,8 +74,9 @@ class TemplateService continue; } $camelType = Utils::toCamelCase(GatewayType::getAliasFromId($type)); - $variables["\${$camelType}Link"] = $invitation->getLink('payment') . "/{$type}"; - $variables["\${$camelType}Button"] = Form::emailPaymentButton($invitation->getLink('payment') . "/{$type}"); + $snakeCase = Utils::toSnakeCase(GatewayType::getAliasFromId($type)); + $variables["\${$camelType}Link"] = $invitation->getLink('payment') . "/{$snakeCase}"; + $variables["\${$camelType}Button"] = Form::emailPaymentButton($invitation->getLink('payment') . "/{$snakeCase}"); } $includesPasswordPlaceholder = strpos($template, '$password') !== false;