You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.
I can't think of any great reason why the token shouldn't be saved in the user's checkout session data instead of just on the user's page. Currently if the user goes back to any of the previous checkout steps their payment data is lost and they have to re-enter it again. I propose that the token, CC type, CC expiration, CC last 4 and length of CVV be saved in the checkout session so when the payment step is loaded if a token is already present a new one will not be required. To support this for the iframe method when loading the payment step with session data present rather than try to populate the fields with masked data the form could just be hidden and a link could be displayed that when clicked would display the form and if it is not clicked then the existing token is used.
Edit: For a little bit of extra caution the token could be cleared if the shipping address is updated. This way if the session is hijacked the token cannot be used to place an order to a different address. Also, if the token is in the session just expose a flag like "session_has_token" to the UI rather then rendering the token into a hidden field.
The text was updated successfully, but these errors were encountered:
From a high level, I don't see any issues with this sort of workflow, but we would want to ensure there aren't any problems during checking with the token stored in the checkout session. Also, we would probably want to expose this functionality behind a feature flag to ensure the current checkout experience is the default (at least at first).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I can't think of any great reason why the token shouldn't be saved in the user's checkout session data instead of just on the user's page. Currently if the user goes back to any of the previous checkout steps their payment data is lost and they have to re-enter it again. I propose that the token, CC type, CC expiration, CC last 4 and length of CVV be saved in the checkout session so when the payment step is loaded if a token is already present a new one will not be required. To support this for the iframe method when loading the payment step with session data present rather than try to populate the fields with masked data the form could just be hidden and a link could be displayed that when clicked would display the form and if it is not clicked then the existing token is used.
Edit: For a little bit of extra caution the token could be cleared if the shipping address is updated. This way if the session is hijacked the token cannot be used to place an order to a different address. Also, if the token is in the session just expose a flag like "session_has_token" to the UI rather then rendering the token into a hidden field.
The text was updated successfully, but these errors were encountered: