Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transactionnal Email -> Not Working #5

Open
lvillain opened this issue Jan 23, 2017 · 1 comment
Open

Transactionnal Email -> Not Working #5

lvillain opened this issue Jan 23, 2017 · 1 comment

Comments

@lvillain
Copy link

Hello,

The transactional emails are not functional because "$arguments->endpoint" have a camelcase in the string.

Example : the function "CS_REST_Transactional_SmartEmail" becomes "CS_REST_Transactional_smartemail" and not work.

To fix it, simple change needed to the factory.php file.

    private function getClassName($endpoint) {
        $endpoint = ucfirst(strtolower($endpoint));
        return 'CS_REST_' . $endpoint;
    }

To

    private function getClassName($endpoint) {
        $endpoint = ucfirst($endpoint);
        return 'CS_REST_' . $endpoint;
    }

More, the http_status_code of this function is 202, and as your previous issue, you need to fix it.

Simple change needed to the invoke.php file.

if ($data->http_status_code != 200 && $data->http_status_code != 201) {

Needs to be changed to

if (substr( $data->http_status_code, 0, 2 ) !== '20') {

Knowing that the code 20x is a success code, it fix the problem for a long time :-)

@budby
Copy link
Contributor

budby commented Dec 5, 2017

This problem was fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants