public function trnRegister($redirect = false)
    {
        $crc = md5($this->postData["p24_session_id"]."|".$this->posId."|".$this->postData["p24_amount"]."|".$this->postData["p24_currency"]."|".$this->salt);
        
        $this->addValue("p24_sign", $crc);
        
        $RES = $this->callUrl("trnRegister", $this->postData);
        if ($RES["error"] == "0") {
            
            $token = $RES["token"];
            
        } else {
            
            return $RES;
            
        }
        if ($redirect) {
            $this->trnRequest($token);
            
        }
        
        return ["error" => 0, "token" => $token];
        
        
    }
public function trnRegister($redirect = false)
    {
        $crc = md5($this->postData["p24_session_id"]."|".$this->posId."|".$this->postData["p24_amount"]."|".$this->postData["p24_currency"]."|".$this->salt);
        
        $this->addValue("p24_sign", $crc);
        
        $RES = $this->callUrl("trnRegister", $this->postData);
        if ($RES["error"] == "0") {
            
            $token = $RES["token"];
            
        } else {
            
            return $RES;
            
        }
        if ($redirect) {
            $this->trnRequest($token);
            
        }
        
        return ["error" => 0, "token" => $token];
        
        
    }
public function trnRegister ( $ redirect = false ) { $ crc = md5 ( $ this -> postData [ "p24_session_id" ] . "|" . $ this -> posId . "|" . $ this -> postData [ "p24_amount" ] . "|" . $ this -> postData [ "p24_currency" ] . "|" . $ this -> salt ) ; $ this -> addValue ( "p24_sign" , $ crc ) ; $ RES = $ this -> callUrl ( "trnRegister" , $ this -> postData ) ; if ( $ RES [ "error" ] == "0" ) { $ token = $ RES [ "token" ] ; } else { return $ RES ; } if ( $ redirect ) { $ this -> trnRequest ( $ token ) ; } return [ "error" => 0 , "token" => $ token ] ; }
Prepare a transaction request

@param bool $redirect Set true to redirect to Przelewy24 after transaction registration

@return array array(INT Error code, STRING Token)
Prepare a transaction request