Simple Membership Plugin › Forums › Simple Membership Plugin › New PayPal subscriptions are sometimes missed and no member is created
Tagged: payments
- This topic has 8 replies, 3 voices, and was last updated 1 year, 5 months ago by
admin.
-
AuthorPosts
-
December 17, 2024 at 6:13 pm #29216
Desty
ParticipantHi, I’ve had a few people join my site with a PayPal subscription button using SWMP, but report that they can’t log in. Could you suggest some steps to debug and fix this? Last time, I manually edited the database to link the payment to the correct member, but this feels risky, and I really don’t want to ask people to cancel and recreate their subscriptions.
Here’s (redacted) output from the debug logs:
[2024/12/16 21:46:50] - SUCCESS: swpm_pp_create_subscription ajax request received for createSubscription. Button ID: 339, On Page Button ID: swpm_paypal_button_1 [2024/12/16 21:46:51] - SUCCESS: PayPal Subscription ID: I-K90123456789 [2024/12/16 21:47:13] - SUCCESS: Webhook event type: BILLING.SUBSCRIPTION.CREATED. Event summary: Subscription created [2024/12/16 21:57:52] - SUCCESS: Webhook event type: BILLING.SUBSCRIPTION.ACTIVATED. Event summary: Subscription activated [2024/12/16 21:57:52] - SUCCESS: Handling Webhook status update. Subscription ID: I-K90123456789 [2024/12/16 21:58:15] - SUCCESS: Webhook event type: PAYMENT.SALE.COMPLETED. Event summary: Payment completed for EUR 6.7 EUR [2024/12/16 21:58:16] - SUCCESS: Subscription ID from resource: I-K90123456789. Transaction ID: 5NN00123456789XYZ [2024/12/16 21:58:16] - SUCCESS: Subscription tenure type: REGULAR, Sequence: 1, Cycles Completed: 1, Last Payment Time: 2024-12-16T21:57:28Z [2024/12/16 21:58:16] - SUCCESS: Could not find the original subscription checkout custom field data. [2024/12/16 21:58:16] - SUCCESS: Updating the access start date if applicable for this subscription payment. Subscriber ID: I-K90123456789, Email: redacted@redacted.com, Account status: active [2024/12/16 21:58:16] - SUCCESS: Did not find an existing record in the members table for subscriber ID: I-K90123456789 [2024/12/16 21:58:16] - SUCCESS: This could be a new subscription payment for a new subscription agreement. [2024/12/16 21:58:16] - FAILURE: Error! Could not find an existing member record for the given subscriber ID: I-K90123456789. This member profile may have been deleted. [2024/12/16 21:58:16] - SUCCESS: Executed save_txn_record() function.December 17, 2024 at 11:16 pm #29217The Assurer
ModeratorIs this for ALL members, using the button; or just “some?”
Have you been using these instructions?
https://simple-membership-plugin.com/create-paypal-subscription-button-inside-the-simple-membership-plugin/Or have you been using THESE instructions?
https://simple-membership-plugin.com/create-paypal-subscription-buttons-paypal-api/December 18, 2024 at 6:12 am #29218Desty
ParticipantSo far it’s happened to two members out of about 120 who have signed up with PayPal. I created it using the “new” PayPal API (the second link), back in November.
December 18, 2024 at 6:26 am #29219Desty
ParticipantI’m trying to compare against other examples in the logs where the member account was created successfully, and the first difference is that in the successful case, after the
BILLING.SUBSCRIPTION.CREATEDwebhook is called, a message likeOnApprove ajax request received for createSubscription.appears, but not in the unsuccessful case.What could cause this to happen most of the time but fail in ~2% of the cases, recording the payment but creating no member record?
December 18, 2024 at 11:48 pm #29222The Assurer
ModeratorPerhaps their PayPal payment method has issues? And what geographic locals are the failed subscribers located?
December 20, 2024 at 7:46 am #29238Desty
ParticipantWhat sort of issues have you seen with PayPal that would cause this? The payment was successful and we can see from the log that several payment webhooks were called. What triggers the
OnApprove ajax request received for createSubscriptionand what might cause it not to happen?The failed payments seem to come from users in Ireland, but at least 90% of our users are in Ireland so I don’t think it’s a geographical issue.
December 21, 2024 at 1:08 am #29242The Assurer
ModeratorI have referred this to the developer. In the meantime, what version of the plugin are you using? Also please check for javascript library conflicts.
https://simple-membership-plugin.com/forums/topic/test-for-plugin-and-theme-conflict-before-posting-an-issue-or-a-bug/December 21, 2024 at 4:30 am #29254admin
KeymasterThe following two items are completely separate and unconnected:
Webhook Event:
The Webhook event type: BILLING.SUBSCRIPTION.CREATED. Event summary: Subscription created is a webhook notification from PayPal. Webhooks are asynchronous background notifications that can be received by the plugin at any time for any subscription. The plugin uses these webhooks to perform specific operations, such as handling recurring charges or processing subscription cancellations. However, user accounts are not supposed to be created based on this event, so it can be ignored in that context.OnApprove Ajax Request:
The OnApprove ajax request received for createSubscription is a synchronous event triggered when a user interacts with the subscription button and completes the checkout process in their browser. This event must occur during a new subscription checkout. If it is missing, it typically indicates that the checkout process wasn’t completed properly. Possible reasons could include insufficient funds on the user’s card or the user closing the checkout window before PayPal finalized the process.To ensure the subscription checkout process functions correctly on your site, you can perform your own testing:
Payment Testing Checklist for Simple Membership:
https://simple-membership-plugin.com/payment-testing-checklist-for-simple-membership/Keep in mind that occasional user errors may occur depending on the demographic of your site. These issues can often be identified by asking the user for details about what they did during the checkout process.
If you receive a webhook event and want to investigate further, you can copy the subscription ID (e.g., I-K90123456789) and search for it in the Members menu. If no user profile is associated with that subscription ID, it likely means that the user profile was deleted, or the user completed another subscription checkout that overwrote the previous one. You can deactivate such subscriptions directly from your PayPal account if necessary.
December 21, 2024 at 4:31 am #29255admin
KeymasterI recommend trying the following registration method to ensure the user account is created before the subscription payment. This approach can help reduce the likelihood of user errors that you are seeing:
https://simple-membership-plugin.com/payment-testing-checklist-for-simple-membership/
-
AuthorPosts
- You must be logged in to reply to this topic.