Skip to content

PayflowPro Checkout Broken with SameSite Cookie Changes from Chrome #26840

@sjb9774

Description

@sjb9774

Summary

Chrome will soon be introducing a new default functionality for cookies that don't explicitly set their "SameSite" property (this article states that stable Chrome 80 should have this functionality but it appears that the cookie changes won't actually be enforced by default until the 17th of this month per https://www.chromium.org/updates/same-site). The Payflow payment method utilizes a callback endpoint (paypal/transparent/response) on Magento invoked from Payflow to complete an order, however that endpoint needs access to the customer's session in order to execute properly. Since the endpoint is invoked from Payflow and not from Magento the new SameSite functionality dictates the that some cookies(session id inclusive) should no longer be passed back to Magento, thus the customer's session cannot be identified/retrieved, and so the request fails, hanging checkout.

Related issue: #26377

Preconditions (*)

  1. Fresh Magento 2.3.4 Community Edition installation
  2. Payflow Pro (vendor, user, password, partner) configured and enabled
  3. Chrome 80.0.3987.100 or greater
  4. Navigate to chrome://flags and set "SameSite by default Cookies" and "Cookies with SameSite must be secure" flags to "Enabled"
    image
  5. Relaunch Chrome

Steps to reproduce (*)

  1. Navigate to your storefront
  2. Add any item with price greater than $0 to your cart and proceed to checkout
  3. Wait at least two minutes from initially opening your session to complete checkout to avoid the exception Chrome has cookies less than 2 minutes old, per https://www.chromestatus.com/feature/5088147346030592.
  4. Proceed through checkout using Payflow credit card
  5. Click "Place Order"

Expected result (*)

  1. Successful checkout

Actual result (*)

  1. Failed checkout
    image

Review \Magento\Paypal\Controller\Transparent\RequestSecureToken and \Magento\Paypal\Controller\Transparent\Response to see what information from the session is required during checkout.

Metadata

Metadata

Assignees

Labels

Component: PaypalFixed in 2.3.xThe issue has been fixed in 2.3 release lineFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReported on 2.3.4Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions