Hi,
Thanks for all the valuable details.
1.a Yes, the PayPal Checkout plugin always use an in-context / popup flow that depends on JavaScript fetch requests.
This is how it is supposed to be done as per PayPal Checkout's API.
1.b
Some iOS WebKit builds aggressively block fetch requests immediately after closing an in-context window.
I didn't know this. That sounds strange. I would recommend activating the "debug" of the payment method. Then, check the "payment log file" of the HikaShop configuration. The payment plugin will log debug data in there on the server side while processing the fetch request. So, you can confirm whether the request reaches your website or not. It's possible that for some reason, there is some kind of error on the server side which leads to the response not being provided. You can also check the access log of your web server to confirm whether it sees the request or not.
If nothing is logged by HikaShop or the web server for the request, then it's likely that either the browser or the OS blocks the request before it can even get out of the phone.
If you get debug data for the request, then maybe there is something that can be done to fix the problem. For example, if the problem is that the request takes too long to process and the connection breaks before, something could be done to reduce the response time. However, since you said that the order is not even being confirmed, I doubt that something can be done on that end.
2. PayPal Checkout's API doesn't do that. However, their old API does. HikaShop has the PayPal payment plugin pre installed for it. This has been the workhorse of HikaShop for years in the past and it still works fine. It will redirect to PayPal at the end of the checkout, avoiding this fetch issue. So that could be an option. The plugin is marked as "legacy" as PayPal wants to sunset it in the future, but so far, no date has been decided for that.
3. Yes, that's normal. The system takes first into account the "error" parameter and the errorTitle and errorMessage are only changed and taken into account when the error parameter is set to true.
4. Removing the popup is not possible.
Following your messages, I've looked into it and found this page:
github.com/facebook/react-native/issues/35384
It says that the issue happens with POST requests and not with GET requests.
If you check the plugins/hikashoppayment/paypalcheckout/paypalcheckout_end.php file you can see :
{method: "POST"}
in several places. So the JS does a POST to fetch the request. However, the request could actually be made with a GET as it doesn't to transmit any data in the POST. We just used a POST because that was what was written in the example code provided by PayPal and it should normally work the same either way.
But maybe changing this to:
{method: "GET"}
could help circumvent the issue with iOS.
I would recommend trying this.