Payfast Payment plugin Joomla 4

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
1 year 11 months ago #347980

-- HikaShop version -- : 4.7.0

Hi

I have been using Hikashop for years on my Joomla 3 site, I am wanting to move to Joomla 4 and as such I have started setting up a test J4 site to see if all plugins are working correctly.
We currently use Payfast as our payment gateway, I however see no plugin for Payfast on the plugin list on J4, am I missing something or is Payfast not supported as a payment gateway on J4

Please Log in or Create an account to join the conversation.

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
1 year 11 months ago #347986

Hi,

The PayFast plugin has been removed from the HikaShop installation package with HikaShop 4.6.2. It conflicted with the PayFast plugin provided by PayFast themselves and their plugin is better overall :
support.payfast.co.za/portal/en/kb/artic...ayfast-with-hikashop
However, while I was checking the situation of that plugin for you, I saw in their code a problem for the support of Joomla 4. I've made a pull request so that they can update the plugin:
github.com/PayFast/mod-hikashop/pull/1
You can manually do the modification after installing the plugin on your website if they don't integrate the pull request in a timely manner.

Please Log in or Create an account to join the conversation.

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
1 year 11 months ago #348005

Hi Nicolas

Like always your service is amazing.

I have installed their plugin and made the changes you sent them in the pull request.
When trying to checkout using the PayFast payment method I however get the following error after I click "finish" on the checkout page.

0 Class 'JRequest' not found

Please Log in or Create an account to join the conversation.

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
1 year 11 months ago #348008

Hi,

Thanks for the feedback. Ideally, when you get such error, you need to activate the debug setting of the joomla configuration to get the full error message.
However, I think I know what is the problem. I've made an extra patch for the issue after clicking the finish button:
github.com/PayFast/mod-hikashop/pull/1/files

The following user(s) said Thank You: SnoozeULooze.co.za

Please Log in or Create an account to join the conversation.

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
1 year 11 months ago #348026

Hi Nicolas

you were 100% correct, thank you for the fix, it is working correctly now.

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

  • Posts: 4
  • Thank you received: 0
  • Hikashop Business
1 year 11 months ago #348572

Thank you for posting this. It helped me resolve the same issue on my side.

Please Log in or Create an account to join the conversation.

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
1 year 8 months ago #350711

Hi Nicolas

I need your assistance again, I am wanting to update my site to PHP8.1 but as soon as I do the Payfast plugin breaks.
I have contacted Payfast regarding this and their response to me is that they did not develop the plugin and therefore they can not help me.
Would it be possible for you to assist, or would you recommend I start searching for a different payment gateway.

Please Log in or Create an account to join the conversation.

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
1 year 8 months ago #350719

Hi,

The plugin was added to GitHub by PayFast themselves...
It's a shame they don't want to support it.
I can assist, if you can provide the detailed error message you get.

Please Log in or Create an account to join the conversation.

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
1 year 8 months ago #350728

Hi Nicolas,

You are amazing thank you.

AS soon as you update the site to PHP8 or higher you get the following error.
0 preg_match(): Argument #2 ($subject) must be of type string, array given.

Please Log in or Create an account to join the conversation.

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
1 year 8 months ago #350729

Hi,

Please activate the debug setting of the joomla configuration to get the full error message.

Please Log in or Create an account to join the conversation.

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
1 year 8 months ago #350831

Hi Nicolas

If I turn on debug and have PHP8.1 on the site as soon as you click checkout, it completely breaks and the page does not render.
If I turn off debug and turn on max error reporting I get the following as soon as I click finish after selecting payfast as payment option.
8192 Return type of Twig\Node\Node::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

If I turn on PHP 8.0 and then turn on debug the checkout page doe render, if I click finish however I get the following



If I turn off debug on PHP 8.0 the transaction seems to process correctly using payfast, so now I am not sure if it is a payment plugin issue or something else.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
1 year 8 months ago #350846

Hi,

The detailed error message indicates that the error happens with one of your mass actions.
It's trying to apply a "contains" filter on a column which doesn't have a valid format.
On older PHP versions, it works fine because it's less strict and it just fails the check without outputting an error, but on recent versions of PHP, it crashes as it is a lot more strict.
So what you can do is to use PHP 8.1 and disable your mass actions one by one to identify which one is the problem. Once that's done, please provide the screenshot of the settings of that mass action so that we can investigate.

Please Log in or Create an account to join the conversation.

  • Posts: 1
  • Thank you received: 1
1 year 7 months ago #351730

I just saw that the plugin has been updated on the official Payfast Hikashop plugin github and it seems to work - I need to do further testing but it does install on Joomla 4 https://github.com/PayFast/mod-hikashop

Last edit: 1 year 7 months ago by Jerome.
The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.099 seconds
Powered by Kunena Forum