gpt4 book ai didi

php - 如何通过 stripe checkout 传递账单明细

转载 作者:行者123 更新时间:2023-12-05 07:43:52 26 4
gpt4 key购买 nike

我是第一次玩 Stripe 支付,所以不知道如何通过 Stripe 结账传递账单明细。

目前,在我的结帐页面中,我有名字、姓氏、电子邮件地址、产品选择、信用卡和信用卡验证码、到期月份和年份。

enter image description here

现在我想在当前表单中添加地址、城市、邮政编码、国家/地区字段。

我在结帐时使用的是 HTML 格式,而不是 Stripe 弹出窗口,所以我担心添加计费选项。

知道如何用 Stripe 做到这一点吗?

HTML代码:

<form method="POST" action="" accept-charset="UTF-8" data-parsley-validate="data-parsley-validate" id="payment-form">
<div class="form-group" id="first-name-group">
<label for="firstName">First Name:</label>
<input class="form-control" required="required" data-parsley-required-message="First name is required" data-parsley-trigger="change focusout" data-parsley-pattern="/^[a-zA-Z]*$/" data-parsley-minlength="2" data-parsley-maxlength="32" data-parsley-class-handler="#first-name-group" name="first_name" type="text" value="Peter">
</div>
<div class="form-group" id="last-name-group">
<label for="lastName">Last Name:</label>
<input class="form-control" required="required" data-parsley-required-message="Last name is required" data-parsley-trigger="change focusout" data-parsley-pattern="/^[a-zA-Z]*$/" data-parsley-minlength="2" data-parsley-maxlength="32" data-parsley-class-handler="#last-name-group" name="last_name" type="text" value="Orphanos">
</div>
<div class="form-group" id="email-group">
<label for="email">Email address:</label>
<input class="form-control" placeholder="email@example.com" required="required" data-parsley-required-message="Email name is required" data-parsley-trigger="change focusout" data-parsley-class-handler="#email-group" name="email" type="email" value="peter.portalic.us@gmail.com" id="email">
</div>
<div class="form-group" id="product-group">
<label for="product">Select product:</label>
<select class="form-control" required="required" data-parsley-class-handler="#product-group" id="product" name="product">
<option value="book">Book ($10)</option>
<option value="game">Game ($20)</option>
<option value="movie">Movie ($15)</option>
</select>
</div>
<div class="form-group" id="cc-group">
<label for="">Credit card number:</label>
<input class="form-control" required="required" data-stripe="number" data-parsley-type="number" maxlength="16" data-parsley-trigger="change focusout" data-parsley-class-handler="#cc-group" type="text" value="4242424242424242">
</div>
<div class="form-group" id="ccv-group">
<label for="">Card Validation Code (3 or 4 digit number):</label>
<input class="form-control" required="required" data-stripe="cvc" data-parsley-type="number" data-parsley-trigger="change focusout" maxlength="4" data-parsley-class-handler="#ccv-group" type="text" value="123">
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group" id="exp-m-group">
<label for="">Ex. Month</label>
<select class="form-control" required="required" data-stripe="exp-month">
<option value="1">01</option>
<option value="2">02</option>
<option value="3">03</option>
<option value="4">04</option>
<option value="5">05</option>
<option value="6">06</option>
<option value="7">07</option>
<option value="8">08</option>
<option value="9">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
</div>
</div>
<div class="col-md-4">
<div class="form-group" id="exp-y-group">
<label for="">Ex. Year</label>
<select class="form-control" required="required" data-stripe="exp-year">
<option value="2017">2017</option>
<option value="2018" selected="selected">2018</option>
<option value="2019">2019</option>
<option value="2020">2020</option>
<option value="2021">2021</option>
<option value="2022">2022</option>
<option value="2023">2023</option>
<option value="2024">2024</option>
<option value="2025">2025</option>
<option value="2026">2026</option>
<option value="2027">2027</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<input class="btn btn-primary btn-order" id="submitBtn" style="margin-bottom: 10px;" type="submit" value="Place order!">
</div>
<div class="row">
<div class="col-md-12">
<span class="payment-errors" style="color: red;margin-top:10px;"></span>
</div>
</div>
</form>

最佳答案

您是否尝试过将字段添加到您的表单并在 Stripe 中测试提交数据?

Here are some Stripe examples.所有字段似乎都具有一致的 HTML 模式。

关于php - 如何通过 stripe checkout 传递账单明细,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43295556/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com