Events Made Easy Forums How do I … How to change the payment description (Mollie)

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #61166
    Anonymous
    Inactive

    Hi,

    I’m looking where to change the message that ends up in Mollie. Currently I see: “Member signup for fantasticmembership”. For administration purposes I would like to change that to something like “Membership signup for fantasticmembership from ‘startDate’ to ‘endDate’.

    Would that be possible?

    Kind regards,

    Michel

    #61167
    Franky
    Keymaster

    See the filter eme_member_paymentform_description_filter

    #61168
    Anonymous
    Inactive

    Okay thanks! That’s indeed what I need.

    Would it then be possible in php to get the start and end date of the new subscription? Would be nice, but if not I’ll just insert the current year. That would probibly be sufficient.

    I was just looking into the example in the documentation, but I’m not sure on how to get the current member_id and membership_id. Or can I use that code as is and is it looked up based on those strings?

    function my_eme_member_payment_descr($description,$payment,$gateway_name) {
    // $gateway_name is e.g. ‘mollie’, so you can change the description based on the gateway used if desired
    $member = eme_get_member($payment[‘member_id’]);
    $membership = eme_get_membership($member[‘membership_id’]);
    $person = eme_get_person($member[‘person_id’]);
    $description = …. // change this
    return $description;
    }
    add_filter(’eme_member_paymentform_description_filter’,’my_eme_member_payment_descr’,10,3);

    #61169
    Franky
    Keymaster

    The member and membership are looked up using that example. For more, something like this will help:

    $format="Membership signup for #_MEMBERSHIPNAME from #_MEMBERSTARTDATE till #_MEMBERENDDATE";
    $description = eme_replace_member_placeholders($format,$membership,$member);

    (use in $format your known/wanted member and membership placeholders).

    #61170
    Anonymous
    Inactive

    Thanks! I’ll try that tomorrow…it’s getting late again.

    #61182
    Anonymous
    Inactive

    I just did this and tried a test payment with Mollie:

    function my_eme_member_payment_descr($description,$payment,$gateway_name) {
    // $gateway_name is e.g. ‘mollie’, so you can change the description based on the gateway used if desired
    $member = eme_get_member($payment[‘member_id’]);
    $membership = eme_get_membership($member[‘membership_id’]);
    $person = eme_get_person($member[‘person_id’]);

    $format=”Membership signup for #_MEMBERSHIPNAME from #_MEMBERSTARTDATE till #_MEMBERENDDATE”;
    $description = eme_replace_member_placeholders($format,$membership,$member);

    return $description;
    }
    add_filter(’eme_member_paymentform_description_filter’,’my_eme_member_payment_descr’,10,3);

    but it returns:
    Membership signup for Regular membership from till

    so I gues the start and end date are not known.

    #61183
    Anonymous
    Inactive

    If I do this:

    print_r($member); die();

    inside the function I get:
    Array
    (
    [member_id] => 648
    [membership_id] => 1
    [person_id] => 642
    [status] => 0
    [status_automatic] => 1
    [creation_date] => 2020-05-12 20:56:39
    [modif_date] => 2020-05-12 20:56:39
    [start_date] => 0000-00-00
    [end_date] => 0000-00-00
    [reminder] => 0
    [reminder_date] => 0000-00-00 00:00:00
    [transfer_nbr_be97] => 000000004444
    [payment_id] => 44
    [payment_date] => 0000-00-00 00:00:00
    [paid] => 0
    [pg] =>
    [pg_pid] =>
    [extra_charge] => 0
    [discount] =>
    [discountid] => 0
    [dgroupid] => 0
    [renewal_count] => 0
    )

    so start end end date are there, but are not set.

    #61184
    Franky
    Keymaster

    Hmm … well, it is logical: I only calculate the start/end date after payment, not before …

    #61185
    Franky
    Keymaster

    This would help before the eme_replace_member_placeholders call:

                    if (empty($member['start_date']) || ($member['start_date']=='0000-00-00')) {
                            $member['start_date'] = eme_get_next_start_date($membership,$member);
                            $member['end_date'] = eme_get_next_end_date($membership,$member['start_date']);
                    }

    It’s not really ideal, but it works …

    #61190
    Anonymous
    Inactive

    Okay, I’ll use that.
    Thanks!

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top