[WMDE-Fundraising] Cancel membership application
Closed, ResolvedPublic15 Story Points

Description

POST request
Request model parameters:

  • back_form: URL/Form to go back to
  • rid: ID of the contact request (DB id from "request" table)

URL https://test.wikimedia.de/spenden/contact.php (with purpose=membership_delete in the POST request)

When the membership request is canceled, display the (translatable) message "Ihre Mitgliedschaft wurde storniert."

See "Storno" link at https://backend.wikimedia.de/wiki/index.php?title=Web:Spendenseite-HK2013/test/10h16_Mitgliedschaft_Best%C3%A4tigung

gabriel-wmde updated the task description. (Show Details)
gabriel-wmde raised the priority of this task from to Normal.
gabriel-wmde added a subscriber: gabriel-wmde.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 8 2016, 4:13 PM
gabriel-wmde updated the task description. (Show Details)Jan 8 2016, 4:17 PM
gabriel-wmde set Security to None.
gabriel-wmde edited a custom field.
JeroenDeDauw added a subscriber: JeroenDeDauw.EditedMar 13 2016, 2:38 AM

Is no update token required? I looked at the old code a bit and found some token references, though am not sure those code they are in is part of this UC.

gabriel-wmde renamed this task from [WMDE-Fundraising] Delete membership to [WMDE-Fundraising] Delete membership request.Mar 15 2016, 10:50 AM
gabriel-wmde updated the task description. (Show Details)

As already discussed, we should use the update token here. We can, of course, use the cookie that is already there.

JeroenDeDauw renamed this task from [WMDE-Fundraising] Delete membership request to [WMDE-Fundraising] Cancel membership application.Apr 6 2016, 12:47 AM
JeroenDeDauw added a comment.EditedApr 6 2016, 10:29 PM

Should the update token for membership applications expire like the Donation one does? Seems like there is no expiry field, by looking at https://github.com/wmde/FundraisingStore/files/88788/extDataUsage.zip.

Is there anything non-auth-related that needs to be checked when canceling a membership application? I'm asking about the equivalent of this code in Donation:

if ( $this->paymentType !== PaymentType::DIRECT_DEBIT ) {
	throw new RuntimeException( 'Can only cancel direct debit' );
}

if ( !$this->statusIsCancellable() ) {
	throw new RuntimeException( 'Can only cancel new donations' );
}

$this->status = self::STATUS_DELETED;

As far as I can see in the old code, the status field is updated, old_status is set in the data field, and a message is added to the data field log.

No further things to check. There currently are no other payment options apart from direct debit. I also think, we don't need an expiry here. On the other hand, if it makes reusing the AuthenticationService easier, let's add it.

As discussed on IRC, we can drop writing to old_status

JeroenDeDauw added a comment.EditedApr 20 2016, 4:49 PM

As of https://github.com/wmde/FundraisingFrontend/pull/338, this is done except for the presentation stuff:

  • Presenter for the response model
  • Template used for confirmation email

This is all done, right?

Oops... Sorry, I mistook this for the donation cancellation stuff. I'm going to finish the remaining tasks for this one.

kai.nissen closed this task as Resolved.