#_liamm3
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.
- _liamm3, 1 hour ago, 7 messages
hi there!
not sure how that works, give me a few minutes to look into this
this is the update method: https://stripe.com/docs/js/elements_object/update_express_checkout_element
and indeed it doesn't support passing a clientSecret or an amount.
I tried using fetchUpdates(), but it did not work. First I could not call it because there is no client_secret loaded yet in this step.
can you clarify what that means? what was the exact error message you saw in this case?
Sure, this is the error I get when calling I call 'elements.fetchUpdates()' in the eventhandler for 'shippingaddresschange':
The client_secret only gets loaded, after the 'confirm' event is fired. I think that's the way it was shown in the docs.
humm... that makes sense since calling fetchupdate will pull information from the PaymentIntent/SetupIntent. So if there's itsn't any, it fails.
Can you try calling elements.update({amount: xxx})?
I tried calling elements update with 'amount: payload.total.amount' before and after the resolve, but unfornutately it did not work. I also don't get any errors or warnings in my console for the update call, which is interessting.
I think it's really interesting, how the line items get correctly added or adjusted after changing the address, but the total gets not updated. π€ The paid amount is also correct. Only the displayed amount does not get updated. We used another plugin before (https://github.com/ethercreative/web-payments) which internally used the paymentElement API. Here the displayed amount gets updated after changing the address.
do you have a public URL where I could try reproducing the issue?
Sure! This is our current testing environment: https://mgm-cosmetics-test.craft-unit.com/advanced-cream/
You can try the button under the headline 'webpayments'. This is the button rendered by the webpayments plugin we used before. Changing the shipping address to an uk instead of an eu address automatically adjusts the displayed amount.
The buttons under the webpayments button are what I am working on right now. The expected behavior would be the same as the webpayments button. In your network tab you can see the response from our backend after changing the address
Thanks for the help!
Revitalisierende Gesichtscreme | Anti Age | Antioxidant | 24h intensive Feuchtigkeit | sorgt fΓΌr ein feines und frisches Hautbild
Sorry for the delay, Discord is busy. Will have a look soon
Yeah I see, no problem :D
and can you explain how exactly to reproduce the issue on your website?
- Click on the button 'Pay with link' under the headline 'Stripe express checkout'
- Enter an email
- Enter shipping information
-> if the address is in the eu and not uk: do nothing
-> if the address is in the uk: adjust price (gets done on server; substract 19% from price) - Click on 'Continue to payment'
Now the adjusted amount should be displayed. Doing the same thing with the button under the headline 'webpayments' works. After changing the address to uk, the price gets updated.
If it helps, I can record a short video showing the issue. π
Hello π
Stepping in, I apologise for the delay since discord ran busy today.
Our team needs to step away at the moment. So I'll have to ask you to write in and raise a support ticket instead:
https://support.stripe.com/?contact=true
Make sure to add the above steps in the message and we'll respond as soon as we can! Again, really sorry for not being able to resolve this live.
Okay, all right. I will write a ticket then. Thanks for the support anyways. π
If you're able to, please attach the video too along with the test addresses you've been testing with.
It will help to be on the same page
Okay, I will do that!