-
Notifications
You must be signed in to change notification settings - Fork 14
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
Empty payment amount !=
payment status success
#188
Comments
I agree we need to improve on this. We'll be able to set payment method constraints (like minimum amount) with the updated Payment Methods API, which will resolve this issue. |
Further investigation shows that subscriptions for MemberPress memberships with an invalid initial amount for In the past, if the first payment failed, the subscription status was updated to Cancelled to prevent unintended reactivation of subscription (if a mandate would become available at a later time, for example if a new subscription had been started successfully by the same user). It seems this has been removed some time ago: Therefore, recurring payments are still created for these failed subscriptions and the recurring payments result in the "No suitable mandates found for customer" error. For a failed first payment, the subscription should be canceled or put on hold to prevent further payments for the invalid subscription. The error about the required minimum amount should already be sufficient to prevent creating invalid subscriptions, as we can assume this error will be noticed by users during setup testing. Thoughts, @remcotolsma? |
I think we should no longer create follow-up payments for subscriptions that have the In the case of a failed direct debit payment, Mollie almost always advises you to contact the customer:
https://help.mollie.com/hc/en-us/articles/115000309865-Why-did-my-direct-debit-payment-fail- It therefore does not seem desirable to me to initiate follow-up payments if something went wrong earlier. A problem can also arise when starting the follow-up payment with the payment provider: https://docs.mollie.com/overview/handling-errors You do not want the follow-up payments to be stopped completely with for example the following errors:
The follow-up payments that could not be started could be put in a queue. We could change https://github.com/wp-pay-gateways/mollie/blob/c17db2ffa9f9c14cf0b1ff6871c35f10bd1fa232/src/Gateway.php#L455-L456 to something like this: try {
$result = $this->client->create_payment( $request );
} catch { Exception $e ) {
if ( ! $payment->is_interactive() ) {
// Increase number attempts and add payment to retry queue.
return;
}
throw $e;
} Don't know if But for now i think the easiest thing to do is take out
|
… 'failed', see for more information pronamic/wp-pronamic-pay#188 (comment).
I checked how Gravity Forms handles an empty amount ( By default a payment amount is valid when the amount is greater than zero. Currently we bypass this check and also start a payment for an empty amount ( It is possible to initiate a payment via conditional logic only if the amount is greater than 0. However, for this you need to add a hidden number field with a calculation that can be used within the conditional logic. We could advice users to setup their forms this way if they don't want to trigger the payment feed for payments of But this change will likely result in some support tickets. |
Currently we give all payments with an empty (
€ 0
) amount the status success and return early so the payment is not started at the gateway: https://github.com/pronamic/wp-pay-core/blob/develop/src/Plugin.php#L1025-L1045.This seems less convenient because subscriptions may include a free first period (trial), but with some payment methods / gateways a minimum payment is required to obtain a mandate.
This is the case for a recurring direct debit payment where a mandate is obtained via a first iDEAL payment. Certain gateways must have the chance to throw an exception in that case.
It would be great if the Mollie gateway could throw an exception in case of an
€ 0
payment for the 'Direct Debit mandate via iDEAL payment method' (DIRECT_DEBIT_IDEAL
).https://help.mollie.com/hc/nl/articles/214072489-Hoe-verkrijg-ik-een-mandaat-van-mijn-klant-customer-voor-Recurring-
I also noted a
$maybe_tokenize
variable introduced in pronamic/wp-pay-core@8d90f0d that may also be related to this.Internal HelpScout ticket: https://secure.helpscout.net/conversation/1604745461/22551?folderId=1425710
The text was updated successfully, but these errors were encountered: