我在Asp.Net C#中为条带集成做了错误的代码 [英] Am I Doing Wrong Code For Stripe Integration In Asp.Net C#
问题描述
我正在尝试使用jquery使用条带结帐进行付款的代码,
但这段代码无效,任何人都对此有所了解。我在这里做错了什么,因为我无法整合付款方式。
已经尝试了这么多代码但没有任何工作我认为他们是代币收费问题
这是我用来付款的代码
在这里输入代码
//
< script src =https://checkout.stripe.com/checkout.js>< / script>
< script>
var handler = StripeCheckout.configure ({
key:'pk_test_uXSrtyyNOHNElxTHSZgR9JP5',
image:'images / mm.jpg',
token:function(token){
//使用令牌通过服务器端脚本创建费用。
//您可以使用`令牌访问令牌ID .id`
Stripe.card.createToken({
number:$('。card-number')。val(),
cvc:$('。card-cvc')。val(),
exp_month:$('。card-expiry-month')。val() ,
exp_year:$('。card-expiry-year')。val()
},stripeResponseHandler);
}
});
$ ('#customButton')。on('click',function(e){
//打开Checkout,带有更多选项
handler.open({
名称:'个人资料',
描述:'网站',
金额:1995
});
e.preventDefault();
});
在这里输入代码
i am trying a Below code for payment using stripe checkout using jquery ,
but this code is not working, Any one have idea about this. what i am doing wrong here , because of that i am unable to integrate payment method.
have tried so many codes but nothing is working i think their is token charging issue
this is a code which i am using for payment
enter code here
//
<script src="https://checkout.stripe.com/checkout.js"></script>
<script>
var handler = StripeCheckout.configure({
key: 'pk_test_uXSrtyyNOHNElxTHSZgR9JP5',
image: 'images/mm.jpg',
token: function(token) {
// Use the token to create the charge with a server-side script.
// You can access the token ID with `token.id`
Stripe.card.createToken({
number: $('.card-number').val(),
cvc: $('.card-cvc').val(),
exp_month: $('.card-expiry-month').val(),
exp_year: $('.card-expiry-year').val()
}, stripeResponseHandler);
}
});
$('#customButton').on('click', function (e) {
// Open Checkout with further options
handler.open({
name: 'Profile',
description: 'website',
amount: 1995
});
e.preventDefault();
});
enter code here
推荐答案
('。 card-number')。val(),
cvc:
('.card-number').val(),
cvc:
('。card-cvc')。val(),
exp_month:
('.card-cvc').val(),
exp_month:
('。card-expiry-month')。val(),
exp_year:
('.card-expiry-month').val(),
exp_year:
这篇关于我在Asp.Net C#中为条带集成做了错误的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!