For sandbox. When using express checkout in an incognito browser. Guest checkout is being forced.
Incognito - Clear all data for the sandbox domain - Sandbox - PayPal Express

Expect to have the option to login / checkout as guest
Hi, @aidan-ayala . Can you copy/paste the script configuration you are using?
Hi - we are getting the same issue (Paypal sandbox redirecting to guest checkout).
We are redirecting from a Magento2 setup and don't have the same issue if we change the API keys to our production ones so it looks to be something within the sandbox.
Is there a fix or config change?
Can provide further details if needed.
@MSkelton-LDG If you could provide the code snippet you are using to integrate, that would be great! Thank you. We have this on our backlog and will be looking into a resolution.
@mnicpt here's a snippet we're using on the frontend to trigger express standard
<script src="https://www.paypalobjects.com/api/checkout.js"></script>
<div id="paypal-button" data-payment="paypal"></div>
<script>
window.paypalPageLocation = '/paypal/checkout';
paypal.Button.render({
payment: function (resolve, reject) {
return paypal.request.post(window.paypalPageLocation)
.then(function (data) {
resolve(data.paymentID);
})
.catch(function (err) {
reject(err);
});
},
onAuthorize: function (data) {
return paypal.request.post('/paypal/onauth', data)
.then(function () {
window.location.href = '/paypal/checkout';
})
.catch(function () {
window.location.href = '/cart';
});
}
}, '#paypal-button');
</script>
Hi @mnicpt - not too sure which parts you require but the button is:
<input type="image" data-action="checkout-form-submit" data-checkout-url="https://{site}/paypal/express/start/button/1/" src="https://{site}/static/version1594819883/frontend/{code}/{name}/en_GB/{code_name}/images/en_GB/paypal.gif" alt="Checkout with PayPal" title="Checkout with PayPal">
Then paypal-checkout.js:
/**
* Copyright 漏 Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
define(["jquery", "Magento_Ui/js/modal/confirm", "Magento_Customer/js/customer-data", "jquery-ui-modules/widget", "mage/mage"], function(t, e, o) {
"use strict";
return t.widget("mage.paypalCheckout", {
options: {
originalForm: 'form:not(#product_addtocart_form_from_popup):has(input[name="product"][value=%1])',
productId: 'input[type="hidden"][name="product"]',
ppCheckoutSelector: "[data-role=pp-checkout-url]",
ppCheckoutInput: '<input type="hidden" data-role="pp-checkout-url" name="return_url" value=""/>'
},
_create: function() {
this.element.on("click", '[data-action="checkout-form-submit"]', t.proxy(function(r) {
var i = t(r.target)
, a = i.data("checkout-url")
, n = i.closest("form").find(this.options.productId).val()
, c = this.options.originalForm.replace("%1", n)
, u = this
, p = o.get("paypal-billing-agreement");
r.preventDefault(),
p().askToCreate ? e({
content: p().confirmMessage,
actions: {
confirm: function() {
a = p().confirmUrl,
u._redirect(a, c)
},
cancel: function(e) {
e && !t(e.target).hasClass("action-close") && u._redirect(a)
}
}
}) : this._redirect(a, c)
}, this))
},
_redirect: function(e, o) {
var r, i;
this.options.isCatalogProduct ? (r = t(o ? o : t(this.options.shortcutContainerClass).closest("form")),
i = r.find(this.options.ppCheckoutSelector)[0],
i || (i = t(this.options.ppCheckoutInput),
i.appendTo(r)),
t(i).val(e),
r.submit()) : t.mage.redirect(e)
}
}),
t.mage.paypalCheckout
});
If you need anything else happy to help.
Thanks, @MSkelton-LDG
@MSkelton-LDG @aidan-ayala We are working on this issue and will respond back here when the issue has been resolved. Thank you for bringing this to our attention.
@aidan-ayala It looks like there was a ramp on sandbox which was causing issues around guest checkout experience and the experiment was ramped down to 0% on jul 21st 2020. May i request for re-verification??
thanks!
@upigilam Looks like the issue is no longer happening. Thank you all.
@aidan-ayala thanks for confirming ... could you please close the issue?
Most helpful comment
@MSkelton-LDG @aidan-ayala We are working on this issue and will respond back here when the issue has been resolved. Thank you for bringing this to our attention.