Parse PayPal response to block user by payer_id

Discussion in 'Payments processing' started by zenpig66, Feb 7, 2012.

  1. zenpig66

    zenpig66 aMember Pro Customer

    Joined:
    Jan 1, 2009
    Messages:
    72
    Hello,
    This is for a subscription based web site where a user pays via PayPal and gains access to a forum after payment. There is a particularly "bent" individual who continually signs up after being banned/removed and the built-in ip blocker and email address blocker does not work against a user who is determined to circumvent this...ips are easy to get around and the multiple free email services out there make that near impossible. Instant access after payment is mandatory for the site and the only way I can see to prevent a user from gaining access is to parse the response from PayPal after payment is made and pull out something like the payer_id and deny account creation if it matches a blocked list of payer_ids. I can see this is in the data that is entered into the data field of the amember_payments table and really just want to know if there is a feasible way to check against payer_id before the account is automatically created on the forum.
    thanks for any help.
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Sure you can add such check to /amember/plugins/payment/paypal_r/paypal_r.inc.php where amember validate IPN message:
    function paypal_validate_ipn($vars){
    $vars is and array of incomming variables that are sent by paypal.
    In case of error, function should return error message.
    In this case, account will not be activated.

Share This Page