Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MemberPress » Payment chargeback » Pronamic subscription on hold » Suspend (pause) MemberPress subscription #165

Closed
remcotolsma opened this issue Jun 24, 2021 · 7 comments
Assignees

Comments

@remcotolsma
Copy link
Member

In the event of a Mollie payment chargeback, we give the Pronamic Pay subscription the status on hold. This ensures that future direct debits do not continue.

https://github.com/wp-pay-gateways/mollie/blob/09c60fdfbab9eee85d58909da24c5b82d9ff51fe/src/Gateway.php#L734-L767

However, the MemberPress subscription remains active. Eventually the MemberPress subscription will expire, but it is probably clearer to suspend (pause) the MemberPress subscription directly in case of a chargeback.

For example, with an annual direct debit where a chargeback is made after 2 months, you do not want the customer to keep access for another 10 months.

MeprSubscriptionsCtrl->suspend_subscription()
https://gitlab.com/pronamic/memberpress/-/blob/1.2.4/app/controllers/MeprSubscriptionsCtrl.php#L147-160

MeprSubscription->suspend()
https://gitlab.com/pronamic/memberpress/-/blob/1.2.4/app/models/MeprSubscription.php#L1095-1107

MeprBaseGateway
https://gitlab.com/pronamic/memberpress/-/blob/1.2.4/app/lib/MeprBaseGateway.php#L184-186

@remcotolsma remcotolsma added enhancement feature: recurring-payments plugin: memberpress Label for MemberPress related content (memberpress.com). psp: mollie labels Jun 24, 2021
@remcotolsma
Copy link
Member Author

🤔 Note: MemberPress members may have the option to pause and resume subscriptions themselves:

Allow Members to Pause & Resume their own subscriptions

Pausing & Resuming Subscriptions
This option will only be available if this is enabled and the user purchased their subsciption using PayPal or Stripe.

https://gitlab.com/pronamic/memberpress/-/blob/1.2.4/app/views/admin/options/form.php#L158-168

What should happen if a chargeback results in a paused MemberPress subscription and the user clicks the 'Resume' link on his account page?

$pm->print_user_account_subscription_row_actions($s->ID);
https://gitlab.com/pronamic/memberpress/-/blob/1.2.4/app/views/account/subscriptions.php#L98

MeprBaseGateway->print_user_account_subscription_row_actions($sub_id)
https://gitlab.com/pronamic/memberpress/-/blob/1.2.4/app/lib/MeprBaseGateway.php#L332-340

@remcotolsma
Copy link
Member Author

Note from customer:

Indien een gebruiker een chargeback aanvraagt, komt de webhook succesvol binnen bij Pronamic. Alleen wordt dit niet correct gekoppeld aan Memberpress. Deze abonnementen blijven namelijk nog actief. Hetzelfde geldt voor gebruikers die een mislukte betaling hebben met creditcard en iDeal. Momenteel los ik dingen nu deels handmatig op maar ik zou dit graag geautomatiseerd willen hebben.

Internal HelpScout ticket: https://secure.helpscout.net/conversation/1501257614/22011?folderId=1425720

@rvdsteege Might it be better to give the MemberPress transaction, that is linked to the Pronamic Pay payment that receives a chargeback, the status 'refunded'?

A chargeback is also a kind of refund?

What is the difference between a chargeback and a refund?

A chargeback is initiated by the card holder and can (but doesn't have to) result in a return of funds. It's the bank's duty to determine whether such a request was reasonable.

A refund is a payment operation initiated by the merchant, it refers to a specific card transaction and allows to return the whole or part of the transaction amount.

https://paylane.com/support/faq/credit-card-processing/what-is-the-difference-between-a-chargeback-and-a-refund/

@rvdsteege
Copy link
Member

Might it be better to give the MemberPress transaction, that is linked to the Pronamic Pay payment that receives a chargeback, the status 'refunded'?

👍 However, we currently don't trigger an action when a chargeback for a payment occurs, so we would need to add 'some mechanism' to hook into the payment chargeback from the extension.

@remcotolsma
Copy link
Member Author

Just like amountRefunded we also require a amountChargedBack?

https://github.com/mollie/mollie-api-php/blob/ff22d7725a739e17eaba0e58bb9efcb8dbed9b05/src/Resources/Payment.php#L46-L72

https://docs.mollie.com/reference/v2/payments-api/get-payment

The total amount that was charged back for this payment. Only available when the total charged back amount is not zero.

@remcotolsma
Copy link
Member Author

Discussed at the office with @rvdsteege, question is whether we should add an extra property amountChargedBack to the payment. A good first step is to look at how other gateways deal with chargebacks, awaiting #170.

@rvdsteege
Copy link
Member

From customer:

Je zou verwachten dat wanneer een betaling niet lukt om wat voor reden dan ook, het membership niet wordt verlengd. Maar dat lijkt dus niet het geval?

Internal Help Scout ticket: https://secure.helpscout.net/conversation/1891085653/23973/

@remcotolsma how can we improve on this? I think we need to add the amountChargedBack to a payment and then update the MemberPress transaction status to 'Refunded' based on this amount (pausing a MemberPress subscription still gives access).

@rvdsteege
Copy link
Member

how can we improve on this?

Decided in #170 (comment) to keep track of the chargeback amount of a payment. We can then update the MemberPress transaction to 'Refunded' based on this amount.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants