From e4de508d8f0b85bda4f00952b57714659d22179f Mon Sep 17 00:00:00 2001 From: Jaydev Waghela Date: Fri, 24 May 2024 12:05:17 +0530 Subject: [PATCH] Added Update Elements function --- checkout.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/checkout.js b/checkout.js index 0f6351f..d78ba4a 100644 --- a/checkout.js +++ b/checkout.js @@ -112,6 +112,11 @@ function initStripe({ stripe: stripeObj = {} }) { } } +function updateElements(options = {}) { + // Reference : https://docs.stripe.com/js/elements_object/update + elements.update(options); +} + async function validateElements() { try { const { error: submitError } = await elements.submit();