pronamic / wp-pronamic-pay-memberpress

MemberPress driver for the WordPress payment processing library.
http://www.wp-pay.org/extensions/memberpress/
4 stars 1 forks source link

Send 'Refunded' notices for charged back transaction #20

Closed rvdsteege closed 2 months ago

rvdsteege commented 3 months ago

For chargebacks we update the MemberPress transaction status to 'Refunded', but don't send the 'Refunded' notices:

https://github.com/pronamic/wp-pronamic-pay-memberpress/blob/4218e02826ab4ae3249aca3649a425ea5f4c97bd/src/Extension.php#L341-L380

In internal support ticket https://secure.helpscout.net/conversation/2642579484/27460 we received a question about informing site admins about these chargebacks:

Onlangs hebben we een refund gehad die terug te zien is in Mollie. Ook is deze te zien in de subscription en toen netjes on hold gegaan, dus dat deel van het proces is helemaal goed gegaan. Echter hebben wij in memberpress de optie aanstaan dat onze administratie een melding zou moeten krijgen bij een refund, deze hebben ze echter niet gehad en is ook niet uitgestuurd volgens de mail log die ik bijhoud.

Hoe kunnen we ervoor zorgen dat onze administratie in de toekomst wel een melding krijgt bij refunds? Er zitten namelijk wat handmatige acties aan onze meberships die tijdig gestopt moeten worden in het geval van het terugdraaien van een betaling.

I suggest also sending the notices (lines 376-379) for chargebacks. What do you think, @remcotolsma?

remcotolsma commented 3 months ago

Seems fine to me, can there be customer notices and are they also suitable to send in the case of chargebacks?

rvdsteege commented 3 months ago

Yes, there are customer and admin notices for refunds:

Scherm­afbeelding 2024-07-05 om 09 48 53 Scherm­afbeelding 2024-07-05 om 09 49 02
remcotolsma commented 2 months ago

We have probably disabled these notices for chargebacks, because a "Your Transaction Was Refunded" can also be seen as confirmation/approval of the chargeback. A customer can initiate a chargeback himself, but that does not always remove the obligation to pay. It will differ per MemberPress website how the administrators want to deal with this. There are a number of options in this regard:

  1. Also send the refunded notices in the event of a chargeback (see PR). Administrators can adjust the refund notice and mention something there about obligation to pay.
  2. Only send the notice for chargeback to administrators (MeprAdminRefundedTxnEmail): https://github.com/pronamic/memberpress/blob/aade7228d2300b4d1bdbdddd0f95ae11022008e8/app/lib/MeprUtils.php#L1579-L1591
  3. Introduce special chargeback notices settings. It is possible to introduce a custom email?

I will approve the PR for now, for any future issues we can consider option 2 or 3.