#dchao_code

1 messages ยท Page 1 of 1 (latest)

carmine wagonBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1374067101140123669

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

unborn badger
#

Hi ๐Ÿ‘‹

The options you have to update the Payment Request Button are shown here.

Are you saying that, when you update the trialBilling object, you don't see those changes reflected in the Apple Pay modal window?

dawn dirge
#

Hi!

Yes. Specifically:

  1. If I set trialBilling to some value (e.g. a 1 week free trial)
  2. I then try to update it to undefined, or just remove the trial period from the apple pay modal window

In the above situation, it retains the 1 week free trial, rather than removing as expected

#

If I were to update it to another trialBilling, say a 3 day or 1 month free trial - that works fine. The main issue is setting it from an existing value to none

unborn badger
#

Okay so it sounds like the attempt to unset the trialBilling parameter is not succeeding. When you make the request, does it return a Payment Request object that still has a value for trialBilling?

dawn dirge
#

I'm not sure - I've never inspected the updated payment request object

#

I can try that right now

unborn badger
#

I recommend logging it

#

I suspect that is what is going on here. I would recommend trying to pass an empty string ''. If that doesn't work then you might need to destroy/recreate the Payment Request Button to get the absence of a trial to show up properly

carmine wagonBOT
dawn dirge
#

Ok, logged and verified that the trialBilling value does not get updated when I make an update request with trialBilling: undefined

#

I've tried passing in an empty string '' and null instead, and neither of them work.

#

Both of them cause the payment method to throw an error - Invalid value for PaymentRequest update(), trialBilling should be an object

#

"you might need to destroy/recreate the Payment Request Button"

Is it possible to have two paymentRequests active at once - so that rather than updating it to not have a free trial, we just switch between the two differently initiated paymentRequests?

Is that safe?

timid trench
#

Hi there, I'm working other threads, I'll get back to you shortly.

carmine wagonBOT
hallow sierra
#

๐Ÿ‘‹ stepping in here, sorry for the delay dchao

#

Hmm so you are interested in mounting multiple PaymentRequestButtons here?