altcha icon indicating copy to clipboard operation
altcha copied to clipboard

Js error

Open pippuccio76 opened this issue 5 months ago • 3 comments

Hi , i use your code , js and php...

PHP example have an error:

this: [CODE] $payload = [ 'algorithm' => $challenge['algorithm'], 'challenge' => $challenge['challenge'], 'number' => 12345, // Example number 'salt' => $challenge['salt'], 'signature' => $challenge['signature'], ];

[/CODE]

must change to :

[CODE] $payload = [ 'algorithm' => $challenge->algorithm, 'challenge' => $challenge->challenge, 'number' => 43267, // Example number 'salt' => $challenge->salt, 'signature' => $challenge->signature, ];

[/CODE]

because return an object instead of array.

Now i have this error :

altcha.js:1186 ALTCHA [name=altcha] SyntaxError: Unexpected token '<', "

pippuccio76 avatar Sep 11 '24 10:09 pippuccio76