Answer the question
In order to leave comments, you need to log in
Why do sessions crash after payment on the bank page?
The user enters the paid testing site, logs in, forms an order, and the user is billed, after which the user goes to the payment page of the bank serving us to pay by card.
Problem: After the payment is successfully made, the user presses the button on the bank's page "Return to the site", namely:
<input type="button" onclick="location.href="http://www.mysite.com/test"" value="Вернуться на сайт">
class UserIdentity extends CUserIdentity
{
private $_id;
public function authenticate()
{
$user=User::model()->findByAttributes(array('name'=>$this->username));
if($user===null){
$this->errorCode=self::ERROR_USERNAME_INVALID;
}
else if(!$user->validatePassword($this->password)){
$this->errorCode=self::ERROR_PASSWORD_INVALID;
}
else
{
$this->_id=$user->id;
$this->username=$user->name;
if(!empty($user->role))
$this->setState('role', $user->role);
$this->setState('confirmed', $user->confirmed);
$this->errorCode=self::ERROR_NONE;
}
return $this->errorCode==self::ERROR_NONE;
}
public function getId()
{
return $this->_id;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question