artfulrobot / uk.artfulrobot.civicrm.gocardless

A CiviCRM extension providing GoCardless integration to handle UK Direct Debits.
GNU Affero General Public License v3.0
5 stars 18 forks source link

New direct debit mandate/subscription creates an active membership #28

Closed Upperholme closed 5 years ago

Upperholme commented 6 years ago

When a user sets up a new direct debit mandate Civi creates a contribution record with a 'pending (incomplete transaction)' status. If the contribution is for a membership, then a matching membership record is created. This membership should also have a pending status. However in my tests, using Civi 4.7.29 on Wordpress, the membership is created with a 'New' status.

So, when the first payment is made, instead of activating the pending membership, the membership is in fact renewed.

I realise that this may be a CiviContribute issue and not a result of anything that this extension is doing, but wanted to log it here to find out if any other users of this extension are seeing the same thing, and also to raise awareness of it here.

Upperholme commented 6 years ago

Using the same site, if I sign-up to a membership using the 'pay later' option, the contribution record is created with status 'pending - pay later', and the membership is created with status 'pending'.

Just testing with Paypal website payments standards as well. Will report back.

Upperholme commented 6 years ago

With Paypal website payments standard, buying an auto-renew membership, the contribution record is created and as I write has status 'pending (incomplete transaction)'. Looking at the Paypal sandbox account I can see that IPN messages are queued, but not sending, so maybe there's a temp issue at their end. Anyway, the membership is behaving itself, as the record is created and has status 'pending'.

So, from these tests it appears that Civi is doing what it is supposed to with the exception of the membership created as a result of the GoCardless process, where, although the contribution record status is 'pending (incomplete transaction)', the linked membership has status 'New', which is wrong.

I'm wondering whether the GoCardless extension is somehow giving inaccurate information to Civi when the mandate is created?

artfulrobot commented 6 years ago

Thanks for your work, @Upperholme I will look at the paypal implementation to see if I'm doing anything different there. I'm super stretched at the mo so can't promise a quick response though. As ever, PRs from anyone are v. welcome.

Upperholme commented 6 years ago

Anything I can usefully do to try to move this along? We're keeping a close eye on membership renewal and sign-ups and managing things manually so as to not let this issue and #27 mess things up, but it's a faff we could well live without. I'll take a look to see if i can understand more closely what's going on and where it might be going wrong. Any pointers most welcome.

artfulrobot commented 6 years ago

Hi, are you able to try this patch https://github.com/artfulrobot/uk.artfulrobot.civicrm.gocardless/commit/b839d443bfd4dc067eb1a5265883dc00c0d46652?

Upperholme commented 6 years ago

Thanks. I'll check it out later today and feed back.

artfulrobot commented 6 years ago

@Upperholme any progress?

artfulrobot commented 5 years ago

@Upperholme bump

artfulrobot commented 5 years ago

The changes I introduced here are removed by https://github.com/artfulrobot/uk.artfulrobot.civicrm.gocardless/pull/44 But I'm hoping that that PR will also fix this issue.

artfulrobot commented 5 years ago

We believe this issue is closed thanks to PR #44