Open MindMachineMedia opened 7 years ago
@MindMachineMedia Thanks for reporting! :-)
The user's payment gateway, EOT, Paid Subscr. ID, and Paid Subscr. CID were not updated to one used for Stripe, but instead stayed the same as the prior year's value populated when paying by PayPal.
The behavior that you expect is what you should be seeing; i.e., you are correct to expect the behavior that you described. The behavior that you observed is likely caused by a post-processing error, which means that your Stripe integration is incomplete or failing on one of the configured values; e.g., Stripe API key, or something else.
Have you enabled logging and reviewed the stripe-ipn.log
and stripe-api.log
files for any notes left behind by s2Member's post-processing handlers? If not, please enable logging and if you need help reviewing logs you can send them to support using the contact popup here. See: https://s2member.com/support
Referencing: Dashboard → s2Member → Log Files (Debug) → Logging Configuration
log files zip submitted this morning - thx!
EXPLANATION OF THE ISSUE
We switched from using PayPal to Stripe at the end of the year. Using the latest version of s2Member and s2Member Pro as of July 23, 2017, we are seeing a problem with Stripe integration whereby members coming to our site to pay annual dues are getting charged through Stripe but the s2Member plugin is not reflecting the payment. Looking at payment logs (once put into debug mode), s2Member is sending the "Paid Subscr. ID" or "Paid Subscr. CID" captured from when PayPal was used last year to Stripe and Stripe is sending back sending back "invalid_request_error" and "No such customer" errors as well as payment success and confirmation. My users are charged by Stripe but don't get their membership renewed in s2Member data. s2Member says in the logs that it thinks there's nothing for it to do.
This issue did not occur in early April when other members paid their annual dues using Stripe. The first known occurrence of the issue was in mid-May, 2017.
STEPS TO REPRODUCE THE ISSUE
Here's the code from the payment page (I replaced the site URL in "custom=" with "":
Payment Process
Payment is processed via Stripe. Choose Annual or Lifetime in Checkout Options. Select Add Billing Method to enter or retrieve your payment details. Select Submit Form to process your payment. [s2If !current_user_can(access_s2member_level2)] [s2Member-Pro-Stripe-Form rp="1" rr="BN" cc="USD" custom="" ta="0" tp="0" tt="Y" ]
[_s2If current_user_is(s2member_level0)]
[s2Member-Pro-Stripe-Form level="1" desc="Annual Membership $50" ra="50.00" rt="Y" /]
[/_s2If]
[_s2If current_user_is(s2member_level1)]
[s2Member-Pro-Stripe-Form level="1" desc="Annual Membership Renewal $50" ra="50.00" rt="Y" /]
[/_s2If]
[s2Member-Pro-Stripe-Form level="2" desc="Lifetime Membership $500" ra="500.00" rt="L" /]
[/s2Member-Pro-Stripe-Form]
[/s2If]
[s2If current_user_is(s2member_level2)]
Member Level: Lifetime (No payment required)
[/s2If]
Note: we programmatically modify EOT to be the next January 1 based upon business rules (e.g., Mon Jan 1, 2018 6:01 am UTC)
BEHAVIOR THAT I EXPECTED
I expect the user's payment gateway, EOT, Paid Subscr. ID, and Paid Subscr. CID to be updated to one used for Stripe. It seems like s2Member should recognize that the prior payment gateway was set to PayPal and Paid Subscr. ID, and Paid Subscr. CID are associated with that and should not use them when ending to a different gateway.
BEHAVIOR THAT I OBSERVED
The user's payment gateway, EOT, Paid Subscr. ID, and Paid Subscr. CID were not updated to one used for Stripe, but instead stayed the same as the prior year's value populated when paying by PayPal.