Integration API

Stergios
Stergios
Offline
0
I would like to integrate my own custom cart component with the Invoices... I can't find some code example.

So aftter order to add an unpaid invoice to your component and redirect them to payment gateway list

Also I would like to know if it's possible to add (extend) my own payment gateways like Eurobank Greece

Accepted Answer

Tuesday, December 16 2014, 07:19 PM - #Permalink
0
yes there's a small file addition you can add to create the invoice. You can look at that particular code on our current existing integration plugins
The reply is currently minimized Show
Responses (14)
  • Accepted Answer

    Sunday, January 04 2015, 11:36 AM - #Permalink
    0
    I understand (that's what I was saying! ;)

    yes, we can definitely look into this and add some events in the next version of IM. We were already thinking on firing some events :)
    The reply is currently minimized Show
  • Accepted Answer

    Stergios
    Stergios
    Offline
    Saturday, January 03 2015, 02:48 PM - #Permalink
    0
    Please focus on my example

    I have an unpaid invoice, if status of invoice turned to "paid" (or to other status) for example when paypal notifies back the component and sets the invoice to paid or EVEN manually marked as paid, it should fire an event! That's all because I need to know that.

    In other words, if you look on line 103 of paypali plugin
    $this->update_payment($payment);

    should fire a NEW event

    JPluginHelper::importPlugin('System');
    $dispatcher = JEventDispatcher::getInstance();
    $results = $dispatcher->trigger( 'oninvoicestatuschange', array( &$payment,$this->_payment_type) );
    $this->update_payment($payment);


    All that I'm asking is to fire the new even ON INVOICE STATUS CHANGE (via notify or manual). I don't want to add it myself because everytime is need to apply the changes.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, January 02 2015, 04:57 PM - #Permalink
    0
    Hello!
    Happy new year.

    I'm not quite sure I understand your question...

    I can see you have added a custom plugin fire event inside the update_payment function, which is perfectly good. What is your question, in that case? if we are going to add this into our plugins? (sorry I didn't understand..)
    The reply is currently minimized Show
  • Accepted Answer

    Stergios
    Stergios
    Offline
    Friday, January 02 2015, 02:54 PM - #Permalink
    0
    Do you plan to support some events on your component ? Or I' m losing my time?
    The reply is currently minimized Show
  • Accepted Answer

    Stergios
    Stergios
    Offline
    Wednesday, December 31 2014, 11:21 AM - #Permalink
    0
    I understand what you said but in this way I can't catch the "statusChange" because for example Paypal will change the invoice from Pending to Paid in the Invoice Manager. This event should be fired inside the payment " function update_payment($payment)" plugin.

    My component only sumbits a form that creates the invoice to your component firing a custom plugin event fraudvoiceNeworder()

    Example:

    function update_payment($payment){
    JPluginHelper::importPlugin('System');
    $dispatcher = JEventDispatcher::getInstance();
    $results = $dispatcher->trigger( 'oninvoicestatuschange', array( &$payment) );
    $db = JFactory::getDBO();

    $query = ' UPDATE #__invoices_payments SET '.
    ' payment_type = "'.$payment->payment_type.'", '.
    ' payment_datetime = NOW(), '.
    ' payment_details = "'.$payment->payment_details.'", '.
    ' payment_status = '.$payment->payment_status.' '.
    ' WHERE id = '.$payment->id .
    ' LIMIT 1 ';

    $db->setQuery($query);
    $db->query();

    }


    Do you understand?
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, December 30 2014, 11:40 AM - #Permalink
    0
    There's no event on this, you will have to "create" it. What I mean is that you need to define this trigger in your component, and then just add this function into the new plugin you're writing for Invoice Manager. do you know what i mean?

    Our component does not check EU VAT ID validity at any point. if you want this, it needs to be created as well..
    The reply is currently minimized Show
  • Accepted Answer

    Stergios
    Stergios
    Offline
    Monday, December 29 2014, 06:26 PM - #Permalink
    0
    I'm using your component to create unpaid invoice, if are paid via any gateway and status changes from unpaid to paid THEN (only then) it will get the next Real Invoice number, so I'm trying to trigger the event statusChange to able to update the sequence invoice number but I can't find any event on this. Please help!

    Second question is about EU transactions. I should add extra code for the the VAT ID vadility if your component it checks uppon invoice creation?
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, December 18 2014, 06:38 PM - #Permalink
    0
    Contacts are edited only in the backend, not frontend!
    The reply is currently minimized Show
  • Accepted Answer

    Stergios
    Stergios
    Offline
    Thursday, December 18 2014, 01:11 PM - #Permalink
    0
    I'm wondering why linked contacts can't edited from front-end logged J! user.... There is not such view menu or link somewhere to achive this
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, December 17 2014, 10:15 AM - #Permalink
    0
    Sorry about this, sometimes the verification server fails. I have created an invoice for you without the VAT: http://www.joomlathat.com/index.php?option=com_invoices&view=invoice&id=22736
    The reply is currently minimized Show
  • Accepted Answer

    Stergios
    Stergios
    Offline
    Wednesday, December 17 2014, 10:05 AM - #Permalink
    0
    Also my EU VAT ID is not recongnized on checkout... EL048313748 if fill only th 048313748 but says invalid

    Thanks for help!
    The reply is currently minimized Show
  • Accepted Answer

    Stergios
    Stergios
    Offline
    Wednesday, December 17 2014, 10:00 AM - #Permalink
    0
    Yes in case that I will buy the first plan http://www.joomlathat.com/store/invoice-manager/3-0 I don't have the files to check it. Also I as understand there is not specific documentation. Can you send me after payment an example of integration plugin?
    The reply is currently minimized Show
  • Accepted Answer

    Stergios
    Stergios
    Offline
    Tuesday, December 16 2014, 07:07 PM - #Permalink
    0
    Please reply on the fist part, are there any files to include (and call a function probably that calculates the tax,subtotal etc) in my component to able to create invoices? or just I will add them via sql query (and to have already calculate the vat or check the VAT ID)
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, December 16 2014, 06:58 PM - #Permalink
    0
    You can create your own payment plugin, yes, but we don't have any API documents for it (although it's pretty simple, you can just look at our current plugins code). Same for the integration with your component.
    The reply is currently minimized Show
Your Reply