Custom Payment plugin without IPN

Discussion in 'Customization & add-ons' started by clickleaders, Oct 4, 2012.

  1. clickleaders

    clickleaders Member

    Joined:
    May 10, 2009
    Messages:
    38
    I'm new to amember and only have a little experience with Zend. I'm trying to create a custom plugin using the template in the Wiki (http://www.amember.com/docs/API/Paysystem). However, the payment system is not capable of returning an IPN response, so I need the Thanks page to also do the verification and updates. I looked at a lot of the other plugins, but it's still not clear to me how to achieve this. How do I modify the template to do this? Any advice would be greatly appreciated, including pointing me to one of the existing plugins that handles it exactly as I need to.
  2. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    With no IPN then you must be making accounts active manually so why not modify the 'Offline Payments' plugin?
  3. clickleaders

    clickleaders Member

    Joined:
    May 10, 2009
    Messages:
    38
    No, I don't want to activate manually. I want the 'Thank you' processing to both activate the account and display the Thanks page, since I only get one response, not two (confirm and IPN), back from the external payment system. Thanks.
  4. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Just replace line
    PHP:
    public function createTransaction(Am_Request $requestZend_Controller_Response_Http $response, array $invokeArgs) {
    to
    PHP:
    public function createThanksTransaction(Am_Request $requestZend_Controller_Response_Http $response, array $invokeArgs) { 
    That way aMember will handle URL http://example.com/amember/payment/yourplugin/thanks instead of
    http://example.com/amember/payment/yourplugin/ipn, and if transaction handled with no errors, standard aMember thanks page will be displayed.

    Look at the cashu plugin for example.
  5. clickleaders

    clickleaders Member

    Joined:
    May 10, 2009
    Messages:
    38
    Thanks, Alex, that worked after one tweak: There still has to be a createTransaction function or I get abstract class errors...I followed the cashu plugin example and created a dummy where I changed the name of my system (they used cachu instead of cashu for that function.)

Share This Page