Use Stripe test prices with the code below on Paywall for fire Subscribe event and send user to another page or show popup
<script>
AnalyticsManager.on('Stripe submit error', function(e) {
if (e.decline_code === "test_mode_live_card" || (e.message || '').indexOf('stripe.com/docs/testing') > -1){
let price=window.document.querySelector('.plan-popup__totals-sum').innerText.replace("$","")
price = parseFloat(price)
console.log(price)
AnalyticsManager.logEvent('Purchase', {value: price});
window.location.pathname='/mindflow-2-email';
// OR
// Open another popup
PopupInstance.open('#popup_id');
}
/* Error codes:
- card_declined
- incomplete_payment_method
- incorrect_number
- generic_decline
- invalid_zip
- incomplete_cvc
- incorrect_cvc
- invalid_number
- incomplete_expiry
- expired_card
- invalid_cvc
*/
});
</script>Authentication & Security
| Error code | Description | Cause |
|---|---|---|
| authentication_required | 3D Secure Required | The cardholder must complete a 3D Secure (3DS) authentication flow to authorize the payment. |
| authentication_not_handled | 3DS Flow Incomplete | The 3DS authentication process was initiated but not completed by the user or the merchant. |
| fraudulent | Suspected Fraud | The issuer or the payment gateway's fraud engine flagged the transaction as high-risk. |
| security_violation | Security Protocol Breach | The transaction violates security rules (e.g., mismatched CVV/CVC or suspicious IP address). |
| merchant_blacklist | Merchant Blocked | The cardholder or issuer has specifically blocked transactions from this merchant. |