logs, credits

This commit is contained in:
Arman
2023-12-05 14:36:26 +01:00
parent c03c00a3e2
commit 36fcecab18
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -255,6 +255,7 @@
console.log('Environment is not Cloud or Stripe public key not deteted');
console.log('isCloud:', isCloud);
console.log('hasStripePublicKey:', hasStripePublicKey);
console.log('Stripe key:', VARS.STRIPE_PUBLIC_KEY);
}
});
@@ -13,6 +13,7 @@
};
async function validateCoupon() {
if (couponData?.status === 'active') return;
try {
const response = await sdk.forConsole.billing.getCoupon(coupon);
couponData = response;
@@ -21,7 +22,7 @@
console.log('test');
couponData.code = coupon;
couponData.status = 'error';
return;
throw new Error(`${coupon} is not a valid promo code`);
}
}
</script>