[Skip to main content](#vessel-content)

#   Error when adding Paypal Checkout payment method from vendor control panel

##

- **[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")**
- [![trevsmiff's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9214.jpg)](/forum/user/9214-trevsmiff "View trevsmiff's Profile") Topic Author
- [ Offline](/forum/user/9214-trevsmiff)

Less More

- Posts: 306
- Thank you received: 42
-
-

3 years 2 months ago [\#355237](#355237) by [trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")  *[Error when adding Paypal Checkout payment method from vendor control panel](/forum/22-market-bug-report/907020-error-when-adding-paypal-checkout-payment-method-from-vendor-control-panel#355237 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1 -- Error-message(debug-mod must be tuned on) -- : 0 in&#95;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:  If I switch PHP from 8.1 to 7.4 the error goes away.  Other payment methods can be added OK and the PayPal Checkout method can be added from the admin area.  The callstack is:  regards Trevor")* was created by *[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")*

-- HikaShop version -- : 4.7.5
-- 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: Code:

0 in_array(): Argument #2 ($haystack) must be of type array, string given

If I switch PHP from 8.1 to 7.4 the error goes away.

Other payment methods can be added OK and the PayPal Checkout method can be added from the admin area.

The callstack is: Code:

\# Function Location 1 () JROOT/components/com_hikamarket/views/pluginmarket/view.html.php:723 2 in_array() JROOT/components/com_hikamarket/views/pluginmarket/view.html.php:723 3 pluginmarketViewpluginmarket-&gt;processConfig() JROOT/components/com_hikamarket/views/pluginmarket/view.html.php:578 4 pluginmarketViewpluginmarket-&gt;loadPluginTemplate() JROOT/components/com_hikamarket/views/pluginmarket/view.html.php:383 5 pluginmarketViewpluginmarket-&gt;form() JROOT/components/com_hikamarket/views/pluginmarket/view.html.php:27 6 pluginmarketViewpluginmarket-&gt;display() JROOT/libraries/src/MVC/Controller/BaseController.php:645 7 Joomla\CMS\MVC\Controller\BaseController-&gt;display() JROOT/administrator/components/com_hikamarket/helpers/helper.php:1646 8 hikamarketController-&gt;display() JROOT/components/com_hikamarket/controllers/plugin.php:145 9 pluginMarketController-&gt;edit() JROOT/libraries/src/MVC/Controller/BaseController.php:678 10 Joomla\CMS\MVC\Controller\BaseController-&gt;execute() JROOT/administrator/components/com_hikamarket/helpers/helper.php:1712 11 hikamarketController-&gt;execute() JROOT/components/com_hikamarket/hikamarket.php:76 12 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71 13 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73 14 Joomla\CMS\Dispatcher\LegacyComponentDispatcher-&gt;dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361 15 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:208 16 Joomla\CMS\Application\SiteApplication-&gt;dispatch() JROOT/libraries/src/Application/SiteApplication.php:249 17 Joomla\CMS\Application\SiteApplication-&gt;doExecute() JROOT/libraries/src/Application/CMSApplication.php:293 18 Joomla\CMS\Application\CMSApplication-&gt;execute() JROOT/includes/app.php:61 19 require_once() JROOT/index.php:32

regards
Trevor

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0LzkwNzAyMC1lcnJvci13aGVuLWFkZGluZy1wYXlwYWwtY2hlY2tvdXQtcGF5bWVudC1tZXRob2QtZnJvbS12ZW5kb3ItY29udHJvbC1wYW5lbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

3 years 2 months ago [\#355241](#355241) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Error when adding Paypal Checkout payment method from vendor control panel](/forum/22-market-bug-report/907020-error-when-adding-paypal-checkout-payment-method-from-vendor-control-panel#355241 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1 -- Error-message(debug-mod must be tuned on) -- : 0 in&#95;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:  If I switch PHP from 8.1 to 7.4 the error goes away.  Other payment methods can be added OK and the PayPal Checkout method can be added from the admin area.  The callstack is:  regards Trevor")*

Hello,

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 &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0LzkwNzAyMC1lcnJvci13aGVuLWFkZGluZy1wYXlwYWwtY2hlY2tvdXQtcGF5bWVudC1tZXRob2QtZnJvbS12ZW5kb3ItY29udHJvbC1wYW5lbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")**
- [![trevsmiff's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9214.jpg)](/forum/user/9214-trevsmiff "View trevsmiff's Profile") Topic Author
- [ Offline](/forum/user/9214-trevsmiff)

Less More

- Posts: 306
- Thank you received: 42
-
-

3 years 2 months ago [\#355243](#355243) by [trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")  Replied by *[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")* on topic *[Error when adding Paypal Checkout payment method from vendor control panel](/forum/22-market-bug-report/907020-error-when-adding-paypal-checkout-payment-method-from-vendor-control-panel#355243 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1 -- Error-message(debug-mod must be tuned on) -- : 0 in&#95;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:  If I switch PHP from 8.1 to 7.4 the error goes away.  Other payment methods can be added OK and the PayPal Checkout method can be added from the admin area.  The callstack is:  regards Trevor")*

Hi Jerome

The Hikamarket version is: 4.1.1

Line 723 in pluginmarket/view/html.php file is:
Code:

if(in_array($listKey, $data))

regards
Trevor

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0LzkwNzAyMC1lcnJvci13aGVuLWFkZGluZy1wYXlwYWwtY2hlY2tvdXQtcGF5bWVudC1tZXRob2QtZnJvbS12ZW5kb3ItY29udHJvbC1wYW5lbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

3 years 2 months ago [\#355270](#355270) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Error when adding Paypal Checkout payment method from vendor control panel](/forum/22-market-bug-report/907020-error-when-adding-paypal-checkout-payment-method-from-vendor-control-panel#355270 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1 -- Error-message(debug-mod must be tuned on) -- : 0 in&#95;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:  If I switch PHP from 8.1 to 7.4 the error goes away.  Other payment methods can be added OK and the PayPal Checkout method can be added from the admin area.  The callstack is:  regards Trevor")*

Hello,

Please replace the line with Code:

if(in_array($data, $listKey))

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0LzkwNzAyMC1lcnJvci13aGVuLWFkZGluZy1wYXlwYWwtY2hlY2tvdXQtcGF5bWVudC1tZXRob2QtZnJvbS12ZW5kb3ItY29udHJvbC1wYW5lbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")**
- [![trevsmiff's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9214.jpg)](/forum/user/9214-trevsmiff "View trevsmiff's Profile") Topic Author
- [ Offline](/forum/user/9214-trevsmiff)

Less More

- Posts: 306
- Thank you received: 42
-
-

3 years 2 months ago [\#355271](#355271) by [trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")  Replied by *[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")* on topic *[Error when adding Paypal Checkout payment method from vendor control panel](/forum/22-market-bug-report/907020-error-when-adding-paypal-checkout-payment-method-from-vendor-control-panel#355271 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1 -- Error-message(debug-mod must be tuned on) -- : 0 in&#95;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:  If I switch PHP from 8.1 to 7.4 the error goes away.  Other payment methods can be added OK and the PayPal Checkout method can be added from the admin area.  The callstack is:  regards Trevor")*

Hi Jerome

I have changed that line and cleaned the cache but the problem persists.
Code:

foreach($config['data'] as $listKey =&gt; $listData) { $checked = ''; if(!empty($data)) { if(in_array($data, $listKey)) $checked = 'checked="checked"'; }

Code:

0 in_array(): Argument #2 ($haystack) must be of type array, string given Call stack # Function Location 1 () JROOT/components/com_hikamarket/views/pluginmarket/view.html.php:723 2 in_array() JROOT/components/com_hikamarket/views/pluginmarket/view.html.php:723 3 pluginmarketViewpluginmarket-&gt;processConfig() JROOT/components/com_hikamarket/views/pluginmarket/view.html.php:578 4 pluginmarketViewpluginmarket-&gt;loadPluginTemplate() JROOT/components/com_hikamarket/views/pluginmarket/view.html.php:383

Regards
Trevor

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0LzkwNzAyMC1lcnJvci13aGVuLWFkZGluZy1wYXlwYWwtY2hlY2tvdXQtcGF5bWVudC1tZXRob2QtZnJvbS12ZW5kb3ItY29udHJvbC1wYW5lbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

3 years 2 months ago [\#355277](#355277) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Error when adding Paypal Checkout payment method from vendor control panel](/forum/22-market-bug-report/907020-error-when-adding-paypal-checkout-payment-method-from-vendor-control-panel#355277 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1 -- Error-message(debug-mod must be tuned on) -- : 0 in&#95;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:  If I switch PHP from 8.1 to 7.4 the error goes away.  Other payment methods can be added OK and the PayPal Checkout method can be added from the admin area.  The callstack is:  regards Trevor")*

Hello,

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 Code:

foreach($config['data'] as $listKey =&gt; $listData) {

By Code:

if(!empty($data) &amp;&amp; is_string($data)) $data = explode(',', trim($data, ',')); foreach($config['data'] as $listKey =&gt; $listData) {

And it will convert the string into an array so it can handle the checkboxes values.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0LzkwNzAyMC1lcnJvci13aGVuLWFkZGluZy1wYXlwYWwtY2hlY2tvdXQtcGF5bWVudC1tZXRob2QtZnJvbS12ZW5kb3ItY29udHJvbC1wYW5lbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")**
- [![trevsmiff's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9214.jpg)](/forum/user/9214-trevsmiff "View trevsmiff's Profile") Topic Author
- [ Offline](/forum/user/9214-trevsmiff)

Less More

- Posts: 306
- Thank you received: 42
-
-

3 years 2 months ago -  3 years 2 months ago [\#355278](#355278) by [trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")  Replied by *[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")* on topic *[Error when adding Paypal Checkout payment method from vendor control panel](/forum/22-market-bug-report/907020-error-when-adding-paypal-checkout-payment-method-from-vendor-control-panel#355278 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1 -- Error-message(debug-mod must be tuned on) -- : 0 in&#95;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:  If I switch PHP from 8.1 to 7.4 the error goes away.  Other payment methods can be added OK and the PayPal Checkout method can be added from the admin area.  The callstack is:  regards Trevor")*

Hi Jerome

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: Code:

Uncaught SyntaxError: expected expression, got '&lt;' subtask-edit:190:9

[ ![html.jpg](/forum/attachment/57865) ](/forum/attachment/57865 "html.jpg")

[ ![add-payment.jpg](/forum/attachment/57864) ](/forum/attachment/57864 "add-payment.jpg")

- [ ![add-payment.jpg](/forum/attachment/57864) ](/forum/attachment/57864 "add-payment.jpg") [ ](/forum/attachment/57864?download=1 "add-payment.jpg")
- [ ![html.jpg](/forum/attachment/57865) ](/forum/attachment/57865 "html.jpg") [ ](/forum/attachment/57865?download=1 "html.jpg")

Last edit: 3 years 2 months ago by [trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0LzkwNzAyMC1lcnJvci13aGVuLWFkZGluZy1wYXlwYWwtY2hlY2tvdXQtcGF5bWVudC1tZXRob2QtZnJvbS12ZW5kb3ItY29udHJvbC1wYW5lbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

3 years 2 months ago [\#355281](#355281) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Error when adding Paypal Checkout payment method from vendor control panel](/forum/22-market-bug-report/907020-error-when-adding-paypal-checkout-payment-method-from-vendor-control-panel#355281 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1 -- Error-message(debug-mod must be tuned on) -- : 0 in&#95;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:  If I switch PHP from 8.1 to 7.4 the error goes away.  Other payment methods can be added OK and the PayPal Checkout method can be added from the admin area.  The callstack is:  regards Trevor")*

Hi,

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](https://www.hikashop.com/support/contact-us.html)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0LzkwNzAyMC1lcnJvci13aGVuLWFkZGluZy1wYXlwYWwtY2hlY2tvdXQtcGF5bWVudC1tZXRob2QtZnJvbS12ZW5kb3ItY29udHJvbC1wYW5lbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")**
- [![trevsmiff's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9214.jpg)](/forum/user/9214-trevsmiff "View trevsmiff's Profile") Topic Author
- [ Offline](/forum/user/9214-trevsmiff)

Less More

- Posts: 306
- Thank you received: 42
-
-

3 years 2 months ago [\#355303](#355303) by [trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")  Replied by *[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")* on topic *[Error when adding Paypal Checkout payment method from vendor control panel](/forum/22-market-bug-report/907020-error-when-adding-paypal-checkout-payment-method-from-vendor-control-panel#355303 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1 -- Error-message(debug-mod must be tuned on) -- : 0 in&#95;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:  If I switch PHP from 8.1 to 7.4 the error goes away.  Other payment methods can be added OK and the PayPal Checkout method can be added from the admin area.  The callstack is:  regards Trevor")*

Hi

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0LzkwNzAyMC1lcnJvci13aGVuLWFkZGluZy1wYXlwYWwtY2hlY2tvdXQtcGF5bWVudC1tZXRob2QtZnJvbS12ZW5kb3ItY29udHJvbC1wYW5lbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

3 years 2 months ago [\#355362](#355362) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Error when adding Paypal Checkout payment method from vendor control panel](/forum/22-market-bug-report/907020-error-when-adding-paypal-checkout-payment-method-from-vendor-control-panel#355362 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1 -- Error-message(debug-mod must be tuned on) -- : 0 in&#95;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:  If I switch PHP from 8.1 to 7.4 the error goes away.  Other payment methods can be added OK and the PayPal Checkout method can be added from the admin area.  The callstack is:  regards Trevor")*

Hello,

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 &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0LzkwNzAyMC1lcnJvci13aGVuLWFkZGluZy1wYXlwYWwtY2hlY2tvdXQtcGF5bWVudC1tZXRob2QtZnJvbS12ZW5kb3ItY29udHJvbC1wYW5lbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")**
- [![trevsmiff's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9214.jpg)](/forum/user/9214-trevsmiff "View trevsmiff's Profile") Topic Author
- [ Offline](/forum/user/9214-trevsmiff)

Less More

- Posts: 306
- Thank you received: 42
-
-

3 years 2 months ago [\#355383](#355383) by [trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")  Replied by *[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")* on topic *[Error when adding Paypal Checkout payment method from vendor control panel](/forum/22-market-bug-report/907020-error-when-adding-paypal-checkout-payment-method-from-vendor-control-panel#355383 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1 -- Error-message(debug-mod must be tuned on) -- : 0 in&#95;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:  If I switch PHP from 8.1 to 7.4 the error goes away.  Other payment methods can be added OK and the PayPal Checkout method can be added from the admin area.  The callstack is:  regards Trevor")*

Thanks for sorting that Jerome, the page is now rendering correctly.

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0LzkwNzAyMC1lcnJvci13aGVuLWFkZGluZy1wYXlwYWwtY2hlY2tvdXQtcGF5bWVudC1tZXRob2QtZnJvbS12ZW5kb3ItY29udHJvbC1wYW5lbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

3 years 2 months ago [\#355390](#355390) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Error when adding Paypal Checkout payment method from vendor control panel](/forum/22-market-bug-report/907020-error-when-adding-paypal-checkout-payment-method-from-vendor-control-panel#355390 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1 -- Error-message(debug-mod must be tuned on) -- : 0 in&#95;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:  If I switch PHP from 8.1 to 7.4 the error goes away.  Other payment methods can be added OK and the PayPal Checkout method can be added from the admin area.  The callstack is:  regards Trevor")*

Hi,

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: Code:

if(!hikashop_isClient('administrator')) { unset($this-&gt;pluginConfig['connect']); return; }

after the line: Code:

parent::onPaymentConfiguration($element);

in the file plugins/hikashoppayment/paypalcheckout/paypalcheckout.php
That will remove the connect button and vendors will have to manually enter their credentials.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0LzkwNzAyMC1lcnJvci13aGVuLWFkZGluZy1wYXlwYWwtY2hlY2tvdXQtcGF5bWVudC1tZXRob2QtZnJvbS12ZW5kb3ItY29udHJvbC1wYW5lbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")**
- [![trevsmiff's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9214.jpg)](/forum/user/9214-trevsmiff "View trevsmiff's Profile") Topic Author
- [ Offline](/forum/user/9214-trevsmiff)

Less More

- Posts: 306
- Thank you received: 42
-
-

3 years 2 months ago [\#355393](#355393) by [trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")  Replied by *[trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")* on topic *[Error when adding Paypal Checkout payment method from vendor control panel](/forum/22-market-bug-report/907020-error-when-adding-paypal-checkout-payment-method-from-vendor-control-panel#355393 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1 -- Error-message(debug-mod must be tuned on) -- : 0 in&#95;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:  If I switch PHP from 8.1 to 7.4 the error goes away.  Other payment methods can be added OK and the PayPal Checkout method can be added from the admin area.  The callstack is:  regards Trevor")*

Hi Nicolas

Thanks for confirming that. Good luck with PayPal.

Best regards
Trevor

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0LzkwNzAyMC1lcnJvci13aGVuLWFkZGluZy1wYXlwYWwtY2hlY2tvdXQtcGF5bWVudC1tZXRob2QtZnJvbS12ZW5kb3ItY29udHJvbC1wYW5lbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.093 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
