Answers.Body: <p>I think you can use unit test to check Failed recurring from stripe extension. It does cover most of the test for IPN.</p>
  
  <p>You can find more details about the unit test <a href="https://lab.civicrm.org/extensions/stripe/blob/master/tests/phpunit/CRM/Stripe/IpnTest.php#L144" rel="nofollow noreferrer">here</a>.</p>
  
  <p>HTH</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-26T10:33:06.717Z
Answers.LastActivityDate: 2019-03-26T10:33:06.717Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>Whenever recurring payment failed due to change in card number, card expiring, cancellation of credit card, or the card issuer not recognising the payment. I have to sent notification to user. Stripe have inbuilt functionality to sent notification but does not have way to customize the message sent to user.</p>
  
  <p>I have to sent that message through civicrm. </p>
  
  <p>CiviCRM already have functionality to handle 'invoice.payment_failed' event type which change status to 'Failed'. On top of that i have to send email notification to user.</p>
  
  <p>Main question is, how do i generate testing scenario through CiviCRM to receive 'payment_failed' notification.</p>
  
Tags: <payment-processor><recurring-contributions><stripe>
Title: way to test stripe recurring failed payment
ThreadText: # way to test stripe recurring failed payment
  
  (Asked by: username_0 on 2019-03-26)
  
  Whenever recurring payment failed due to change in card number, card expiring, cancellation of credit card, or the card issuer not recognising the payment. I have to sent notification to user. Stripe have inbuilt functionality to sent notification but does not have way to customize the message sent to user.
  
  I have to sent that message through civicrm.
  
  CiviCRM already have functionality to handle 'invoice.payment\_failed' event type which change status to 'Failed'. On top of that i have to send email notification to user.
  
  Main question is, how do i generate testing scenario through CiviCRM to receive 'payment\_failed' notification.
  
  **Tags:** payment-processor, recurring-contributions, stripe
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-03-26. Score: 0
  
  I think you can use unit test to check Failed recurring from stripe extension. It does cover most of the test for IPN.
  
  You can find more details about the unit test [here](https://lab.civicrm.org/extensions/stripe/blob/master/tests/phpunit/CRM/Stripe/IpnTest.php#L144).
  
  HTH
  
  Pradeep
  
  
  ---
  
  