src/Payline/PaylineSDK.php
public function getDecrypt($message, $accessKey)
    {
        $cipher = "AES-256-ECB";
        $opts = OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING;

        $message = $this->base64_url_decode($message);
        $decrypted = openssl_decrypt($message, $cipher, $accessKey, $opts);
        $len = strlen($decrypted);
        $pad = ord($decrypted[$len - 1]);

        return substr($decrypted, 0, strlen($decrypted) - $pad);
    }
public function getDecrypt($message, $accessKey)
    {
        $cipher = "AES-256-ECB";
        $opts = OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING;

        $message = $this->base64_url_decode($message);
        $decrypted = openssl_decrypt($message, $cipher, $accessKey, $opts);
        $len = strlen($decrypted);
        $pad = ord($decrypted[$len - 1]);

        return substr($decrypted, 0, strlen($decrypted) - $pad);
    }
public function getDecrypt ( $ message , $ accessKey ) { $ cipher = "AES-256-ECB" ; $ opts = OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING ; $ message = $ this -> base64_url_decode ( $ message ) ; $ decrypted = openssl_decrypt ( $ message , $ cipher , $ accessKey , $ opts ) ; $ len = strlen ( $ decrypted ) ; $ pad = ord ( $ decrypted [ $ len - 1 ] ) ; return substr ( $ decrypted , 0 , strlen ( $ decrypted ) - $ pad ) ; }
Decrypts message sent by getToken servlet

@param string $message
message to decrypt
@param string $accessKey
merchant access key (SHA256 encrypted)
Decrypts message sent by getToken servlet