#_liamm3

1 messages Β· Page 1 of 1 (latest)

tranquil copperBOT
#

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.

regal hound
#

hi there!

#

not sure how that works, give me a few minutes to look into this

#

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?

spring gull
#

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.

regal hound
#

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})?

tranquil copperBOT
spring gull
#

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.

regal hound
#

do you have a public URL where I could try reproducing the issue?

spring gull
#

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!

MGM Cosmetics

Revitalisierende Gesichtscreme | Anti Age | Antioxidant | 24h intensive Feuchtigkeit | sorgt fΓΌr ein feines und frisches Hautbild

regal hound
#

Sorry for the delay, Discord is busy. Will have a look soon

spring gull
#

Yeah I see, no problem :D

regal hound
#

and can you explain how exactly to reproduce the issue on your website?

spring gull
#
  1. Click on the button 'Pay with link' under the headline 'Stripe express checkout'
  2. Enter an email
  3. 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)
  4. 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. πŸ™‚

unreal quiver
#

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.

spring gull
#

Okay, all right. I will write a ticket then. Thanks for the support anyways. πŸ™‚

unreal quiver
#

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

spring gull
#

Okay, I will do that!