我正在通过“立即付款”按钮制作发票付款单。但是在设计了按钮代码之后,它没有显示付款选项,保持黑色覆盖,加载按钮显示。以下是完整的代码:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<script type="text/javascript">
function myFunction_eway() {
var checkBox = document.getElementById("check_box_btn");
if (checkBox.checked == true){
} else {
alert('Please Accept credit card fee');
}
var us_amount = $(".us_amount").val();
var us_phone = $(".us_phone").val();
var us_name = $(".us_name").val();
var us_organization = $(".us_organization").val();
var us_email = $(".us_email").val();
var us_invoice = $(".us_invoice").val();
var invoicedescription='Name: '+us_name+', Organization: '+us_organization;
var discount='1.90';
var amnt_gst_cal= (us_amount * discount / 100).toFixed(2);
var us_amount1=parseFloat(amnt_gst_cal, 10) + parseFloat(us_amount, 10);
var us_amount2=us_amount1*100;
var get_btn_txt = $('.eway-button span').text();
$('.eway-button span').text("Pay Now");
window.onload = setTimeout(
function(){
$('.after_click_hide').hide();
$('div#product').hide();
$("div#product").css("display", "none!important");
$(".after_click_hide").css("display", "none");
$(".after_click_show").css("display", "block");
$('script.eway-paynow-button').attr('data-amount', us_amount2);
$('script.eway-paynow-button').attr('data-phone', us_phone);
$('script.eway-paynow-button').attr('data-invoiceref', us_invoice);
$('script.eway-paynow-button').attr('data-invoicedescription', invoicedescription);
$('script.eway-paynow-button').attr('data-email', us_email);
}, 200);
e.preventDefault();
return false;
}
</script>
<style>
label {
cursor: pointer;
display: inline-block;
padding: 10px 0px;
text-align: left;
width: 250px;
vertical-align: top;
}
input {
font-size: inherit;
}
</style>
<style>
#product {
border: 3px solid #000;
display:none;
}
#modal-dialog dl.dl-horizontal {
border: 1px solid #000!important;
}
.eway-button span {
width: 130px !important;
}
</style>
<a style="font-family:avenir;"></a>
<div id="secondlist">
<form action="?" method="POST" id="payment-form" >
<div class="form-row">
Name: <input type="text" style="font-family:avenir;" size="29.5" name="name" class="us_name" required="required" placeholder="First and Last Name" />
</div>
<div class="form-row">
Organization: <input type="text" style="font-family:avenir;" size="29.5" name="organization" class="us_organization" required="required" placeholder="Organization" />
</div>
<div class="form-row">
Email: <input type="email" style="font-family:avenir;" size="29.5" name="email" class="us_email" required="required" placeholder="name@youremail.com" />
</div>
<div class="form-row">
Phone: <input type="text" style="font-family:avenir;" size="29.5" name="phone" class="us_phone" required="required" onkeypress="return event.charCode >= 48 && event.charCode <= 57" placeholder="Phone" />
</div>
<div class="form-row">
Invoice Number:
<input type="text" size="14" style="font-family:avenir;" id="invoice" class="us_invoice" name="invoice" placeholder="Invoice #" required="required" />
</div>
<div class="form-row">
Invoice Total $ (inc GST)
<input type="text" size="14" style="font-family:avenir;" class="us_amount" name="amount" id="amount" required="required" placeholder="$0.00 aud" />
</div>
<div class="form-row">
<span>
Confirm
<span style="margin-right: 10px;margin-top: 11px;">
<input type="checkbox" name="checkbox" value="1" class="check_box_btn" id="check_box_btn" required="required" />
<span style="margin-left:6px;">I understand a 1.90% credit card fee will be automatically added to this total</span>
</span>
</span>
</div>
<div class="form-row submit_b_t_n">
<br>
<button type="button" style="background-color:#485787;color:white;width:150px;height:40px;" class="right after_click_hide" onclick="return myFunction_eway();">Submit Payment</button>
</div>
</form>
</div>
<div></div>
<div class="after_click_show" style="display:none">
<script src="https://secure.ewaypayments.com/scripts/eCrypt.min.js"
class="eway-paynow-button"
data-publicapikey=""
data-amount=""
data-currency="AUD"
data-email=""
data-invoiceref=""
data-invoicedescription=""
data-phone=""
data-label="Pay Now"
data-allowedit="true"
data-submitform="yes"
data-resulturl="">
</script>
</div>
谁能告诉我什么是错误或者我如何解决这个问题?同时,我尝试只加载自定义电子邮件发送的基本代码,但发现了相同的结果。
谢谢
暂无答案!
目前还没有任何答案,快来回答吧!