Issue paypal form plugin

ousao

Member
Hello, I noticed that when I use aa IPN php file. The IPN Elements are not updated in my database. But when I don't use an IPN php file, my elements are stored correctly. I used the IPN example php file and I added email sending to it (that works). Can you please help?
1- Do I need to add something to my phph file so that data is stored??
2- How can I update a fabrik element using the php file ??
I tried some codes like:

$formModel->data['table___element']='3';

and some code like this:

// Get a db connection.
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
// Insert columns.
$columns = array('fieldA', 'FieldB');
// Insert values.
$values = array('1', '2');

But it doesn't work
upload_2016-1-3_16-36-53.png
 
The built in IPN handling should be run whether there is a custom IPN handler or not.

The most likely explanation is that there is an error in your custom handler, which could be happening after you send the mail.

Have you checked the fabrik log table for clues?

Are you returning 'ok' from your function?

-- hugh
 
Yes I am returning 'ok'. And on my Fabrik table:

upload_2016-1-7_13-37-3.png

Also I was wondering if I can update a form element value after payment with another value using the php file ?
 
If the last log you get is a fabrik.ipn.start, then the IPN processing is definitely erroring out. The last log entry should be a fabrik.paypal.ipn.Completed. Which means that your code is almost certainly erroring out.

Suggest you do a full update from github, as I just committed some improvements to the logging. That may help.

Then figure out how to get at your web server's main PHP error logs, and see if you can find anything informative in there.

-- hugh
 
Last edited:
Also I was wondering if I can update a form element value after payment with another value using the php file ?

Yes. See the comments at the start of the example custom IPN handler. So basically ...

Code:
    function payment_status_Completed($listModel, $request, &$set_list, &$err_msg) {
            $set_list['your_field'] = 'some value';
            return 'ok';
    }

Note that the field names are the actual table field names, not the "full" Fabrik element names. So 'your_field', not 'your_table___your_field'.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top