var handler = StripeCheckout.configure({
key: 'pk_test_RZbZyo9yiaiRtSx7BwrXiZUn',
image: /*'url("/resources/images/512_copy.png")'*/ 'https://stripe.com/img/documentation/checkout/marketplace.png',
locale: 'auto',
panelLabel : 'pay ',
zipCode : true ,
billingAddress : true,
bitcoin : true ,
alipay : true ,
alipayReusable : true,
name: 'Sendit Plus'
});
now = new Date();
$('#stripebutton12').on('click', function(e) {
//get the epochday + one month
endingdate = Math.floor(now/8.64e7)+31;
// Open Checkout with further options:
handler.open({
token: function(token) {
// You can access the token ID with `token.id`.
// Get the token ID to your server-side code for use.
formData = new FormData();
formData.append("tokenid", token.id);
formData.append("email", "${email}");
formData.append("ending_date", endingdate);
$.ajax({
type:"POST",
url: "/app/plus/stripe_paymonth",
contentType: false,
processData: false,
data: formData,
enctype: "multipart/form-data",
success : function(data){
if(data==1){
Cookies.set('email', email, { path: '/app' });
$.redirect("http://sample-env.py4kpfcsxt.eu-central-1.elasticbeanstalk.com/app/email");
}
else if(data==0){
alert('fail payment');
}
},
error : function(error){
alert('error with payment stripe one month ' +error.stack);
}
});
},
description: 'Purchase of Plus Account for 1 Month',
amount: 1199
});
e.preventDefault();
});
$('#stripebutton120').on('click', function(e) {
endingdate = Math.floor(now/8.64e7)+365;
// Open Checkout with further options:
handler.open({
token: function(token) {
// You can access the token ID with `token.id`.
// Get the token ID to your server-side code for use.
formData = new FormData();
formData.append("tokenid", token.id);
formData.append("email",...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.