Paypal "Display buttons on shopping cart" doesn't work for shippable items

2 tuần cách đây
Title
Paypal "Display buttons on shopping cart" doesn't work for shippable items

Environment
Application: nopCommerce
Plugin: Paypal Commerce 4.80.17
Browser: Chrome 144.0.7559.133 (Windows 11)
Build/Version: 4.80.6

Preconditions
1. Only one shipping provider is configured(Shipping.FixedByWeightByTotal)
2. Only one shipping option is configured
3. Paypal Commerce has been configured with the option "Display buttons on shopping cart" enabled
4. One product that requires shipping has been setup in the store

High level description of issues:
- Guest users with no shipping address receive an error when clicking Paypal on the the cart page
- Logged in users in a fresh session who have not proceeded to the checkout pages and selected an address also receive an error.

Steps to Reproduce
1. Access the site as a guest user(or as a logged in user with no previous cart)
2. Add a product to the cart that requires shipping
3. Proceed to to the cart page
4. Click the paypal button

Expected Result (This one is difficult on what the intention should be)
1. Ideally, user should be able to proceed to Paypal to continue with their purchase
2. Alternatively, user should be asked to select an address before proceeding to paypal
3. Least preferable, paypal buttons should not display if the state of the user doesn't allow them to checkout

Actual Result
1) An error is displayed to the user on the frontend: "Expected an order id to be passed"
2) Error logged in the backend:  Payments.PayPalCommerce error: No available shipping options


Nop.Core.NopException: No available shipping options
   at Nop.Plugin.Payments.PayPalCommerce.Services.PayPalCommerceServiceManager.PrepareShippingDetailsAsync(CartDetails details, String selectedOptionId, Boolean isApplePay)
   at Nop.Plugin.Payments.PayPalCommerce.Services.PayPalCommerceServiceManager.<>c__DisplayClass68_0.<<CreateOrderAsync>b__0>d.MoveNext()


Impact
1. The option to Display buttons on shopping cart is misleading if it only works for non shippable products
2. There isn't an option to force a user to select an address before clicking the Paypal button
3. Affects user browsing / purchasing experience

Severity
Medium

Priority
Medium

Notes / Attachments:
If you estimate shipping before clicking the paypal button this allows you to proceed through

A topic on the board that is related:
https://www.nopcommerce.com/en/boards/topic/102875/force-shipping-estimate-before-checkout

2 tuần cách đây
Thanks for details, we'll check this.