Ive read through the tickets that explains WPS (PayPal Standard) cannot handle an order with multiple subscription products in the cart.

Are there any solutions that would work around this, without having to disable the PayPal option for checkout completely?

For example:
1. When a customer adds multiple subscription products to their cart, then tries to check out with PayPal, an error pops up telling them that only 1 can be purchased at a time. Also there could be some sort of message when they add the 2+ product to their account telling them that it wont work with paypal if they try to checkout.

2. When a customer adds multiple subscription products to their cart, THEN the paypal option is disabled (with a message up top explaining).

My motivation for the workaround is 90% of the customers will only purchase 1 subscription at a time, and to remove the PayPal option for this wouldn't be worth it. I hope there is a way, any ideas would be great!!

Comments

univate’s picture

Priority: Critical » Normal

It should already show a message that it will only process the first recurring fee.

But either of these could be implemented into the paypal code in uc_recurring. Since I don't use paypal myself, l'll leave this task for someone who does use paypal.

puravida’s picture

Hello,

Note: Paypal Express Checkout is not an option because it does not support recurring payments.

We are running in to the same roadblock (using 6.x-2.0-alpha4) as RikiB. The problem is that the message displayed at checkout is not enough. The scenario:

1. The user adds 2+ items to their cart (of which 2+ are recurring)
2. The user attempts to checkout and sees the message about recurring
3. The user will checkout anyway, make payment, and then expect that everything worked
4. Now we have a problem that we have only 1 item recurring, the rest are not, and we have to manually fix this situation (A lot of trouble and explanation that the buyer really doesn't care about)

Ideal solution: Implement full cart upload support for all recurring in the cart

Acceptable: Add support for #1 or #2 as proposed by RikiB (see original post)*

*We would prefer option #2 if the ideal solution is not possible. However, we do not have the time to make these changes. Is anyone out there available for these modifications? If so, we would be willing to sponsor the development and give back to the community. Thank you.

TO POTENTIALLY HELP OTHERS

I was unable to use Paypal WPS with my recurring payments because it would fail with something along the lines of: "we could not process your recurring payment." After much testing and fumbling around, I determined that this was caused by setting an item to recurring and then having the following set:

Store Administration -> Configuration -> Payment Settings -> Recurring Payments

>> Attempt to process recurring fees during checkout. [ CHECKED ]

>> Return a failed message and do not complete checkout. [ CHECKED ]

Hopefully that will helps others who run into this issue, because this default configuration causes an infinite loop and the error message is never seen until you go back to a drupal rendered page. By then, it is a bit unclear of whether it was a paypal problem, configuration issue, or a bug in the code.

Anyway, if you UNCHECK "Attempt to process recurring fees during checkout.", then you won't get that error anymore. It also did not affect my credit card method (Paypal WPP), so that was good.

Ciao,

The Brandon
http://www.shrinktheweb.com

puravida’s picture

We have posted a "job" for those that may be interested:

http://www.freelancer.com/projects/PHP-Drupal/Drupal-Ubercart-Paypal-WPS...

The feedback that I'm getting is that Paypal WPP (which we have and are using for Credit Cards) will also support Paypal account recurring subscriptions (just like WPS does). Can anyone confirm that? If so, how do we set that up in uc_recurring OR is that something in Ubercart? I see no way to use WPP for both types of payments (i.e. show a Paypal option and a CC option together using just WPP).

Thank you,

The Brandon

puravida’s picture

The previous freelancer we used did get us to a point of being able to process multiple recurring payments but it was a hack of the ubercart paypal module (to fix a bug for which the patch never got submitted) and it used Paypal EC to power the WPS back-end. So it wasn't a true WPS or a true Paypal EC solution. While it did work, it was very unstable and after an upgrade to alpha4 then alpha5, then 2.x-dev, we never did get it working again. We ended up just deploying with the current WPS support --which is limited to 1 recurring item per order.

We are funding development to hopefully address this limitation and have our new developer submit the patch. We will have him update this thread when it is ready.

TonyT’s picture

Component: Miscellaneous » Code
Category: support » bug
Status: Active » Needs review
StatusFileSize
new5.29 KB

This patch fixes a couple of bugs and adds an enhancement to allow multiple subscriptions if they are all for the same recurring schedule. It is not the general solution but it works for my usage case. The patch is against the 6.x-2.0-beta1 tag.

All the changes are in:
modules/uc_recurring/uc_recurring_hosted/uc_recurring_hosted.module

1. If a recurring payment was set up with just 2 payments, when the order was submitted to PayPal WPS PayPal reported an error that the request was illegal. Checking the PayPal spec at:
https://cms.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=devel...
indicates that PayPal requires srt to be greater than 1. The code was incorrectly setting the $data['src'] and $data['srt'] to 1 in this case. However, since there are no recurring additional payments it should set src to 0 and not set srt at all.

2. If the recurring product had a quantity other than 1 the recurring amount was incorrect. It needs to be multiplied by the qty to get the right amount to charge.

3. If there are multiple recurring products the code used to just take the first one. Changed so that all recurring products that match the recurring interval of the first one are combined. If there are non-matching recurring orders then the message is now an error (not a warning) and lists the products that need to be removed from the cart before submission. This is still not a complete solution but works for my case were all products have the same recurring parameters.

TonyT’s picture

Category: bug » feature
StatusFileSize
new5.89 KB

This patch extends the patch #5 by adding support for the uc_pma module. If the uc_pma module is installed to allow Payment Method Adjustments, it's settings are used for recurring payments through PayPal wpa since they too are payments being scheduled for the future. The initial payment will already be updated by uc_pma so does not need adjusting, just the recurring amount.

This code only works for PayPal wpa which is what I am using. Ideally it should apply to all the gateways supported by uc_recurring_hosted.module. It would probably make sense that uc_pma factor the code into a hook that other payment modules like uc_recurring_hosted.module can use.

Anyway thought I would share this as a starting point in case this is useful to others.