gpt4 book ai didi

php - Paypal 支付值(value)的形式没有通过

转载 作者:太空宇宙 更新时间:2023-11-03 16:22:12 25 4
gpt4 key购买 nike

我正在使用此表单将值传递给 Paypal 付款。

<form style="padding: 20px; border: 2px solid #f00; background: #fff;    box-shadow: 10px 10px 20px -5px #000; border-radius: 10px; font-size:15px;" action="https://www.paypal.com/cgi-bin/webscr" method="POST">
<div class="form-row">
<div class="form-group col-md-12 mx-auto text-center">
<h3 class="text-uppercase">Please Confirm Your Payment</h3>
</div>
</div>
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="paypaltestgmail.com">
<input type="hidden" name="quantity" value="1">
<div class="form-row">
<div class="form-group col-md-4">
<label for="fullName">Full Name</label>
<input type="text" class="form-control" id="fullName" value="<?php echo $firstName . ' ' . $lastName; ?>" name="fullName" disabled="disabled">
</div>
<div class="form-group col-md-4">
<label for="email">Email</label>
<input type="text" class="form-control" id="email" value="<?php echo $email; ?>" name="email" disabled="disabled">
</div>
<div class="form-group col-md-4">
<label for="age">Age</label>
<input type="text" class="form-control" id="age" value="<?php echo $age; ?>" name="age" disabled="disabled">
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<label for="sessionType">Session Type</label>
<input type="text" class="form-control" id="sessionType" value="<?php echo $sessionType; ?>" name="item_name" disabled="disabled">
</div>
<div class="form-group col-md-4">
<label for="sessionDays">Session Days</label>
<textarea class="form-control" id="sessionDays name="sessionDays" disabled="disabled"><?php echo $sessionDays; ?></textarea>
</div>
<div class="form-group col-md-4">
<label for="sessionTime">Session Time</label>
<textarea class="form-control" id="sessionTime" name="sessionTime" disabled="disabled"><?php echo implode(', ', $_POST['sessionTime']); ?></textarea>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<label for="totalCost">Total Cost</label>
<input type="text" class="form-control" id="totalCost" value="<?php echo $totalCost; ?>" name="totalCost" disabled="disabled">
</div>
<div class="form-group col-md-4">
<label for="totalTax">Tax Amount</label>
<input type="text" class="form-control" id="totalTax" value="<?php echo $totalTax; ?>" name="totalTax" disabled="disabled">
</div>
<div class="form-group col-md-4">
<label for="grandTotal">Grand Total</label>
<input type="text" class="form-control" id="grandTotal" value="<?php echo $grandTotal; ?>" name="amount" disabled="disabled">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<!-- <input type="hidden" name="bn" value="BuyNow"> -->
<input type="hidden" name="return" value="http://www.example.net/payment-success/">
</div>
</div>
<button type="submit" class="btn btn-primary btn-lg d-block mx-auto text-uppercase">Confirm & Pay</button>

我得到了这个结果:

I am getting this result

我正在获取数量但没有获取 $sessionType;在描述字段和 $grandTotal 中;在每件商品的价格(总计)字段中。我是第一次这样做。我的表格有什么错误?我无法解决这个问题。

最佳答案

使用 readonly 的魔力属性:

This attribute indicates that the user cannot modify the value of the control. The value of the attribute is irrelevant. If you need read-write access to the input value, do not add the "readonly" attribute. It is ignored if the value of the type attribute is hidden, range, color, checkbox, radio, file, or a button type (such as button or submit).

关于php - Paypal 支付值(value)的形式没有通过,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50587614/

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