frontend/components/payments/PayssionPaymentGateway.php
/**
     * Validates response from payssion by comparing signatures
     *
     * @param  array  $response payssion request data
     * @return boolean
     */
Validates response from payssion by comparing signatures
@param  array  $response payssion request data
@return boolean
Validates response from payssion by comparing signatures @param array $response payssion request data @return boolean
public function isValidResponse($response)
    {
        if (isset($response['pm_id']) &&
            isset($response['amount']) &&
            isset($response['currency']) &&
            isset($response['order_id']) &&
            isset($response['state']) &&
            isset($response['notify_sig'])) {
            $arr = [
                $this->apiKey,
                $response['pm_id'],
                $response['amount'],
                $response['currency'],
                $response['order_id'],
                $response['state'],
                $this->apiSecret
            ];
            $sign = md5(implode('|', $arr));
            return ($sign == $response['notify_sig']);
        }
        return false;
    }
public function isValidResponse ( $ response ) { if ( isset ( $ response [ 'pm_id' ] ) && isset ( $ response [ 'amount' ] ) && isset ( $ response [ 'currency' ] ) && isset ( $ response [ 'order_id' ] ) && isset ( $ response [ 'state' ] ) && isset ( $ response [ 'notify_sig' ] ) ) { $ arr = [ $ this -> apiKey , $ response [ 'pm_id' ] , $ response [ 'amount' ] , $ response [ 'currency' ] , $ response [ 'order_id' ] , $ response [ 'state' ] , $ this -> apiSecret ] ; $ sign = md5 ( implode ( '|' , $ arr ) ) ; return ( $ sign == $ response [ 'notify_sig' ] ) ; } return false ; }
Validates response from payssion by comparing signatures
 @param  array  $response payssion request data
 @return boolean
Validates response from payssion by comparing signatures @param array $response payssion request data @return boolean