Skip to content

Commit

Permalink
Added Update Elements function
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaydev Waghela committed May 24, 2024
1 parent bf76a7c commit e4de508
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions checkout.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit e4de508

Please sign in to comment.