Saving data to existing records

davidvm 24 Sep, 2010
Hi,

Does anybody knows how to populate some data back into an existing db record created by Chronoforms? I'm using the redirect plugin to send the user to a payment processor page to pay, but I would like to save the transaction results along with the user's data collected first with CF, once they are back at our site after the transaction. The payment processor sends back a lot of info regarding the transaction, but I don't know how to put that into the database along with the user's information, or maybe put it into a new db, if the above cannot be done. Any code or method that would do this would be greatly appreciated. Thanks for any help received!

Dave.
GreyHead 24 Sep, 2010
Hi Dave,

You need to pass a record identifier to the Payment Processor. This could be the Primary key of the record, or something unique that will let you look up the primary key like an invoice number.

Then you can use the Joomla! bind/store code to update the record. The basic code for this is in the Autogenerated code box of any form with a DB Connection*. It's a bit more complicated to do it without using a DB Connection but not too bad. I'm too tired to try to explain it all now but could have a go over the week-end if needed.

Bob

* This is explained in more detail in Chapter 4 of The ChronoForms Book
davidvm 25 Sep, 2010
Thanks a lot Bob!

Actually that would be very much appreciated. I do have an identifier, but have no clue about how to proceed with the second part.

Dave.
GreyHead 28 Sep, 2010
Hi Dave,

Just posted a first version here

Bob
This topic is locked and no more replies can be posted.