is there a command to stop all recurring payments?

Discussion in 'Troubleshooting' started by ccwjames, May 8, 2016.

  1. ccwjames

    ccwjames Member

    Joined:
    Sep 11, 2014
    Messages:
    430
    i want to turn off all recurring payment as seen a bug in my script
    i want users to re pay as i have lost 400 ids in a txt file that was linked to my script.

    i could do it 1 by 1, but will take ages, wonder if some commands i can do?
  2. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    I am afraid there is not such featcure out of the box but I believe we can find some good solution for you. What is payment system you use?
  3. ccwjames

    ccwjames Member

    Joined:
    Sep 11, 2014
    Messages:
    430
    stripe, i would like my monthly subs to be auto cut off when money due and make them start a new order
  4. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    Sounds good. In case of stripe aMember trigger re bills so it is simple enough to cancel all recurring invoices at once with simple MySQL query. Here is query that you can use:
    Code:
    UPDATE
        am_invoice
    SET
        tm_cancelled = NOW(), rebill_date = NULL, status = 3
    WHERE
        paysys_id = 'stripe' AND status = 2;
    
  5. ccwjames

    ccwjames Member

    Joined:
    Sep 11, 2014
    Messages:
    430
    thanks, will advise coder
  6. ccwjames

    ccwjames Member

    Joined:
    Sep 11, 2014
    Messages:
    430
    ran today
    said
    Affected rows: 13 (Query took 0.0016 sec)

    i see on right the green recring is now, 0 so i guess done?
    SQL query:
    UPDATE am_invoice SET tm_cancelled = NOW( ) ,
    rebill_date = NULL ,
    STATUS =3 WHERE paysys_id = 'stripe' AND STATUS =2
  7. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    Yes, it looks correct.
  8. ccwjames

    ccwjames Member

    Joined:
    Sep 11, 2014
    Messages:
    430
    thanks, so for paypal, do i just change stripe to paypal? and run to remove all them?
  9. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    I am afraid not. In case of PayPal it is not possible to do from aMember database. PayPal server handle these subscriptions.
    So you need to cancel it on PayPal side.

    Best Regards.
  10. ccwjames

    ccwjames Member

    Joined:
    Sep 11, 2014
    Messages:
    430
    well i did the code and all paypal on server says cancelled in amember, will check paypal

Share This Page