Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Add Paypal's unique subscription ID to the Customer Table in eStore
- This topic has 10 replies, 3 voices, and was last updated 6 years, 6 months ago by Ariel777.
-
AuthorPosts
-
May 9, 2018 at 5:25 pm #14860Ariel777Spectator
Following on from my recent question a few days ago: When Paypal notifies eStore (not eMember) of a subscription payment coming in, one param in the IPN is the unique Paypal subcription ID of that payment.
I understand from the previous question that eStore considers a subscription payment simply like a regular payment and that’s fine.
However, does eStore save the Paypal subscription ID anywhere (perhaps in the Customer Table)?
It would be very useful if it did, because this would make it possible to “join the dots” between separate payment events and keep track of the status of a single subscription with a few basic mySQL queries.
So, does eStore save this info along with the rest of the details about a payment anywhere?
If not, would it be hard to add this? As far as I’m concerned, even if it was just added to the “Admin Notes” field that would be fine — just so long as it’s there somewhere.
May 9, 2018 at 6:54 pm #77789wzpModeratorThe subscription ID is not one of the variables returned in the IPN.
[https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables/]
May 9, 2018 at 8:21 pm #77790Ariel777SpectatorIn the link you cite, it seems that it is. Maybe this is something new? Or have I misunderstood?
Also, in the eStore ipn_handle_debug_log, it seems to show up in a test subscription I did.
May 9, 2018 at 8:35 pm #77791wzpModeratorYou are correct; it is called: subscr_id
I assume that debug was from the initial purchase? Does “subscr_id” also show up in the IPN for future recurring payments? Perhaps you can perform a test subscription with a period of 2 days; to find out.
If so, the developers may weigh-in on the feasibility of your request. I know one of the factors they’ll consider is if “subscr_id” (or its equivalent) is particular only to PayPal or across all payment gateways.
May 9, 2018 at 9:55 pm #77792Ariel777SpectatorI’ll set something up and post back in a couple of days.
AFAIC, it’s Paypal and Stripe that are of interest.
May 10, 2018 at 1:33 am #77793adminKeymasterWP eStore already stores that subscr_id value (if it is present in the IPN). Edit a record from the manage customers menu and look for the “Subscriber ID” field.
May 10, 2018 at 6:58 am #77794Ariel777SpectatorI’m not seeing that value anywhere in the customer record (I’m using the WP Admin to check, haven’t looked at the raw mySQL table just now).
I’m on eStore 7.1.9.
The Paypal IPN for the subscription purchase definitely has the subscr_id value in it (debugging is on so I was able to check).
I can see the Transaction ID, but not the subscription ID.
Can you tell me where exactly I should be seeing the subscriber id?
May 11, 2018 at 12:37 am #77795adminKeymasterPlease do the following to load a new copy of the plugin. I added it to the plugin recently:
https://support.tipsandtricks-hq.com/forums/topic/re-install-or-load-a-fresh-build-of-the-plugins
May 16, 2018 at 11:08 pm #77796Ariel777SpectatorI have finally installed the new version, and indeed the subscription_id field has now been added to the customer table. That’s great, thank you.
But, unlike what is written here (https://support.tipsandtricks-hq.com/forums/topic/estore-not-processing-paypal-cancel-subscription-ipn#post-90068), it seems that each recurring PayPal payment is not not recorded as a separate entry in the Customer table. Perhaps this is new behaviour for version 8, or something? So,
(a) Could you confirm that this is so, and that only the first payment of a set of recurring payments (subscriptions) is recorded in the main customer table?
(b) On my website, I accept both PayPal and Stripe gateways. The subscription_id field is populated only for PayPal subscription payments, and not for one-off PayPal payments. But strangely, that same field is populated for every single Stripe payment, even when this is not a subscription or recurring payment. Is that intentional, or a bug?
May 17, 2018 at 12:25 am #77797adminKeymastera) Enable the following option to capture the recurring payments:
WP eStore Settings -> Advanced Settings -> Capture Recurring Payment Sales Data
b) This behavior is intentional. Stripe doesn’t have the same subscriber ID concept as PayPal. We do that to help with our emember plugin.
May 17, 2018 at 12:43 am #77798Ariel777SpectatorPerfect. Thanks for all your help.
-
AuthorPosts
- You must be logged in to reply to this topic.