#Slush-inventory-check
1 messages · Page 1 of 1 (latest)
yeah but that uses PaymentElement in your webpage, no?
to accept the user's card details?
Custom web page
Uhmm
let me check
public ActionResult Create([FromBody]PaymentIntentCreateRequest request)
<form id="payment-form">
<div id="payment-element">
<!--Stripe.js injects the Payment Element-->
</div>
Yes it is using a payment-element
ok so in your code, you should have a button that ultimately calls stripe.confirmPayment() in your code.
On that button press, you can do any checks server-side for your inventory
Hmm a little confused I see the call handleSubmit
with away stripe.confirmPayment
can you show me where in the JS file I would preform the check?
sorry to take a step back, since you wrote the code, you would be familiar with it
my point was, at some point in your code, you call confirmPayment()
and before you call that, you can run any checks for inventory
elements,
confirmParams: {
// Make sure to change this to your payment completion page
return_url: "https://localhost:44310/TournamentPayment",
},
});``` So I would wrap this part of the code in a check?
well kind of
confirmPayment() is what takes the card details and "confirms" the PaymentIntent to create a payment
so you need to do any checks before that
Or I would just never have it hit confirmPayment if my database check fails