Magento2: MCE2.1.8 - Paypal Express doesn't show up as payment method

Created on 11 Aug 2017  路  75Comments  路  Source: magento/magento2

Hey there,

after updating MCE by composer to 2.1.8 paypal express is missing in the checkouts payment methods... Can somebody else verify this?

https://dev.makerdise.com
https://www.makerdise.com

Preconditions

Magento 2.1.7
Setup (live, https://www.makerdise.com):
Haproxy -> Varnish -> Nginx -> php-fpm

  • Ubuntu 16.04.03
  • HAPROXY 1.6.3 on :80/:443, ssl (termination) only
  • Varnish varnish-4.1.1 revision 66bb824
  • nginx 1.10.3

    - php-fpm 7.0.22-0ubuntu0.16.04.1

  • Cache storage: Redis

  • Session storage: Redis

    Redis server v=3.2.9 build=dc212566f2f3b9f7

MariaDB

10.0.31-MariaDB-0ubuntu0.16.04.2

Production mode
Compiled
Minified, merged + bundled js

Steps to reproduce

upgrade by composer to MCE 2.1.8

Expected result

PayPal express is available as payment method on checkout

Actual result

PayPal express is missing in the checkouts payment methods...

Greetings
Jan

Fixed in 2.1.x Cannot Reproduce Clear Description Format is valid needs update bug report

Most helpful comment

As is already mentioned the problem seems that the component
Magento_Paypal\js\view\payment\paypal-payments.js
in layout https://github.com/magento/magento2/blob/99e85cbc45223baa3551e4c534b650c0d2c6358b/app/code/Magento/Paypal/view/frontend/layout/checkout_index_index.xml#L30

is not included in the checkout for a reason. If one of the payment methods that are included in the layout is active, then the js file is included. That's why as @ebaschiera mentioned if you enabled the method 'paypal_billing_agreement' which is in the layout defined as a method, then paypal express is also shown if its activated. So a solution will be to add the following code in the above layout file to include express paypal like

  <item name="paypal_express" xsi:type="array">
      <item name="isBillingAddressRequired" xsi:type="boolean">true</item>
  </item>

Seems to work fine and not make conflicts. But please also double check it.

All 75 comments

This does not seem to be related to the issue you referenced. Here you don't even interact with PayPal.

PayPal Express payment method obviously cannot be missing in _ANY_ stable release as it is enforced with automated functional tests.

Can you reproduce this issue in clean Magento CE 2.1.8 installation?

@orlangur - no, it isn't directly related to the issue. PPE is not missing in general - paypal express just doesn't show up as a payment method within the checkout or onestepcheckout (as you can see under the urls in my first post). The buttons within the minicart and in checkout/cart does work as before.

I did some quick tests in the splendid demo store and it seems to work with a clean CE 2.1.8. I got a bunch of modules running, I started to deactivate all paypal related stuff in the dev. No luck so far, have to dig deeper into this. So any hints or starting points to debug are welcome. found nothing in the logs...

I see... Guessing bad module is not really effective, from my experience it is usually better to debug the code in action. Setup xdebug and try to set breakpoints in some isApplicable to see which logic actually works to decide to not show payment method.

we also ran into this. @gewaechshaus I had a look at your websites and Paypal was on
Did you fix it? Can you please share what you have done?

@orlangur I seconded this. Our 2.1.6 works just fine (on test env). After upgrading to 2.1.8, default checkout -> paypal went missing

@duythvn - we did nothing as we had a busy time working for some clients. You need some time to debug this so far. The paypal button does get included in minicart or product view like it should in our case. Only the checkouts payment methods are affected, you'll have to look there. We did setup braintree as a backup strategy as paypal seems to work within the checkout, but that isn't active(only cc).

I think there's something false within $quote since the last update... Maybe paypals isAvailable method will return false on the checkout route. We will see, some day ;)

I confirm this issue. In checkout PayPal Express doesn't show up.

@ebaschiera @duythvn - maybe one of you can proof is method isAvailable is returning false here

https://github.com/magento/magento2/blob/99e85cbc45223baa3551e4c534b650c0d2c6358b/app/code/Magento/Paypal/Model/ExpressConfigProvider.php#L138

There's also a unit test available in app/code/Magento/Paypal/Test/Unit/Model/ExpressConfigProviderTest.php

@ebaschiera - please post a list of installed 3rd party modules...

I tested it on a vanilla Magento 2.1.8 CE vs a Magento 2.1.7 CE. No 3rd party modules installed.

@ebaschiera does not work for both versions? Do you see anything in PayPal responses logs? Not sure why it was not reported for CE 2.1.7 then...

In Magento 2.1.7 PayPal Express appears at checkout. In 2.1.8 it doesn't. I just tested on both versions to understand which version is affected. It's 2.1.8.

@orlangur @ebaschiera
Ok, that sounds setup/environment related... In the splendid demo shop it did work on my last test:
https://www.splendid-internet.de/magento-2-demo

Same scenario as in our case... I did a small test and replace the .6 paypal module with the .5 version from 2.1.7 - that doesn't brought any effect, so it's also not related to the changes in the module itself as it seems.

I am trying to look at differencies between releases, but it's not easy: https://github.com/magento/magento2/compare/2.1.7...2.1.8

You only have to commit/push the 2 versions... The .7 first

@gewaechshaus please reformat the first message of this issue with the correct information structure, so it will be easier for @magento-team to process it. (see the template that appears when you try to create a new issue). Thanks.

@ebaschiera @duythvn - can you take a look in your browsers developer tools -> network section if you got an error 400 on the /customer/section/load/?sections=cart-data&update_section_id=false&_= route please...

@gewaechshaus I have not that error. I would suggest to do your tests on a clean magento installation.

@ebaschiera -I traced this one down to braintree, so nothing related, sorry.

hello, i have the same problem. i have no error but paypal checkout express in the /checkout/ page is not show up. but this payment solution is show in the checkout page...

I can confirm the same issue on Magento 2.1.8 CE.

I updated from 2.1.7 to 2.1.8 and PayPal not showing as payment method. Tested and all the other payment methods work fine. For now rolled back to 2.1.7

Hi guys
FYI: I've actually switched Single Store mode around, save & activated Paypal and it showed up
I haven't try switching single store again and risk losing Paypal!

@duythvn - this sounds like an issue with the $store object...

hello, no news about this problem ?

Hi,
I confirm the same issue on Magento 2.1.8 CE, PayPal not showing as payment method.

We need more information about your configuration to reproduce this issue. Please identify the web server you are running and any other information needed to reproduce your issue.

@Sergeacc - we are going to update the initial post.

@magento-team - please add the related labels...

I'm having the same problem since upgrading to Magento 2.1.8.

My environment:
Ubuntu 16.04
Nginx 1.13
Php 7.0.22
Magento 2.1.8

Hello All,

I confirm that the same issue is generated at our end, as below:

  • After upgrading Magento 2.1.7 to 2.1.8, the issue is generated.
  • Obviously, that was not a clean Magento 2 setup.
  • I tried, disabling all the third party extensions, themes & customization. But, nothing worked.

Then, I tried with upgrading the fresh blank Magento 2.1.7 to 2.1.8, and there was no issue.

So, I debugged 2.1.8 copy having the issue, and below are my findings:

  • "pub\static\frontend\Magento\blank\en_US\Magento_Paypal\js\view\payment\paypal-payments.js" file is not getting included in the checkout page, that is suppose too, and that is what we think causing the issue as below:

  • The issue is, different PayPal Payment method's renderers are not getting loaded based on which Magento 2 Suppose to render the available payment methods.

  • And "pub/static/frontend/Swissup/argento-essence/en_US/Magento_Checkout/js/view/payment/list.js" file at line 131 there is each loop, looping through "rendererList()" and renders the available payment methods.

  • At that particular point we didn't get any PayPal Method's renderers from "rendererList()", and that is why it seems like it is not loading any PayPal Payment methods.

But, after this, I am stuck.

Any luck to this?

Regards,

Hi @gewaechshaus ,

That is the line of Layout File from where it is adding that Js item. It supposed to be loaded in the checkout page, but it is not loading the same.

That seems the issue as per best of my knowledge.

Regards,

Do You try setup billing agrements to enable?

PHP 7.0.22-0ubuntu0.16.04.1
mysql Ver 15.1 Distrib 10.1.25-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
nginx version: nginx/1.13.4

2.1.7 -> 2.1.8 checkout gone

My workarounds:
Its caused only with UPGRADE
on clean 2.1.8 its working OK.

To show it in card use this config

Display on Shopping Cart - YES
Payment Action - Authorization
Enable PayPal Guest Checkout - YES

PayPal Billing Agreement Settings
Enabled - YES

Enabling billing agreements fixes the issue.

(anyway we don't want to keep billing agreements enabled for several reasons)

As is already mentioned the problem seems that the component
Magento_Paypal\js\view\payment\paypal-payments.js
in layout https://github.com/magento/magento2/blob/99e85cbc45223baa3551e4c534b650c0d2c6358b/app/code/Magento/Paypal/view/frontend/layout/checkout_index_index.xml#L30

is not included in the checkout for a reason. If one of the payment methods that are included in the layout is active, then the js file is included. That's why as @ebaschiera mentioned if you enabled the method 'paypal_billing_agreement' which is in the layout defined as a method, then paypal express is also shown if its activated. So a solution will be to add the following code in the above layout file to include express paypal like

  <item name="paypal_express" xsi:type="array">
      <item name="isBillingAddressRequired" xsi:type="boolean">true</item>
  </item>

Seems to work fine and not make conflicts. But please also double check it.

Hi,

I have a similar issue with my magento 2.1.8 as well.
Its not showing any credit card fields for PayPal self hosted solution.

http://prntscr.com/gkzwbe

There is no error in console,
What could be the issue?

Thanks

Please solve the issue ASAP, or we can not get payment, lose large sales.

@gewaechshaus, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.

It is the BIG bug from the MCE 2.1.8, you should solve it ASAP.

Some improper comments have been removed from the discussion

Reopening this issues. We will double check it on 2.1.9 and 2.2.0

Please let us know if you still have this issue on 2.1.9 or 2.2.0

@gewaechshaus what Magento Edition are you running? Magento Cloud Edition (MCE) or Magento Community Edition? (Magento Open Source)

Hi @gewaechshaus
Here is a video prepared by our QA department to demonstrate that Paypal Express payment method is available on 2.1.9 after upgrade: https://youtu.be/0aQoAflbFzE
I'm closing this issue.
Please let me know if you any questions.

PayPal Billing Agreement Settings
Enabled - YES

We enabled it, https://prnt.sc/grhir6 and it worked again. We are using the MCE 2.1.9

Hi @okorshenko - thanks for taking this issue serious. Actualy we are using braintree PP/ MCE2.2.0 so I have to do some basic verifications to give you an updated answer.

As stated before, we already did an update to 2.2.0 and found out (in short) that there were some structural changes which didn't get updated, and problems with partial replacement/update of folders/files. We got a 2.1.9 version running in a devbox, feel free to contact me for credentials to analyze. I think it's affecting systems which where installed before 2.1. It looks like the it is related to the PP Billig agreement setup, I can verify it later in our dev.

The issue here is with updated PaymentVaultConfigurationProcess (can't say exactly in which version it was changed) plugin in Vault module.
It checks if there are any enabled methods in paypal-payments layout item and if they all are disabled - just drops whole group from jsLayout variable.

https://github.com/magento/magento2/blob/2.1.9/app/code/Magento/Vault/Plugin/PaymentVaultConfigurationProcess.php

I tried updating the layout and have billing agreements set to YES but paypal is not showing as an option. I upgraded to 2.1.9 but still same issue.

What can I do?

I confirm here in CE 2.1.9 :
billing agreements NO => PayPal option NO
billing agreements YES => PayPal option YES
I found this post after 2 months without PayPal on my website !!
Thanks
PS : I come from a CE 1.7.0.2 with migrations tools so my PayPal account was already set.

Same issue on Magento CE 2.2.0 after upgrade from 2.1.7 (and a lot of previous upgrades + migration from 1.9).
Paypal Express Checkout disappears if billing agreements is set to NO.
This seems more a temporary workaround than an expected behaviour
@okorshenko please consider reopen this issue and remove Fixed in 2.1.x label.
Thanks

Agree with @Dart18 we have this issue on upgrade to CE 2.2.0 from 2.1.9. Same scenario, billing agreement NO caused PayPal to disappear. Setting billing agreement to YES causes it to reappear.

Setting the following seems to do the trick, on 2.1.9. A few lines up you can disable the creation of a billing agreement which seems to cancel the enabled setting below. Effectively I don't see any changes only now PayPayl is enabled again.

PayPal Billing Agreement Settings
Enabled - YES

I think, that is not solution to enable PayPal Billing Agreement Settings, Are we have any other solution or patch to fix this issue

@magentocj - none, sadly... Somebody has to dive into the mud.

Hey Guys
Any solution for this issue

@magentocj my proposal is a workaround to get PayPal working again. Of course it is not the solution.

@okorshenko this issue needs to be re-opened, since people are still reporting it as a problem and I see it personally in 2.2.x. It seems to be related to when you set billing agreements to NO, did you try that on Sep 30 when you marked this as fixed?

I have the same problem in 2.1.9
I solved it enabling PayPal Billing Agreement Settings
but it is a temporary solution.

Same problem seen on a fully fresh install of Magento Community Edition 2.2.1.
If PayPal Billing Agreement is set to NO, PayPal does not show up on checkout page as payment type.

It would be good IF Magento guys provide the patch to fix this issue :)

We are experiencing this issue on Magento 2.1.10. Does Magento have an update about this?

A quick reminder: the solution at https://github.com/magento/magento2/issues/10499#issuecomment-326976322 works for me on all the magento installations I tried it.
I am using it as a patch with https://github.com/cweagans/composer-patches

I am experiencing this issue on Latest Magento 2.2.1 also.

this is an issue in 2.2.1 also.

2.2.2 is the same... why is this closed?

Magento 2.2.2
Clean installation
Confirming that
Billing agreement =yes
PayPal = available on checkout page
Billing agreement = no
PayPal = not available as payment method on checkout

In addition, payment with PayPal when billing agreement is = yes
Is not working if there is no activation with PayPal

@okorshenko or someone from @magento-admin / @magento-devops / @magento-engcom-team , can you please reopen this serious issue?

Got this issue today on 2.2.2 when I turned On "Single Store Mode". Turned on Paypal billing agreement and it worked again. Current working settings
Paypal Standard

Still happening in 2.2.3

This is now ridiculous...

2.2.3 also confirmed from my side. None of the hotfixes above are working for me. Anything else for 2.2.3?

same on M 2.2.2 with different StoreViews.
With enabled PayPal Billing Agreements, PayPal Express Checkout shows in checkout. But i'm getting 400 Bad Request, if i try to checkout:
domain.de/en/rest/en/V1/guest-carts/d43f2f8e85749d1d76868f0ec00795a6/set-payment-information
message {The payment disallows storing objects}

Seems to work on M 2.2.4

Also works for me in 2.2.4. Thanks for the update @Cristiano81 !

Was this page helpful?
0 / 5 - 0 ratings