• Resolved munaterai

    (@munaterai)


    Maybe you have answered this before, but I really could not find the information.

    I would like to give to the manual payment a link that updates the payment without having to be sitting checking each user.

    I explain myself, I currently have some activation buttons for free membership, so after acquiring the free membership, people are redirected to a page that asks them to ” Activate Membership “. and this is activated automatically without my intervention.

    I use this:
    $m_app = MS_Controller_Api::instance();
    $membership = $m_app->get_membership( $membership_id );
    $member = MS_Factory::load( ‘MS_Model_Member’, $user_id );
    if ( $member ) {
    //admin :: free 🙂 but you can replace it with the appropriate payment gateway
    $subscription = $member->add_membership( $membership->id, ‘admin’ );
    // Activate free memberships instantly. Not sure if this will be handy.
    if ( $membership->is_free() ) {
    $subscription->add_payment( 0, MS_Gateway_Free::ID, ‘free’ );
    }
    }

    I would like to do the same with the paid memberships. I do not use Paypal or the other systems that have the pluging, since in my country I could not charge that money. I use PAyU, PayU returns after the effective payment to a link that I assign. For this reason, I would like to be able to do the same thing that I do with the free membership.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘manual payments automatic update’ is closed to new replies.