Skip to main content

Paypal Checkout works fine on computer but not phone

2 years 2 months ago #363090 by a2zcs
-- url of the page with the problem -- : balsamridgechristmas.com/index.php/maple...ucts/product/listing
-- HikaShop version -- : 5.1.0
-- Joomla version -- : 3.10.12
-- PHP version -- : 7.4.33
-- Browser(s) name and version -- : chrome

We are having an issue with this site where the paypal checkout is working fine on the computer, but not on phones. When the customer gets to the screen to choose between either PayPal or Credit Card and they click on either button, we just get a screen with a lock and spinning indicator. Tested on multiple networks and devices with the same results.

Any ideas?

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

2 years 2 months ago #363093 by nicolas
Hi,

The website doesn't allow access for France. Could you please activate this so that we can look at the situation ?

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

2 years 2 months ago #363103 by a2zcs
My apologies. Please try it now

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

2 years 2 months ago #363106 by nicolas
Hi,

I see many javascript errors on the PayPal buttons page with my browser's console :
i.imgur.com/Zg2UwIG.png
I think it might be linked to your HTTP headers. Try following this:

Supposing that the buttons are displayed, if you click on the "PayPal" button and you don't get the PayPal payment popup, or you get a blank popup on top of the normal popup, it's likely you have a problem with the Cross Origin Opener Policy of your website. You need to configure your HTTP headers plugin, via the Joomla plugins manager and change its "Cross-Origin-Opener-Policy" setting to allow for it.

www.hikashop.com/support/documentation/4...out-form.html#issues

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

2 years 2 months ago #363107 by a2zcs
I have no http headers plugin, nor any that reference "http" or "headers"

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

2 years 1 month ago #363113 by nicolas
Ah right, you're on Joomla 3.
I had forgotten about that.
So it is a different problem.
I'm not sure what the problem is then.
Could you contact PayPal's merchant tech support about this problem ?
Once the PayPal buttons are displayed and until the payment popup closes, everything is handled on PayPal's side so HikaShop or the PayPal Checkout plugin doesn't have control over what happens. So we will need PayPal to tell what the problem is. The information on the screenshot I provided in my previous message should allow someone on their end to say what the problem is.

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

2 years 1 month ago #363778 by a2zcs
Hello, Finally got a response from PayPal and they seem to think there is an issue with the script. Here is their full response. Please let me know how to test / fix this:

It appears that you are not passing the `src` attribute correctly for the script tag. Specifically, there are two backslashes (`\\`) before ` www.paypal.com `, which is causing the issue that you're experiencing. We were able to recreate the issue on our end as well.

So, please replace the script tag in your code with the following:

<script src="//www.paypal.com/sdk/js?client-id=AbhUaP1qXLmGaIBTE_64PwqVNULhmVj1j-WtH_APmGyyh2elS-bCLh-bU24urADlSTpVZEJ8RdcTzZbr&amp;integration-date=2024-05-19&amp;currency=USD&amp;components=buttons%2Cfunding-eligibility%2Cmessages%2Chosted-fields&amp;disable-funding=paylater&amp;enable-funding=card&amp;intent=capture" data-partner-attribution-id="HIKARISOFTWARE_Cart_PPCP" data-client-token="eyJicmFpbnRyZWUiOnsiYXV0aG9yaXphdGlvbkZpbmdlcnByaW50IjoiOGJhNWNlOTMxMjg1NzgyZTkxYzQ5MTc1YWFmYTA1OGZhNGZkZTQ5MDNmZjBkMWYyNGJlOTY0ODdkYzM1ZmI5M3xtZXJjaGFudF9pZD1yd3dua3FnMnhnNTZobTJuJnB1YmxpY19rZXk9ajJmYzJqcHhkZzZ2cDg0ZiZjcmVhdGVkX2F0PTIwMjQtMTAtMDJUMTk6MDc6MjIuODM5WiZjdXN0b21lcl9pZD03MTc4IiwidmVyc2lvbiI6IjMtcGF5cGFsIn0sInBheXBhbCI6eyJpZFRva2VuIjpudWxsLCJhY2Nlc3NUb2tlbiI6IkEyMUFBUHdtd24zcFhxWUZ1VmFFQjROYU1kRW14Zlo1MEZJM1NIX0V4MEJRangzRDgzVWZidmdzeEYycmcwVFk5TmprSnV3bHREMFpmMHhTR1NkeDZzSVhyYjdGSG5Hb0EifX0=" data-uid-auto="uid_gudxsujfwyflkqxhtjwqjdicgckcfv"></script>

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

