Free plugin: Change Existing Invoice Payment Method from admin

Discussion in 'Customization & add-ons' started by bfritton, May 3, 2013.

?

Did you install this plugin?

  1. Don't need it

    0 vote(s)
    0.0%
  2. Yes!

    0 vote(s)
    0.0%
  3. Saved it for later

    100.0%
  1. bfritton

    bfritton Certified aMember Developer

    Joined:
    Oct 26, 2009
    Messages:
    54
    I developed this small module today which I realized may be a big help to some of you aMember admins out there. It simply lets you (in a safe way) change an existing recurring invoice's payment method. For example, switching someone from offline billing to authorize.net's CIM module or between credit card processors, or even back to offline billing away from a credit card system.

    I've pasted the full description and instructions below. The plugin (with readme included) is attached. Here's a short video showing its use: http://bit.ly/16AEJ4R

    This only works with aMember v4. This is on github if you want to contribute: https://github.com/bfritton/amember-changepmtmethod-plugin

    Enjoy!

    README

    Simple module for allowing aMember admins to change an invoices payment method (for future payments)
    author: Brian Fritton <bfritton@gmail.com>
    copyright: GNU General Public License, version 3 (GPL-3.0)

    Description
    ------------
    This module adds an extra link to the list of recurring invoices next to "Next Rebill Date" and "Stop Recurring" links which shows the invoice's current payment method. Clicking on the payment method name will bring up a dialog box that allows you to type in the identifier of another payment system plugin to swith future payments for the invoice to. For example, if you have both Authorize.net CIM credit card and Offline payment methods, you can switch a user from being an offline-paying customer to being an automatically rebilling credit card customer, or the other way around.

    Older payments that are listed for the invoice will still list the payment system and receipt ID's, etc. of the old payment system. When the next future rebill date comes due, you'll see the payment on the new payment system listed. This makes it easy to see when the payment method was changed.

    Notes
    ------------
    1. The "Payment Method" link will only display if the invoice is a recurring invoice, just like "Next Rebill Date" and "Stop Recurring" only appear for recurring invoices.

    2. The module checks to see if the the user has a credit card on file in their account before changing the payment method if you are changing them to a credit card payment method. You will get an alert saying that the user does not have a credit card on file and that you need to enter one first.

    3. If you enter a payment system identifier that is not enabled or does not exist, you will get an alert saying that it didn't change the payment method and you need to enable the new method or check your entry.

    4. To find the desired payment method "identifier" that you must type into the dialog box, visit Admin -> Configuration -> Setup/Configuration -> Plugins. Under the "Payment Plugins" heading and dropdown, you will see the enabled payment method plugins under the select boxes with x's to the left of them. The identifier is the word (sometimes hyphenated) that is listed there. For example, the "Authorize.net CIM" payment method's identifier you would type in the change dialog would be "authorize-cim".


    Installation
    ------------
    1. FTP the application folder into your aMember root directory. This plugin does not override any existing aMember core files

    2. Visit Admin -> Configuration -> Setup/Configuration -> Plugins and in the first select box with the header "Enabled Plugins", select "utilities - A utilities module to make all other modules interact better together" and then click on the Save button. The only thing in this module is the small controller and supporting files that allow you to change the payment method.

    3. To see the link, you have to use the custom admin theme that comes along with this module. The only file in this custom admin theme is the file that shows the additional link in the admin user invoices section, nothing else will change about your admin interface. Go to Admin -> Configuration -> Setup/Configuration -> Global and change your "Admin Pages Theme" to "Enhanced" and then click on the Save button.

    NOTE: If you already have a custom admin theme, you'll have to place the application/default/themes-admin/enhanced/admin/user-invoices.phtml in your custom theme. Do not switch the theme away from your custom theme if you do this. 99% of people don't have a custom admin theme.

    That's it, you're done! Here is a short video showing you how to use the extension: http://bit.ly/16AEJ4R

    Feel free to email me with questions - Please put "aMember Payment method change module" in the subject line so you don't get marked as spam.

    Attached Files:

    alex likes this.
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Nice job, Brian!
    Much appreciated.
  3. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Awesome contribution. Looking forward to what you come up with next! :)

    David
    bfritton likes this.
  4. bfritton

    bfritton Certified aMember Developer

    Joined:
    Oct 26, 2009
    Messages:
    54
    I'm working on a webservice plugin for aMember -> Xero.com for automated accounting. Full scope of things - refunds and all that jazz with super simple installation. It will be paid but won't be much :) I'll make sure to throw some community goodies out as part of it as well.
  5. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Brian,
    we have a plugin for Xero implemented. PM me if you need a copy.

Share This Page