Handling Stripe submit errors, Fake payments

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 codeDescriptionCause
authentication_required3D Secure RequiredThe cardholder must complete a 3D Secure (3DS) authentication flow to authorize the payment.
authentication_not_handled3DS Flow IncompleteThe 3DS authentication process was initiated but not completed by the user or the merchant.
fraudulentSuspected FraudThe issuer or the payment gateway's fraud engine flagged the transaction as high-risk.
security_violationSecurity Protocol BreachThe transaction violates security rules (e.g., mismatched CVV/CVC or suspicious IP address).
merchant_blacklistMerchant BlockedThe cardholder or issuer has specifically blocked transactions from this merchant.