How to handle suspensions and failed payments.

Discussion in 'Troubleshooting' started by ctpalmer2, May 18, 2017.

  1. ctpalmer2

    ctpalmer2 aMember Pro Customer

    Joined:
    Dec 23, 2013
    Messages:
    11
    I am using BrainTree payments and First Data on my site. When a customer's card is declined due to insufficient funds and can't pay their recurring monthly subscription how does amember know to suspend the account or deny access? Also is there a way to set it up for 3x attempts before suspension?
  2. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,064
    Hello,

    aMember see these errors and revoke access if necessary. Do not worry about it.

    You can configure option "Re attempt on failure" within payment plugin configuration ie:
    aMember CP -> Configuration -> Setup/Configuration -> First Data
    aMember CP -> Configuration -> Setup/Configuration -> Brain Tree


    Best Regards.
  3. ctpalmer2

    ctpalmer2 aMember Pro Customer

    Joined:
    Dec 23, 2013
    Messages:
    11
    Is there a way I can build a webhook or see in mysql when someones account has been suspended so I can trigger it to suspend on other platforms?
  4. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,064
    Do you mean when user subscription expired?

    In this case you can use this hook:

    PHP:
    Am_Di::getInstance()->hook->add(Am_Event::SUBSCRIPTION_DELETED, function(Am_Event $e) {
        
    /** @var User $user */
        
    $user $e->getUser();
        
    /** @var Product $product */
        
    $product $e->getProduct();
    });
    You can put this code to site.php:
    https://www.amember.com/docs/Site.php_file

Share This Page