2 years 1 month ago #363779 by a2zcs
Hello, Finally got a response from PayPal and they seem to think there is an issue with the script. Here is their full response. Please let me know how to test / fix this:

It appears that you are not passing the `src` attribute correctly for the script tag. Specifically, there are two backslashes (`\\`) before ` www.paypal.com `, which is causing the issue that you're experiencing. We were able to recreate the issue on our end as well.

So, please replace the script tag in your code with the following:

<script src="//www.paypal.com/sdk/js?client-id=AbhUaP1qXLmGaIBTE_64PwqVNULhmVj1j-WtH_APmGyyh2elS-bCLh-bU24urADlSTpVZEJ8RdcTzZbr&amp;integration-date=2024-05-19&amp;currency=USD&amp;components=buttons%2Cfunding-eligibility%2Cmessages%2Chosted-fields&amp;disable-funding=paylater&amp;enable-funding=card&amp;intent=capture" data-partner-attribution-id="HIKARISOFTWARE_Cart_PPCP" data-client-token="eyJicmFpbnRyZWUiOnsiYXV0aG9yaXphdGlvbkZpbmdlcnByaW50IjoiOGJhNWNlOTMxMjg1NzgyZTkxYzQ5MTc1YWFmYTA1OGZhNGZkZTQ5MDNmZjBkMWYyNGJlOTY0ODdkYzM1ZmI5M3xtZXJjaGFudF9pZD1yd3dua3FnMnhnNTZobTJuJnB1YmxpY19rZXk9ajJmYzJqcHhkZzZ2cDg0ZiZjcmVhdGVkX2F0PTIwMjQtMTAtMDJUMTk6MDc6MjIuODM5WiZjdXN0b21lcl9pZD03MTc4IiwidmVyc2lvbiI6IjMtcGF5cGFsIn0sInBheXBhbCI6eyJpZFRva2VuIjpudWxsLCJhY2Nlc3NUb2tlbiI6IkEyMUFBUHdtd24zcFhxWUZ1VmFFQjROYU1kRW14Zlo1MEZJM1NIX0V4MEJRangzRDgzVWZidmdzeEYycmcwVFk5TmprSnV3bHREMFpmMHhTR1NkeDZzSVhyYjdGSG5Hb0EifX0=" data-uid-auto="uid_gudxsujfwyflkqxhtjwqjdicgckcfv"></script>

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

2 years 1 month ago #363780 by nicolas
Hi,

I invite you to open the file plugins/hikashoppayment/paypalcheckout/paypalcheckout_end.php
There, the first line of code (after the first few lines of the header) is:
Code:
<script src="https://www.paypal.com/sdk/js?<?php echo http_build_query($this->params); ?>" data-partner-attribution-id="<?php echo $this->bncode; ?>" <?php echo $this->extraParams; ?>></script>
So, as you can see, the plugin does provide the proper URL for the SDK file and its actually impossible for it not to.

This leaves only one potential issue: You have an extension on your website which processes the HTML on the page and wrongly modifies the src attribute of that script element even though it should not do anything with it.
It's probably caused by a cache or optimization or SEO extension or the likes.

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

2 years 1 month ago #363791 by a2zcs
I found it, I believe. Joomla Mobile. I disabled it and I'm able to get to PayPal.
Wow, I've had that installed on multiple sites for years. This is the first time its given me grief.

Thanks,

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

2 years 1 month ago #363795 by nicolas
Hi,

Great ! I would recommend reporting the issue to the developer of the extension.

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

Time to create page: 0.120 seconds
Powered by Kunena Forum