Advertisement:

Author Topic: Payments pro plugin is not working with Friendly URLs (Permalinks)  (Read 1559 times)

JanosUK

  • Newbie
  • *
  • Posts: 10
Guys, as soon as I change to friendly URLs in OSCLASS 3.7.1, paypal stops working when returning to merchant.

Cliking on the "Returning to Merchant" button in paypal when the payment is completed takes me to

http://websiteaddress.co.uk/payment/paypal-return/

and this page cannot be found.

Payment is not registered, and the actual advert is not activating as premium.

Working ok when using non friendly URLs but I need this working please.


_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: Payments pro plugin is not working with Friendly URLs (Permalinks)
« Reply #1 on: April 05, 2017, 12:51:04 am »
As I told you on the other thread :


Please open a support ticket on the market : https://market.osclass.org/plugins/payments/osclass-payments-pro_203

You could also enable PHP debug following this guide https://doc.osclass.org/Debug_PHP_errors

Try to pay again and paste here the contents of the debug.log file.

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: Payments pro plugin is not working with Friendly URLs (Permalinks)
« Reply #2 on: April 05, 2017, 12:30:42 pm »
Also, check that oc-content/plugins/payment_pro/config.php doesn't have any whitespace before the <?php tag or after the ?> tag

JanosUK

  • Newbie
  • *
  • Posts: 10
Re: Payments pro plugin is not working with Friendly URLs (Permalinks)
« Reply #3 on: April 05, 2017, 01:59:01 pm »
I've checked it, config.php was ok, thanks for the suggestion.

I have logged the debug, this is the only entry / error message in the log for payment_pro

[05-Apr-2017 10:50:22 Europe/London] PHP Warning:  mcrypt_encrypt(): Key of size 58 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /var/www/html/mywebsite/oc-content/plugins/payment_pro/functions.php on line 8

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: Payments pro plugin is not working with Friendly URLs (Permalinks)
« Reply #4 on: April 05, 2017, 02:04:52 pm »
You use 58 characters for the PAYMENT_PRO_CRYPT_KEY, and it has to be of length 32 instead, please remove some characters from said key.

NOTE: Your configuration will be un-readable after the change and you will need to re-type your paypal's/stripe/etc configuration

JanosUK

  • Newbie
  • *
  • Posts: 10
Re: Payments pro plugin is not working with Friendly URLs (Permalinks)
« Reply #5 on: April 05, 2017, 02:14:45 pm »
Can you be a bit more specific please? Where can I change this key? Is this the API signature ? Thanks mate

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: Payments pro plugin is not working with Friendly URLs (Permalinks)
« Reply #6 on: April 05, 2017, 02:15:31 pm »
You need to change the key at oc-content/plugins/payment_pro/config.php

JanosUK

  • Newbie
  • *
  • Posts: 10
Re: Payments pro plugin is not working with Friendly URLs (Permalinks)
« Reply #7 on: April 05, 2017, 02:17:46 pm »
I have found it in the config.php, what else do I need to do if I change it to 32bit then?

Cheers

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: Payments pro plugin is not working with Friendly URLs (Permalinks)
« Reply #8 on: April 05, 2017, 02:20:40 pm »
It the key is of the requried length (32 chars long), then, everything else should work fine. But as I told you before, the configuration at  https://yourdomain.tld/oc-admin/index.php?page=plugins&action=renderplugin&route=payment-pro-admin-conf  will be "corrupted" and you need to re-type it again

JanosUK

  • Newbie
  • *
  • Posts: 10
Re: Payments pro plugin is not working with Friendly URLs (Permalinks)
« Reply #9 on: April 05, 2017, 02:40:38 pm »
Thanks very much for your help _CONEJO, clicking on returning to merchant now works ok with Friendly URLs.

I've only changed the config.php, and it's working ok (in sandbox mode right now), without re typing my paypal config, not sure how is it possible.
The key was not setup by me in the config file so I presume it was generated automatically, you guys might wanna have a look into it why it's generating 58 chars long keys.

Anyway, many thanks for you help and your patience, I do appreciate it.

Janos

JanosUK

  • Newbie
  • *
  • Posts: 10
Re: Payments pro plugin is not working with Friendly URLs (Permalinks)
« Reply #10 on: April 05, 2017, 05:20:21 pm »
Guys, also would like to confirm changing the key to 32 chars fixed my issue with paying with tokes as well!

Thanks again for your help.