I'll be using this with Pay Pal Standard's recurring fees.

Is there a way for the next recurring fee to be reduced? I'd very much like to include uc_userpoints. I'm hoping cron can be used to fire off the necessary to PayPal to modify the next payment and deduct the associated userpoints.

Happy to fund this work as required within the next few months. Please PM.

Comments

univate’s picture

Paypal standard subscriptions do not allow a whole lot of flexibility when it comes to modifying/changing the amount/interval of a payment. I would be happy to look into this for you - I will send you a PM to discuss your specific project.

dunx’s picture

The WPP Integration Guide says you can only increase the payment by 20% once in each 180 day period. No such comment in the WPS guide and it's not what I want anyway.

The easiest method may be to cancel the user's existing subscription just before renewal and immediately set up a new recurring subscription with an initial trial period with the userpoints deducted followed by recurring regular payments.

In this case an initial free year would be possible, but UC would still need to know that the membership, although costing £0 still has to go through PayPal to set up the recurring parts.

P.S. uc_userpoints is not available for D6/UC2, but userpoints_ubercart is or soon will be.

univate’s picture

There is an operation to perform a "modify" operation on a subscription and you can change anything about the subscription I believe, but it must be initiated by the user, not the merchant. And is designed to allow users to upgrade or downgrade a subscription.

So I would propose for your problem adding a "button/link" in your members area that the users needs to click on when they have built up enought user points to be credited to their subscription. This directs the user to paypal to confirm the change (which would just need to be a change in the next renewal date).

dunx’s picture

That method has its benefits as some users might forget to do it and we'll get the cash!

I presume you can restrict what they change through this modify operation, else people would log in arbitrarily and change dates and prices?

I have only started playing with Drupal, but pressing this button would need some way of tracking the changes the user has made and then deducting the userpoints. I know we're straying from uc_recurring here, but is this possible or would I end up writing a module just to handle this in which case the cancel/create new "recurring payments with initial discount" using uc_recurring and initiated through cron would be a much cleaner method.

univate’s picture

But you can't cancel and create a new recurring subscription without the user. You can cancel the subscription (actually I've only done that manually), but to create a new subscription you need to the user to log into their account and agree to the new terms. Which is in theory what the "modify" operation is doing - but in one step rather then two (cancel/resubscribe)

The think with paypal (at least for WPS) the user is in control of what they purchase and are charged, thats why there is that maximum 20% change in 18month thing. I assume Paypal doesn't want you just charging what every want to users.

On the other hand there is Paypal's WPP and that is more flexible with that you can do/change - probably because you have to have provided more details to paypal about who you are (and there is less change you can charge people what every you want and just run away with the money).

dunx’s picture

Agreed, I'd realised you can't simply create a new subscription on the fly after I'd posted that.

I asked the question in the PDNCommunity website and apparently you can decrease the amount:

http://www.pdncommunity.com/pdn/board/message?board.id=basicpayments&thr...

I trawled the documents referenced there and couldn't see anything obvious, although the APIs do allow you to change the AMT, but not on the face of it for just the next payment.

So... applying userpoints to the purchase of a new membership is easy.

A fall back solution is to not allow the purchase of memberships for members who will renew automatically. IPN can be used to change their status from "auto-renewing" to "expiring" or something. Does uc_recurring handle a cancellation via IPN?

Then, if they cancel their membership themselves I can allow them to renew manually as if they were creating a new membership, so they can apply their userpoints or uc_coupon.

I would need to manage their renewal date as I wouldn't want the memberships overlapping. Is that possible? Perhaps as a calculated non-editable product attribute, which defines when the new membership would start.

Complicated isn't it? Perhaps I simply don't allow people to apply their userpoints to memberships and have done with it!

P.S. Got your email univate and will consider. Want the threads to run for a while so I can work through things in my head.

univate’s picture

Status: Active » Fixed

I think this is best solved in a separate module that hooks into the renewal process and can check on user point or any other reward type systems and changes the amount for that recurring fee. That would only end up being possible if you where using a gateway that accepts different amounts on each renewal period.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.