The current state of UCRecurring seems to sadly lack in its support of Paypal. Namely:

1) It is possible to buy subscriptions through WPS, but WPS has its limits for when there are several subscriptions to be created at once.
2) It is possible to buy subscriptions through WPP, but WPP doesn't work with paypal login - it only applies to credit cards.

Here is my attempt to solve the situation in the form of a fee handler for Express Checkout payment method.

(the files in attach are full module files rather than patchfiles; 1.1.4 was used as the basis)

Several problems exist:

1) The cancellation of subscription doesn't really work due to it being copypaste from WPS code.
2) Orders containing non-recurring items will possibly be stuck to Pending due to an obscure bug with drupal/ubercart handling of paypal NVP
3) There is a 10 recurring items limit when using EC.
4) EC needs to submit the recurring information on the very first SetExpressCheckout request, so UC Paypal module needs to be modified as well. If anyone has ideas on how to override this without altering UC itself? In this case that also applies to 3) since i'm not sure if it's possible to redirect user back to cart from the checkout while inside of uc_recurring.

Comments

univate’s picture

Version: 6.x-1.0 » 6.x-2.x-dev
Status: Needs review » Needs work

Please post patches, its impossible to review changes, when I can't see what you are changing.

http://drupal.org/patch/create

geerlingguy’s picture

Subscribe.

torgospizza’s picture

StatusFileSize
new79.96 KB
new4.68 KB

Here are patches based on the new module. Keep in mind the uc_recurring_hosted patch is based on the current stable, not the current dev, which has some refactoring in it that may alter the way this patch applies, so the changes here will need to be merged with latest dev if they're accepted.

I haven't tested them yet but I will. I'm putting them here so others can at least review the changes.

EDIT: See my post below this one with regard to the uc_recurring.module patch.

(Cross-posted from #781010-30: Patch to Ubercart might break recurring Paypal WPS )

torgospizza’s picture

StatusFileSize
new15.21 KB

Scrap that uc_recurring_hosted.patch file, this one is the correct one. That was the one based on the current -dev of uc_recurring, I think. (Version number is newer.)

Attached is the one based on the current stable (alpha4).

univate’s picture

StatusFileSize
new14.99 KB

Patches will need to be against the current -dev (I have attempted to fix - untested)

Attaching patches for uc_paypal, not going to help here, they will need to be posted to ubercarts issue queue.

puravida’s picture

Note: Our previous developer, anarchid, disappeared before fully submitting these patches, so we have had to move on. As a result, we have dropped our dev support on Paypal EC and will not be focused on this part of the project moving forward.

To others that may be interested, however, anarchid's code DID work for multiple recurring items for paypal payments but it was a strange implementation. It seemed that there was a missing "parent" loop in the paypal module of ubercart (that prevented multiple recurring items) and then he modified the WPS support to basically setup a billing agreement and then put in the multiple recurring orders. I mention all of that to say that while it did work pre-alpha4 + ubercart 2.2, I doubt that it would work in later versions. Even though we were told that he got Paypal EC working, it was not by using the Paypal EC button/pane on the cart. It would require using the WPS and uc_recurring module. So it was probably a miracle that it worked and got us through a rough spot but probably won't be very helpful now.