Advertisement:

Author Topic: Payments Pro installation issues  (Read 1502 times)

Red

  • Newbie
  • *
  • Posts: 2
Payments Pro installation issues
« on: May 14, 2018, 07:49:13 am »
The devs have been unresponsive for almost a week so hopefully here yields me better results:

When I try to install the plugin i get the following error: "Plugin couldn't be installed because it triggered a fatal error." When I tried to install again I get a different error message: "Plugin couldn't be installed because of: Error importSQL::ModelPaymentPro
/home/swansx/public_html/oc-content/plugins/payment_pro/struct.sql" but I would assume it has created the SQL tables already and is complaining about that. I deleted the plugin and also deleted the SQL tables it created and tried the whole process again and got the exact same results. Please advise.

Thanks for the help in advance - I thought buying from "Osclass Team" sounded like I'd have reliable support but unfortunately that hasn't really panned out for me.

Rhonda

  • Newbie
  • *
  • Posts: 3
Re: Payments Pro installation issues
« Reply #1 on: June 21, 2018, 11:30:36 am »
did you get any help with this problem as we are experiencing the same

AdrianOlmedo

  • Newbie
  • *
  • Posts: 46
  • Working with Osclass 3.7.5
Re: Payments Pro installation issues
« Reply #2 on: April 09, 2019, 02:50:13 pm »
Sure you have Osclass Payments Pro 1.1.6+ and PHP 7 running on your current server, which will no longer support Mcrypt and therefore shows that error.

Open functions.php of payment_pro and add this script at the start:
Code: [Select]
function encrypt_decrypt($action, $string) {
        $output = false;
        $encrypt_method = "AES-256-CBC";
        $secret_key = PAYMENT_PRO_CRYPT_KEY; //'WS-SERVICE-KEY';
        $secret_iv = PAYMENT_PRO_CRYPT_KEY; //'WS-SERVICE-VALUE';
       
        // hash
        $key = hash('sha256', $secret_key);
       
        // iv - encrypt method AES-256-CBC expects 16 bytes - else you will get a warning
        $iv = substr(hash('sha256', $secret_iv), 0, 16);
       
        if ($action == 'encrypt') {
            $output = base64_encode(openssl_encrypt($string, $encrypt_method, $key, 0, $iv));
        } else {
            if ($action == 'decrypt') {
                $output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);
            }
        }
        return $output;
}

Then, modify the following functions payment_pro_crypt($string) and payment_pro_decrypt($string) to this:
Code: [Select]
function payment_pro_crypt($string) {
        /*$cypher = MCRYPT_RIJNDAEL_256;
        $mode = MCRYPT_MODE_ECB;
        return base64_encode(mcrypt_encrypt($cypher, PAYMENT_PRO_CRYPT_KEY, $string, $mode,
            mcrypt_create_iv(mcrypt_get_iv_size($cypher, $mode), MCRYPT_RAND)
            ));*/
        return encrypt_decrypt('encrypt', $string);
}

function payment_pro_decrypt($string) {
        /*if($string=='') { return ''; };
        $cypher = MCRYPT_RIJNDAEL_256;
        $mode = MCRYPT_MODE_ECB;
        return str_replace("\0", "", mcrypt_decrypt($cypher, PAYMENT_PRO_CRYPT_KEY,  base64_decode($string), $mode,
            mcrypt_create_iv(mcrypt_get_iv_size($cypher, $mode), MCRYPT_RAND)
            ));*/
        if ($string == '') return '';
        return encrypt_decrypt('decrypt', $string);
}

It is all!

« Last Edit: April 09, 2019, 03:05:03 pm by AdrianOlmedo »

aide2006

  • Newbie
  • *
  • Posts: 16
Re: Payments Pro installation issues
« Reply #3 on: July 02, 2019, 05:22:29 pm »
Excellent stuff thanks, helped no end, all works fine now.

catalogfriday@gmail.com

  • Newbie
  • *
  • Posts: 1
Re: Payments Pro installation issues
« Reply #4 on: August 01, 2019, 08:24:14 am »
I can't fix it. Help me find a solution that can be done for me.

AdrianOlmedo

  • Newbie
  • *
  • Posts: 46
  • Working with Osclass 3.7.5
Re: Payments Pro installation issues
« Reply #5 on: August 01, 2019, 05:49:45 pm »
Hi, put the PHP version, the version of your Osclass, version of payment_pro you are using. If you have any other relevant information, put it too, to help you.
« Last Edit: August 01, 2019, 05:53:51 pm by AdrianOlmedo »