Member Context Lost in GetProductSnapshot
After Stripe Payment Completion
#677
Unanswered
Zarhead-CB
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I think this is likely because this will get called in the webhook handler which finalizes the order. I think what you could do is use the seasion during checkout, but if the session isn’t available check the CustomerReference of the order and fallback to that user. During checkout, just before redirecting to a payment gateway the order should get auto assigned if there is a logged in member. This would make the customer reference the Key of the Umbraco Member. So you should be able to use that to look up the member. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context
ActiveMemberAccount.Account.CrmObjectId
).Issue:
After Stripe payment completion,
GetProductSnapshot
re-runs, butGetCurrentCustomer()
(which retrieves the current member) returnsnull
, causing exceptions.Code Snippets
Product Adapter:
Member Service:
Problem Details
Member Context Lost Post-Payment:
GetProductSnapshot
is called again during order finalization.GetCurrentCustomer()
(which relies onIMemberManager.GetCurrentMemberAsync()
) returnsnull
.Critical Dependency on Member Context:
PrimaryMemberAccount.Account.CrmObjectId
, which is tied to the logged-in member’s selected account.Questions
Accessing Member Context Post-Payment:
GetProductSnapshot
after payment?Overriding Upstream Logic:
GetProductSnapshot
(e.g., during payment finalization) to pass the required member/account context?Custom Implementation:
Beta Was this translation helpful? Give feedback.
All reactions