1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Jobs] Looking for someone who can code a plugin for membership

Discussion in 'Requests for Paid Services' started by amrik, Jun 9, 2012.

  1. amrik

    amrik New Member

    I am looking for someone who can make a membership plugin. So I can charge for extra service like "featured post" and automatic RSS syndication etc.
    I hope someone reply soon.
  2. blinger187

    blinger187 New Member

    great idea! paypal for featured post would be nice. payment options for length of feature, etc.
  3. valMETNG

    valMETNG Administrator Staff Member Admin

    Should be very straight-forward

    These are exactly some of the things I had in mind with the Paypal plugin. The core purchasing functionality is there, so it's really now just a matter of changing 2 pieces: 1) what services are you charging for (to put into the template) and; 2) once the payment comes back confirmed, doing the extra service, the code for which you will find in PaypalFunctions.php:

    // add any other variables you want to send to the paymentComplete function
    $upgrade_vars = array("user_id" => $user_id, "user_role" => "admin", "user_permissions" => 'a:1:{s:16:"can_access_admin";s:3:"yes";}');
    // as we got paid, we can now do whatever the user paid us for
    $this->paymentComplete($h, $upgrade_vars);
    /* Payment to us is validated so upgrade membership
    function paymentComplete($h, $upgrade_vars)
    	// whatever the user just paid to do goes here
    	// this is an example of upgrading the user to an admin
    	$sql = "UPDATE " . DB_PREFIX . "users SET user_role = %s, user_permissions = %s WHERE user_id = %d";
    	$h->db->query($h->db->prepare($sql, $upgrade_vars['user_role'], $upgrade_vars['user_permissions'], $upgrade_vars['user_id']));
    Graeme, shibuya246 and angolanmade like this.
  4. anjaliaroha

    anjaliaroha New Member

    Last edited by a moderator: Apr 13, 2014

Share This Page