Paypal checkout

  • Posts: 22
  • Thank you received: 0
  • Hikashop Essential
2 months 1 week ago #346928

-- HikaShop version -- : 4.7.0
-- Joomla version -- : 4.2.5
-- PHP version -- : 8.1.12
-- Browser(s) name and version -- : Firefox

Hi
I have installed and activated the plugin "Paypal checkout". At Paypal I created a corresponding account.

If I now click on "Finish", the login of Paypal appears where I can choose whether I want to pay with Paypal or with Checkcard. If I now choose one of both, the error message "The payment request was refused by PayPal. Please click here to return to the checkout.
[MISSING_REQUIRED_PARAMETER] A required field / parameter is missing.
[MISSING_REQUIRED_PARAMETER] A required field / parameter is missing."

What can be the reason? How should I proceed?

Thanks for the support.

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

  • Posts: 77783
  • Thank you received: 12273
  • MODERATOR
2 months 1 week ago #346931

Hi,

Did you enter the credentials in the payment method ?
Did you disable some address fields in the Display>Custom fields menu ?
Could you provide the URL of the shop so that we can check the situation on your checkout ?

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

  • Posts: 22
  • Thank you received: 0
  • Hikashop Essential
2 months 6 days ago #346934

Hi

Thank you for the inquiry.

"Did you enter the credentials in the payment method ?" Yes
"Did you disable some address fields in the Display>Custom fields menu ?" Yes, but no mandatory fields

Last edit: 1 week 1 day ago by langi.

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

  • Posts: 77783
  • Thank you received: 12273
  • MODERATOR
2 months 6 days ago #346935

Hi,

Thanks for the URL.
What do you mean by no mandatory fields ? The state and country fields are mandatory by default.
Please publish them back, fill them in your billing/shipping addresses, and it should then work fine.
If you don't want to allow other countries, then you can either unpublish the other countries in System>Zones, or select your country in the "zone" restriction setting of your shipping methods. But disabling the country will be a problem for PayPal as it is expecting it. And I suppose it's the same for the state field.

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

  • Posts: 22
  • Thank you received: 0
  • Hikashop Essential
2 months 5 days ago #346942

