Paypal Listener

faros 25 Sep, 2014
Hi And thanks for this great component

I'm using the paypal redirect action and the Paypal Listener following what is explained in this http://www.chronoengine.com/faqs/57-cfv4/cfv4-actions/2583-how-to-use-the-paypal-redirect-action.html

I have a form which is used by chronoconnectivity to edit a record and in this form I' using the Paypal redirect to process a payment and the paypal linstener to send email on success and to update a field of my table.

Every thing works fine (I receive the emails) but the updating of the field,
In the ipn event under "Onverified" status of Paypal Listener I put a custom code with this inside:
<?php $form->data["cf_id"] = $form->data["custom"];
$form->data["RichiestaConsulenza"]["status"] = "Pagata" ?>

and after I put a db save, but it dont work

What is wrong? the "status" is never changed to "Pagata"

Thanks for your help
Fabrizio
GreyHead 25 Sep, 2014
Hi Fabrizio,

Where does $form->data['custom'] come from? Is that a value returned by PayPal. Are you sure that it is in the $form->data array?

Bob
faros 02 Oct, 2014
Hi Bob and thnks for you reply
at a more deeper look the status = Pagata is written in the db but on a new table row, so it mean that there is a problem with the cf_id but I cannot understand Where.
I set in the Paypal Redirect (in extra field) "custom=richiestaconsulenza_cf_id"
than in the paypal listener Osuccess Status I insert a Custom Code With this code inside:
<?php $form->data["cf_id"] = $form->data["custom"];
$form->data["richiestaconsulenza"]["status"] = "Pagata" ?>
Than a Db save action with this model ID: richiestaconsulenza

Thanks for you help
faros 02 Oct, 2014
Answer
Ok I found the error
it was in the custom code before the dbsave, where I wrote: <?php $form->data["cf_id"] = $form->data["custom"];
$form->data["richiestaconsulenza"]["status"] = "Pagata" ?>

Forgetting to add the data model ID
<?php $form->data["RichiestaConsulenza"]["cf_id"] = $form->data["custom"];
$form->data["richiestaconsulenza"]["status"] = "Pagata" ?>

Thanks a lot :-))
This topic is locked and no more replies can be posted.