Custom form with stripe gateway
-
Hello,
I am developing a plugin where there is a form (for customer details) and I accept payment from Stripe payment gateway.Now, how can I possibly validate the form (check if any customer details is missing) ? I want customer to fill up their details in that custom form first and then fill up their credit card and CVC details in the popup (this popup is due to stripe pay button).
Below is my code:
<div class="wp-travel-engine-billing-details"> <div class="relation-options-title">Billing Details: </div> <div class="wp-travel-engine-billing-details-wrapper"> <div class="stripe-form-wrap"> <input type="hidden" name="wp_travel_engine_booking_setting[place_order][cost]" value="1000"> <input type="hidden" name="wp_travel_engine_booking_setting[place_order][traveler]" value="1"> <input type="hidden" name="wp_travel_engine_booking_setting[place_order][tid]" value="984"> <input type="hidden" name="wp_travel_engine_booking_setting[place_order][tname]" value="new trip"> <input type="hidden" name="custom" value="bf1e15941d!2021-01-07"> <input type="hidden" name="wp_travel_engine_booking_setting[place_order][datetime]" value="2021-01-07"></div> <div class="wp-travel-engine-billing-details-field-wrap"> <label for="wp_travel_engine_booking_setting[place_order][booking][fname]">First Name<span class="required">*</span></label> <input type="text" name="wp_travel_engine_booking_setting[place_order][booking][fname]" id="wp_travel_engine_booking_setting[place_order][booking][fname]" required=""> </div> <div class="wp-travel-engine-billing-details-field-wrap"> <label for="lname">Last Name<span class="required">*</span></label> <input type="text" name="wp_travel_engine_booking_setting[place_order][booking][lname]" id="lname" required=""> </div> <div class="wp-travel-engine-billing-details-field-wrap"> <label for="email">Email<span class="required">*</span></label> <input type="email" name="wp_travel_engine_booking_setting[place_order][booking][email]" id="email" required=""> </div> <div class="wp-travel-engine-billing-details-field-wrap"> <label for="address">Address<span class="required">*</span></label> <input type="text" name="wp_travel_engine_booking_setting[place_order][booking][address]" id="address" required=""> </div> <div class="wp-travel-engine-billing-details-field-wrap"> <label for="city">City<span class="required">*</span></label> <input type="text" name="wp_travel_engine_booking_setting[place_order][booking][city]" id="city" required=""> </div> <div class="wp-travel-engine-billing-details-field-wrap"> <label for="country">Country<span class="required">*</span></label> <select required="" id="country" name="wp_travel_engine_booking_setting[place_order][booking][country]" data-placeholder="Choose a field type…" class="wc-enhanced-select"> <option value=" ">Choose country…</option> <option value="Afghanistan">Afghanistan</option><option value="?land Islands">?land Islands</option> </select> </div> <script src="https://checkout.stripe.com/checkout.js" class="stripe-button active" data-key="" data-panel-label="Pay" data-amount="100000" data-name="new trip" data-currency="USD" data-label="Pay"></script> <button type="submit" class="stripe-button-el" style="visibility: visible;"> <span style="display: block; min-height: 30px;">Pay</span></button> </div> </div>
Also the stripe popup is shown here: https://prnt.sc/iffpe6 .This appears when Pay button is clicked.
Any help would be highly appreciated.Thank you!
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Custom form with stripe gateway’ is closed to new replies.