Hi
Thanks, that's it.
Now I have two more problems :-(
But I'm not sure if you can help me or if I need to contact Paypal.

1. Although I have set the language at Paypal German, the window still appears in English.
2. I would like to get directly - without selection - to the variant with credit card.

Thank you for being so helpful in helping me.

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

  • Posts: 77783
  • Thank you received: 12273
  • MODERATOR
2 months 5 days ago #346951

Hi,

1. The language is selected automatically by PayPal based on the preferred languages you configured in your browser:
www.computerhope.com/issues/ch001904.htm
So even if your website is in German and your PayPal Account is in German, it's possible it would display the payment page in English if it sees that the preferred language of your browser is set to English.

2. It should do that if you select "Credit card page" in the "Landing page" setting of the PayPal Checkout payment method in System>Payment methods.

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

  • Posts: 22
  • Thank you received: 0
  • Hikashop Essential
2 months 4 days ago #346966

Hi
I'm using Firefox. This is also set to German as the preferred language. Is it not possible to set this so, that Paypal always reports in German?
By the way: With Edge, Paypal reports in German.

The setting "Landing Page" has no influence on this behavior. The setting is already set "Credit card page".

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

  • Posts: 77783
  • Thank you received: 12273
  • MODERATOR
2 months 4 days ago #346970

Hi,

After the line:
$orderData->application_context = new stdClass();
you can try adding the line:
$orderData->application_context->locale = 'de-DE';
in the file plugins/hikashoppayment/paypalcheckout/paypalcheckout.php and it should force the language.

Regarding the Landing page, there is no other option available. You would have to check with PayPal merchant support what they propose but I don't see anything else in the documentation.

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

  • Posts: 22
  • Thank you received: 0
  • Hikashop Essential
2 months 4 days ago #346990

Hi

"$orderData->application_context->locale = 'de-DE';"
I tried this now - but unfortunately does not work. :-(

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

  • Posts: 77783
  • Thank you received: 12273
  • MODERATOR
2 months 4 days ago #346995

Hi,

I don't have any other idea.

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

  • Posts: 22
  • Thank you received: 0
  • Hikashop Essential
1 month 3 weeks ago #347275

Hi

Unfortunately, I could not yet solve the problem with the connection to Paypal.
If a direct call of the input for the credit card should not be possible, a compromise would be that only the button for the credit card would be displayed (so without Paypal). I tried it with "disable-funding=paypal". But it does not work.
The merchand technical support of Paypal suggested me to use with script shown below. But if I integrate this in Hikashop only the desired button is shown. Unfortunately the data from the webshop is not taken over.
How can I integrate this script, so that the data is taken over correctly?
Thanks for the support.
Regards
langis

<!DOCTYPE html>
    <html lang="en">
      <head>
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>PayPal Standard Payments Integration | Client Demo</title>
      </head>

      <body>
        <div id="paypal-button-container"></div>
        <!-- Sample PayPal credentials (client-id) are included -->
        <script src="https://www.paypal.com/sdk/js?client-id=test&currency=USD&intent=capture&enable-funding=venmo" data-sdk-integration-source="integrationbuilder"></script>

        <script>
          const fundingSources = [
           
              paypal.FUNDING.CARD
            ]

          for (const fundingSource of fundingSources) {
            const paypalButtonsComponent = paypal.Buttons({
              fundingSource: fundingSource,

              // optional styling for buttons
              // https://developer.paypal.com/docs/checkout/standard/customize/buttons-style-guide/
              style: {
                shape: 'rect',
                height: 40,
              },

              // set up the transaction
              createOrder: (data, actions) => {
                // pass in any options from the v2 orders create call:
                // https://developer.paypal.com/api/orders/v2/#orders-create-request-body
                const createOrderPayload = {
                  purchase_units: [
                    {
                      amount: {
                        value: '88.44',
                      },
                    },
                  ],
                }

                return actions.order.create(createOrderPayload)
              },

              // finalize the transaction
              onApprove: (data, actions) => {
                const captureOrderHandler = (details) => {
                  const payerName = details.payer.name.given_name
                  console.log('Transaction completed!')
                }

                return actions.order.capture().then(captureOrderHandler)
              },

              // handle unrecoverable errors
              onError: (err) => {
                console.error(
                  'An error prevented the buyer from checking out with PayPal',
                )
              },
            })

            if (paypalButtonsComponent.isEligible()) {
              paypalButtonsComponent
                .render('#paypal-button-container')
                .catch((err) => {
                  console.error('PayPal Buttons failed to render')
                })
            } else {
              console.log('The funding source is ineligible')
            }
          }
        </script>
      </body>
    </html>

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

  • Posts: 77783
  • Thank you received: 12273
  • MODERATOR
1 month 3 weeks ago #347279

Hi,

It would require rewriting the plugins/hikashoppayment/paypalcheckout/paypalcheckout_end.php file to support this "component" mode for the display of the buttons based on that example.
It's possible, but it's several hours of work and that's not something we want to implement by default in the plugin.

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

  • Posts: 22
  • Thank you received: 0
  • Hikashop Essential
1 month 3 weeks ago #347301

Hi

Sorry, there is an other problem.

With the standard solution of Paypal Checkout a window appears after the connection with Paypal with the option "Paypal" or "Credit card". If you now choose "Paypal", an EMPTY popup window appears. Only when you close this window you get to the correct login window.

What could be the reason and how can I correct this?
Thanks for any support.

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

  • Posts: 77783
  • Thank you received: 12273
  • MODERATOR
1 month 3 weeks ago #347304

Hi,

I don't know why you get this.
The plugin is only adding the javascript of PayPal Checkout to the page, and it's PayPal which displays the buttons and then the popups etc. HikaShop or the plugin are not involved in all of this.
Maybe it could be linked to some kind of extension on your browser ? Maybe try with a different browser to see if you still have the issue ? Also, check the console of your browser to see if you get any error when this happens. That would give a big clue onto what is going on.
The best would be to report the issue to PayPal's support and see what they say about it.
Looking online about the issue, I found this page:
www.paypal-community.com/t5/PayPal-Payme...t-popup/td-p/2880887
A similar issue is reported with a javascript error which indicates that the popup was blocked, which means it's probably blocked by the browser or an extension of the browser and would confirm my theory.

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

  • Posts: 22
  • Thank you received: 0
  • Hikashop Essential
1 month 3 weeks ago #347316

Hi
I have tested it with Firefox, Edge, Chrome and Safari (on iPad). It is the same everywhere. On the iPad it is totally unusable because you can't click away the white window.

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

  • Posts: 77783
  • Thank you received: 12273
  • MODERATOR
1 month 3 weeks ago #347317

Hi,

So did you check the console of your browser while trying ?
wickedlysmart.com/hfjsconsole/

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

  • Posts: 22
  • Thank you received: 0
  • Hikashop Essential
1 month 3 weeks ago #347334

Hi

- The image "window.jpg" shows a screenshot of the problem.
- The output of the browser's console is in the attachment ("console-export.txt).
- It does look like something might be blocked. But this is the case with all browsers. Extensions are not installed.

Best regards

File Attachment:

File Name: console-export.txt
File Size:7 KB

Attachments:

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

  • Posts: 77783
  • Thank you received: 12273
  • MODERATOR
1 month 3 weeks ago #347335

Hi,

The console export confirms that you have the issue with the error popup_open_error_iframe_fallback
I looked a bit online about it and found this:
stackoverflow.com/questions/71104248/pay...w-in-django-template
It explains that the issue is likely with the cross origin opener policy which should be set to same-origin-allow-popups
And there is a plugin in Joomla which controls that:
docs.joomla.org/J4.x:Http_Header_Management
So you want to follow the instructions in that page and change the setting of the plugin to allow popups and it should help.

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

  • Posts: 22
  • Thank you received: 0
  • Hikashop Essential
1 month 3 weeks ago #347346

Hi

Thank you very much. That's it. Now it works

Best regards

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

Time to create page: 0.094 seconds
Powered by Kunena Forum