if ($RESET) { echo '<h3 style="color:blue">Password Reset Test</h3>'; if (empty(PW_RESET_TOKEN)) { //request a password reset $reset_pw_req = GoCoin::resetPassword($token, USER_EMAIL); if ($reset_pw_req->code == '204') { echo '<div>Password reset requested!</div>'; } else { echo '<div>Password reqest request failure:</div>'; var_dump($reset_pw_req); } } else { //create an array to reset the password with $pw_array = array("password" => "passw0rd", "password_confirmation" => "passw0rd"); //reset a password $reset_pw = GoCoin::resetPasswordWithToken($token, USER_ID, PW_RESET_TOKEN, $pw_array); if ($reset_pw->code == '204') { echo '<div>Password reset successfully!</div>'; } else { echo '<div>Password reset failure:</div>'; var_dump($reset_pw); } } } //confirmation tests $CONFIRM = FALSE; if ($CONFIRM) { echo '<h3 style="color:blue">Confirmation Test</h3>'; if (empty(CONFIRM_TOKEN)) { //request a confirmation email $confirm_email = GoCoin::requestConfirmationEmail($token, USER_EMAIL);