Answers.Body: <p>The API we're using to tell CiviCRM to generate this recurring series - is the</p>
  
  <pre><code>ContributionRecur API:
  $resultRecur = wf_civicrm_api('ContributionRecur', 'create', $contributionRecurParams); 
  </code></pre>
  
  <p>I don't know how that API connects with PayPal WPS; one of the $contributionRecurParams is the PaymentProcessor, but I don't have any clients on PayPal WPS - so can't test how well it works for IPN payment processors. </p>
  
  <p><strong>Here's what to do:</strong> Create a Membership Type with duration: 1day and minimum fee = $1; then do what you describe above (live): purchase 2 terms on your Webform; and pay in 2 installments; That should:</p>
  
  <ul>
  <li>result in Contact getting the Membership</li>
  <li>result in Contact having a Contribution in his record: $1 receive date today</li>
  <li>result in Contact having a Recurring Series (at the bottom of the Contribution tab) in his record: status: in progress, 2 installments, daily, next scheduled date: tomorrow</li>
  </ul>
  
  <p><strong>Tomorrow:</strong>
   - hopefully - another $1 contribution is generated and the Recurring Series status is updated to completed;</p>
  
  <p><strong>Update:</strong> you told me that the second $1 payment was indeed processed in PayPal WPS - so that's great; your CiviCRM did not receive the IPN so you had to manually reconcile - that's an issue between PayPal WPS and your CiviCRM [unrelated to Webform CiviCRM]</p>
  
  <p>I really don't know how PayPal WPS handles expired/lost/stolen credit cards; and I don't know what business logic/consequences may be attached to a failed recurring payment; For the iATS Extensions we handle different Failed attempts - differently; but what we don't do is add any business logic - as many orgs will have different logic e.g. whether or not memberships should be canceled automatically on a failed recurring contribution.</p>
  
  <p><strong>Conclusion:</strong> if you setup Membership recurring with CiviCRM native - the code will do some things differently compared to when (we're on the outside - interacting with CiviCRM via the API) you use Webform CiviCRM; I can really only confirm that this is working fine for 4.6 and 4.7 when using an inline payment processor - like our iATS extension; but we've not coded anything specific to iATS about this. Again, we're using the CiviCRM API to create RecurringSeries - it's possible though that the API needs some improving. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-20T01:07:35.500Z
Answers.Text: KarinG - thank you! One other thing we are noticing is the transaction ID is not coming across in the receipt. Have you ever experienced that
Answers.UserDisplayName: Zachary
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-20T01:21:50.407Z
Answers.Text: On and off - yes - using CiviCRM native Contribution pages as well.
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-17T23:37:45.710Z
Answers.LastActivityDate: 2018-02-19T15:56:30.650Z
Answers.LastEditDate: 2018-02-19T15:56:30.650Z
Answers.UserDisplayName: KarinG - Semper IT
Body: <p>If we use Webform CiviCRM latest on Drupal 7 and CiviCRM 4.7.x, Paypal WPS, and sell a Membership with 2 terms, Annually, with 2 installments, it should bill them once a year for two years (automatically).</p>
  
  <p>Once the first payment is created, CiviCRM sets their membership end date as two years in the future. So It would be 2/18/2020 if someone paid today.</p>
  
  <p>Question: what happens if they miss their second payment due to the card being declined? Does the membership get canceled on 2/17/2019? Or do they keep their membership, without paying the second annual payment?</p>
  
  <p>Thank you. This question comes up due to the way Webform CiviCRM handles "recurring" payments. </p>
  
Tags: <civimember><webform-civicrm>
Title: Webform CiviCRM, Membership and # of Terms
ThreadText: # Webform CiviCRM, Membership and # of Terms
  
  (Asked by: username_0 on 2018-02-17)
  
  If we use Webform CiviCRM latest on Drupal 7 and CiviCRM 4.7.x, Paypal WPS, and sell a Membership with 2 terms, Annually, with 2 installments, it should bill them once a year for two years (automatically).
  
  Once the first payment is created, CiviCRM sets their membership end date as two years in the future. So It would be 2/18/2020 if someone paid today.
  
  Question: what happens if they miss their second payment due to the card being declined? Does the membership get canceled on 2/17/2019? Or do they keep their membership, without paying the second annual payment?
  
  Thank you. This question comes up due to the way Webform CiviCRM handles "recurring" payments.
  
  **Tags:** civimember, webform-civicrm
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-02-17. Score: 2 | Accepted answer
  
  The API we're using to tell CiviCRM to generate this recurring series - is the
  ContributionRecur API:
  $resultRecur = wf_civicrm_api('ContributionRecur', 'create', $contributionRecurParams); 
  
  I don't know how that API connects with PayPal WPS; one of the $contributionRecurParams is the PaymentProcessor, but I don't have any clients on PayPal WPS - so can't test how well it works for IPN payment processors. 
  Here's what to do: Create a Membership Type with duration: 1day and minimum fee = $1; then do what you describe above (live): purchase 2 terms on your Webform; and pay in 2 installments; That should:
  
  result in Contact getting the Membership
  result in Contact having a Contribution in his record: $1 receive date today
  result in Contact having a Recurring Series (at the bottom of the Contribution tab) in his record: status: in progress, 2 installments, daily, next scheduled date: tomorrow
  
  Tomorrow:
   - hopefully - another $1 contribution is generated and the Recurring Series status is updated to completed;
  Update: you told me that the second $1 payment was indeed processed in PayPal WPS - so that's great; your CiviCRM did not receive the IPN so you had to manually reconcile - that's an issue between PayPal WPS and your CiviCRM [unrelated to Webform CiviCRM]
  I really don't know how PayPal WPS handles expired/lost/stolen credit cards; and I don't know what business logic/consequences may be attached to a failed recurring payment; For the iATS Extensions we handle different Failed attempts - differently; but what we don't do is add any business logic - as many orgs will have different logic e.g. whether or not memberships should be canceled automatically on a failed recurring contribution.
  Conclusion: if you setup Membership recurring with CiviCRM native - the code will do some things differently compared to when (we're on the outside - interacting with CiviCRM via the API) you use Webform CiviCRM; I can really only confirm that this is working fine for 4.6 and 4.7 when using an inline payment processor - like our iATS extension; but we've not coded anything specific to iATS about this. Again, we're using the CiviCRM API to create RecurringSeries - it's possible though that the API needs some improving.
  
  > **Comments:**
  > **username_0**: KarinG - thank you! One other thing we are noticing is the transaction ID is not coming across in the receipt. Have you ever experienced that  
  > **username_1**: On and off - yes - using CiviCRM native Contribution pages as well.  
  
  ---
  
  