#balda_error

1 messages ¡ Page 1 of 1 (latest)

gentle sinewBOT
#

👋 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/1311686323865784330

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

graceful imp
#

this is the request to retrive clientSecret

#

{
Mode = "setup",
Currency = "eur",
UiMode = "embedded",
RedirectOnCompletion = "never"
}

#

and this is the response

#

{
"id": "cs_test_c1Er4OOFqBmNks3jNVXikSBCtzEWzzmLGQ7XcHfG3RszoBgIXwaH1GYlS6",
...
"client_secret": "cs_test_c1Er4OOFqBmNks3jNVXikSBCtzEWzzmLGQ7XcHfG3RszoBgIXwaH1GYlS6_secret_fidwbEhqYWAnPydgaGdgYWFgYScpJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknd2BhbHdgZnFKa0ZqaHVpYHFsamsnPydrYHNgdyd4JSUl",
...
"ui_mode": "embedded",
"url": null
}

autumn forge
#

hi! if you're trying to use Checkout you would not use stripe.elements in that way.

graceful imp
#

when i retrive clientSecret from server, i manage the secret in this way:

#

this.clientSecretStripe = data.response.clientSecret;
this.reservationAmount = this.penaltyFeeAmountTimeSlot;

      this.stripe
        .elements({ clientSecret: this.clientSecretStripe })
        .subscribe((x) => {
          this.elementsOptions.clientSecret = this.clientSecretStripe;
          this.stripesElements = x;
          this.stripePaymentElement = this.stripesElements.create(
            'payment',
            this.paymentElementOptions
          );
          this.stripePaymentElement.mount(this.stripeCard.nativeElement);
        });
#

where am I going wrong in your opinion?

autumn forge
#

yeah none of that code would be what you would use if using Checkout.

#

they're different integrations and they need to match.

#

@granite sigil open your own thread through the form on #help

autumn forge
#

@graceful imp did that help, are things clearer?