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

Change payment method / mandate description #61

Open
remcotolsma opened this issue Oct 24, 2023 · 1 comment
Open

Change payment method / mandate description #61

remcotolsma opened this issue Oct 24, 2023 · 1 comment

Comments

@remcotolsma
Copy link
Member

We have added support for the WooCommerce Subscriptions payment method change feature:

// Set Mollie sequence type on payment method change.
if ( \did_action( 'woocommerce_subscription_change_payment_method_via_pay_shortcode' ) ) {
$payment->set_meta( 'mollie_sequence_type', 'first' );
/**
* Use payment method minimum amount for verification payment.
*
* @link https://help.mollie.com/hc/en-us/articles/115000667365-What-are-the-minimum-and-maximum-amounts-per-payment-method-
* @link https://github.com/pronamic/wp-pronamic-pay-woocommerce/issues/51
*/
$total_amount = $payment->get_total_amount();
if ( $total_amount->is_zero() ) {
switch ( $payment->get_payment_method() ) {
case PaymentMethods::BANCONTACT:
case PaymentMethods::DIRECT_DEBIT_BANCONTACT:
$amount = 0.02;
break;
case PaymentMethods::DIRECT_DEBIT_SOFORT:
case PaymentMethods::SOFORT:
$amount = 0.10;
break;
case PaymentMethods::APPLE_PAY:
case PaymentMethods::CREDIT_CARD:
case PaymentMethods::PAYPAL:
$amount = 0.00;
break;
default:
$amount = 0.01;
}
$total_amount = new Money( $amount, $total_amount->get_currency() );
$payment->set_total_amount( $total_amount );
}
}

Currently the Mollie payment description is something like "Order #1359":

Scherm­afbeelding 2023-10-24 om 10 37 03

This is confusing when entering the payment into an accounting program, because it is not in fact a payment for an order. There is usually no invoice available for these micro payments. It would be nicer/better if it said something like "change payment method for order X" or something like that. In addition, the customer pays € 0.01, but the transaction costs € 0.29. The current minimum amounts are fixed in the code, but it might be desirable to make this adjustable?

CC @rvdsteege

@rvdsteege
Copy link
Member

Would "change payment method for order X" be a fixed text as in Payment method change for {subscription_description} or configurable (if so, how/where?). I think fixed is fine in this case (decisions, not options).

In addition, the customer pays € 0.01, but the transaction costs € 0.29. The current minimum amounts are fixed in the code, but it might be desirable to make this adjustable?

Hmm, wouldn't it be kind of strange if customers are charged for changing their payment method? The € 0,01 is out of necessity. Such a setting would apply for all payment methods regardless of their minimum amount, so for example an advanced setting 'Subscription payment method update amount' or could this be a filter (we will then need to use the highest of the payment method minimum amount and the filtered amount)?

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

No branches or pull requests

2 participants