- Posts: 306
- Thank you received: 42
Error when adding Paypal Checkout payment method from vendor control panel
-- Joomla version -- : 4.3.4
-- PHP version -- : 8.1
-- Error-message(debug-mod must be tuned on) -- : 0 in_array(): Argument #2 ($haystack) must be of type array, string given
Hi
When trying to add the HikaShop Paypal Checkout payment plugin using the vendor control panel it throws the following error:
Other payment methods can be added OK and the PayPal Checkout method can be added from the admin area.
The callstack is:
regards
Trevor
Please Log in or Create an account to join the conversation.
Can you please confirm me your HikaMarket version number and the content of the line 723 for the pluginmarket/view/html.php file ?
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
The Hikamarket version is: 4.1.1
Line 723 in pluginmarket/view/html.php file is:
regards
Trevor
Please Log in or Create an account to join the conversation.
Please replace the line with
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
I have changed that line and cleaned the cache but the problem persists.
Regards
Trevor
Please Log in or Create an account to join the conversation.
Sorry, my bad!
The arguments are in the right order but the content of $data is not an array while it should be. I read it too fast, I shouldn't..
Please restore the previous content and replace the line
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Thanks for that, the error has gone but the page is not being rendered correctly. (an unrelated problem I think).
The page is being rendered twice. At the top of the page the form it is rendered without any formatting and below there is a correctly formatted version of the page (see attachment).
There is an error displayed in the console:
Please Log in or Create an account to join the conversation.
We're not sure what's going on.
Could you provide a vendor account, a backend access and a FTP access so that we could directly look at what's going on ?
You can provide all this via our contact form:
www.hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
Details sent as requested.
btw. I tried switching the template to Cassopeia and changing the PHP version to 7.4 but the result was the same
regards
Trevor
Please Log in or Create an account to join the conversation.
Thank you for the accesses.
We applied a patch on the Paypal Checkout plugin in your website; it improves the compatibility with HikaMarket.
Joomla 4 does handle the JavaScript differently in the backend than the front-end, which was causing:
1 - A wrong extraction of javascript in the HTML page.
2 - A modification of the initialization sequence.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
The 'Connect to PayPal Checkout ' doesn't seem to work however but I suspect that might be something to do with PayPal. After clicking the button I am asked to log in to PayPal several times but the API codes are not returned and have to be entered manually.
I am away from my office at the moment and will test more thoroughly when I return.
Best regards
Trevor
Please Log in or Create an account to join the conversation.
I see what you mean. I'm indeed able to reproduce the issue on your website.
However, there are no errors or strange thing as far as I can see.
It's just that the paypal onboarding popup doesn't callback the plugin's function to process the onboarding on the server side to automatically fill in the fields for you.
I'm afraid we'll have to contact the PayPal technical engineer we know there to check with them what they can find.
It might take a while...
In the mean time, a simple solution would be to add:
That will remove the connect button and vendors will have to manually enter their credentials.
Please Log in or Create an account to join the conversation.
Thanks for confirming that. Good luck with PayPal.
Best regards
Trevor
Please Log in or Create an account to join the conversation.