Chained ajax call, second call returns 0

I’ve actually solved the problem there was an error in the code the $_POST['preapproval_key'] should have been $_POST['preapprovalKey'] literally hours wasted….

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)