#dafrancofl
1 messages ยท Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- dan-expresscheckoutelement-tax, 1 day ago, 6 messages
๐ happy to help
I'm not sure I understand the question
but not for events resolve function payload
what do you mean by that
That based on the documentation, when we react to an event (onClick, shippingaddresschange,shippingaddressRate), there is not a 'amount' parameter available
Is it just missing in the doc or the amount is not updatable anymore?
I'm sorry but I don't follow, please elaborate more
Ok Sorry about that. Let's go step by step. We can attach a handler to certain events, right? those events are 'click', 'shippingaddresschange', 'shippingratechange', etc. A handler, is an object with certain properties, one of the properties of that object is 'resolve' function, which will be called when the event is triggered. That resolve function accepts parameters as well, those parameters will update Express Checkout Element (add line items, update shipping rates, etc). We noted that there is not an 'amount' parameter for resolve function, so we wonder how is the total amount of the payment being calculated after, for example, a shipping rate is chosen
Am I clear? ๐
Correct
in that case it's the line_items that you need to pass https://stripe.com/docs/elements/express-checkout-element/accept-a-payment#display-line-items
Ok, so amount being charged will be the sum of line items amounts, right?
you need to pass the amount when creating the PI
https://stripe.com/docs/elements/express-checkout-element/accept-a-payment#create-pi
sure let me know if you need any more help