woocommerce-subscriptions-importer-exporter icon indicating copy to clipboard operation
woocommerce-subscriptions-importer-exporter copied to clipboard

PayPal Standard question - will this work?

Open gazchap opened this issue 5 years ago • 6 comments

I'm sorry to ask this, as the documentation is fairly clear that PayPal Standard is not supported, but it would be great if I could get an answer (even a rough one) to this scenario, if possible :)

So, we built a WP+Woo+WooSubscriptions website last year for a client, that had an existing subscriber client base from her previous website (which was WP+Woo+YithSubscriptions)

The posts containing those legacy subscribers are all present on the new site, but nothing currently happens with them as there are no matching Woo subscriptions, and we've been attempting to find a way around this and I found your plugin today.

So, the question is:

We already have all of the subscriber data (including the "I-" billing agreement ID for each) on the site, so I think all I need to do is create a CSV for your plugin that imports that data into the _paypal_subscription_id field (and I'll also add a _legacy_subscription field for my own use!). The subscriptions are all for the same single item on the same frequency (monthly), so it's pretty simple.

The PayPal IPN messages are definitely coming through to the right place and with the "I-" ID in the "subscr_id" field on the IPN, so I'm fairly confident that if we do this Woo will pick it up and process it accordingly.

Is that likely to work, do you think?

To my mind, the only thing that this won't solve is that we've no idea which of those legacy subscriptions are still active, because cancellations on PayPal never updated the system. So, my idea there is to import them all, and then after a month or two find all of the ones that have had no activity and cancel them.

Any advice appreciated, and thanks for your hard work on the plugin!

gazchap avatar Jul 16 '19 12:07 gazchap

@gazchap did you have any success with this?

jaschaio avatar Aug 12 '21 09:08 jaschaio

Ooh, testing my memory.

I think I got it working largely as I described above, but the project to migrate the subscribers never actually made it into production and the website in question is now defunct unfortunately, so I can't say with any certainty!

gazchap avatar Aug 12 '21 12:08 gazchap

Thanks for getting back to me so quickly and testing your memory ;)

To be honest I don't see why it shouldn't work because of the IPN. Even if the IPN URLs can’t be updated for existing subscriptions, as long as the migration is happening on the same domain why shouldn't I be able to just set up a redirect from the old IPN URL to the new WooCommerce one so it doesn’t matter if it got updated within PayPal or not.

jaschaio avatar Aug 12 '21 12:08 jaschaio

Yeah, in theory that'd work - I'm not 100% sure if doing a HTTP redirect of a POST request from one URL to another would keep the POST data though - I don't think it does, but there may be a way to make that happen.

Good luck!

gazchap avatar Aug 12 '21 12:08 gazchap

Apparently HTTP/1.1 includes a 307 status code that allows this (https://softwareengineering.stackexchange.com/questions/99894/why-doesnt-http-have-post-redirect) but I wouldn't be surprised if PayPal's systems ignore it as it'd be very easy for an attacker to abuse it and have POST data sent to an arbitrary location otherwise.

gazchap avatar Aug 12 '21 12:08 gazchap

True but it could work without a redirect as well, just serving the WooCommerce IPN handler under the old IPN URL

jaschaio avatar Aug 12 '21 13:08 jaschaio