Paypal Buttons

Discussion in 'aMember Pro v.4' started by xindexer, May 2, 2012.

  1. xindexer

    xindexer Member

    Joined:
    Apr 17, 2011
    Messages:
    52
    I have set up pay now buttons for all of my products. I have put the paypal button code into the products page for each button. I'm assuming that in order to use these I need to manually create an invoice (since I'm bypassing the shopping cart altogether). Just want to make sure that I'm doing this correctly.

    PHP:
    $invoice Am_Di::getInstance()->invoiceRecord;
    $invoice->setUser(Am_Di::getInstance()->userTable->load($user_id));
    $invoice->add(Am_Di::getInstance()->productTable->load($product_id));
    $invoice->paysys_id "paypal";
    $invoice->calculate();
    $invoice->insert();
    Is that all I need to do?

    Thanks

Share This Page