1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00

Updated verbage of cancelation

This commit is contained in:
Uncled1023 2021-11-28 21:18:27 -08:00
parent 481360b831
commit ef5e5cd82a
2 changed files with 3 additions and 24 deletions

View File

@ -1,20 +1 @@
// Set your publishable key: remember to change this to your live publishable key in production
// See your keys here: https://dashboard.stripe.com/apikeys
let stripe = Stripe(stripePublishKey);
let elements = stripe.elements();
let card = elements.create('card');
card.mount('#card-element');
card.on('change', function (event) {
displayError(event);
});
function displayError(event) {
changeLoadingStatePrices(false);
let displayError = document.getElementById('card-element-errors');
if (event.error) {
displayError.textContent = event.error.message;
} else {
displayError.textContent = '';
}
}


View File

@ -5,9 +5,8 @@ $(document).ready(function () {
var subscriptionId = $(this).data('subscription-id');
var productId = $(this).data('product-id');
var element = $('#activeSubscriptionList [id="' + subscriptionId + '"');
confirmDialog('Confirm', 'Back', 'Are you sure you want to cancel your subscription?', function (result) {
confirmDialog('Confirm', 'Back', 'Are you sure you want to cancel your subscription? Your plan will be canceled, but is still available until the end of your billing period.', function (result) {
if (result) {
$.ajax({
type: "POST",
@ -21,9 +20,8 @@ $(document).ready(function () {
},
success: function (response) {
if (response.result) {
element.remove();
$("#top_msg").css('display', 'inline', 'important');
$("#top_msg").html('<div class="alert alert-success alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>Subscription successfully canceled.</div>');
$("#top_msg").html('<div class="alert alert-success alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>Subscription will be canceled at the end of your billing cycle.</div>');
}
else {
$("#top_msg").css('display', 'inline', 'important');