Custom Payment plugin - NAB transact

Discussion in 'Customization & add-ons' started by glyn_szasz, May 21, 2013.

  1. glyn_szasz

    glyn_szasz New Member

    Feb 4, 2013
    I am awfully confused and getting a little out of depth and probably just need a prod in the right direction. I need to integrate NAB transact into aMember.
    Going through the documentation you need to add a number of hidden fields to your form which I can do via a HTML text brick within the form editor. These hidden fields look like:
    <input type="hidden" name="refund_policy" value="">
    <input type="hidden" name="privacy_policy" value="">
    <input type="hidden" name="information_fields" value="name_f,name_l,company,email">
    <input type="hidden" name="receipt_address" value="<<email>>">
    <input type="hidden" name="print_zero_qty" value="FALSE">
    <input type="hidden" name="get_added" value="true">
    Once the form is processed it needs to be sent to "".
    So my plugin looks like the below so far:
    class Am_Paysystem_NAB extends Am_Paysystem_Abstract
    PLUGIN_STATUS self::STATUS_DEV// do not add plugin into production build
    const PLUGIN_REVISION '0.01'// auto-replaced with production version
    const URL ''// test payment url
    protected $defaultTitle 'NAB - credit card payment';
    $defaultDescription 'purchase using MasterCard or Visa';
    // here you add elements to HTML_QuickForm2 form with
        // parameters necessary to configure your form
        // saved parameters are available with $this->getConfig('paramname')
        // api call in other plugin functions 
    public function _initSetupForm(Am_Form_Setup $form)
    /// now lets write payment redirect function
    public function _process(Invoice $invoiceAm_Request $requestAm_Paysystem_Result $result)
    $a = new Am_Paysystem_Action_Redirect(self::URL);
    // let aMember know how this plugin is going to deal with recurring payments
    public function getRecurringType()
        public function 
    return <<<CUT
        My payment plugin readme
    Readme instructions here....
        public function 
    createTransaction(Am_Request $requestZend_Controller_Response_Http $response, array $invokeArgs)
            return new 
    Where am I going wrong? I am hoping that the user will select the NAB payment button then click on the Next button and be taken to the NAB credit card payment page. Once the button is clicked the relevent fields of the form are sent via POST to NAB.

    Any advice is gratefully accepted. I apologise if I have posted this in the wrong area.

    Thanks in advance.

Share This Page