应用Paypal Web配置文件禁用“以访客身份退房”

I am trying to create a paypal payment page, but for some reason when I try to add a custom web profile to the payment the option of checking out as a guest suddenly disappears.

First I am creating the web profile this way:

        $flowConfig = new FlowConfig();
        $flowConfig
            ->setLandingPageType("billing")
            ->setBankTxnPendingUrl("...");
        $presentation = new Presentation();
        $presentation
            ->setLogoImage("...")
            ->setBrandName("...")
            ->setLocaleCode("...");

        $inputFields = new InputFields();
        $inputFields
            ->setNoShipping(1)
            ->setAddressOverride(0);

        $webProfile = new WebProfile();
        $webProfile->setName("PROFILE" . uniqid())
            ->setFlowConfig($flowConfig)
            ->setPresentation($presentation)
            ->setInputFields($inputFields);
        $request = clone $webProfile;

        try {
            $createProfileResponse = $webProfile->create($apiContext);
        } catch (PayPal\Exception\PayPalConnectionException $ex) {
            ...
        }
        $profileId = $createProfileResponse->getId();

Then, I have updated the payment code in this way

        $paypalPayment = new PayPalPayment();
        $paypalPayment->setIntent("sale");
        $paypalPayment->setPayer($payer);
        $paypalPayment->setRedirectUrls($redirectUrls);
        $paypalPayment->setTransactions(array($transaction));
        $paypalPayment->setExperienceProfileId($profileId);

The weird thing is that if I comment the last line I can perform payments as a guest without any issue. If, instead, I leave it this way, I get the customized page but the "Check out as a guest" button is replaced by "Create an account".

Do I really have to choose between having a customized checkout page and the possibility to perform payments without creating paypal accounts? Or am I missing something? I didn't find anything related to this issue in the documentation nor here in stackoverflow, and it seems at least strange!

Thank you

Are you using Express Checkout? It looks like recurring payments without a PayPal account are only compatible with Website Payments Pro accounts.

You can still create recurring payments with EC but they will need a PayPal account to accept them, no guest checkout allowed by the looks of it.

https://www.paypal-community.com/t5/Merchant-services-Archive/How-to-accept-recurring-payments-from-buyers-who-don-t-have-a/td-p/178232