如何通过条带结帐传递结算明细

时间:2017-04-08 14:52:39

标签: php stripe-payments payment-gateway payment

我是第一次玩条纹付款,所以不知道通过条带结帐传递结算明细。

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

enter image description here

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

我使用HTML格式进行结帐而不是条纹弹出,所以我担心会添加结算选项。

知道怎么用条纹做这个吗?

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>

1 个答案:

答案 0 :(得分:0)

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

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