Feew... a litle more question.
I've a DB Save and I read DB Save can update a record if is present in a table.
Ok but how write condition? I must use Model ID or not?
IPN event retur this data
Array ( [option] => com_chronoforms5 [chronoform] => prova [event] => ipn [mc_gross] => 4.50 [protection_eligibility] => Ineligible [payer_id] => SKACLJDM6843C [tax] => 0.00 [payment_date] => 08:16:49 Feb 02, 2015 PST [payment_status] => Completed [charset] => windows-1252 [first_name] => Test [mc_fee] => 0.50 [notify_version] => 3.8 [custom] => 26 [payer_status] => verified [business] => alfaomega.daniele-facilitator@gmail.com [quantity] => 1 [verify_sign] => AzDbX6DBXz0rIeAstAWkjdcXsjPZAg7KuRaOVB8wiTaEUYdTc-My.K5z [payer_email] => alfaomega.daniele-buyer@gmail.com [txn_id] => 2B494636AF508163U [payment_type] => instant [last_name] => Buyer [receiver_email] => alfaomega.daniele-facilitator@gmail.com [payment_fee] => [receiver_id] => DDLASSMP2XPH4 [txn_type] => web_accept [item_name] => kjljkoj [mc_currency] => EUR [item_number] => [residence_country] => IT [test_ipn] => 1 [handling_amount] => 0.00 [transaction_subject] => 26 [payment_gross] => [shipping] => 0.00 [ipn_track_id] => ff3dfd1c1c21e [ip_address] => 173.0.82.126 [Data] => Array ( [id] => 26 [uniq_id] => 0d050b7f87eda82c692984342e126f0bde5d8c3d [user_id] => 0 [created] => 2015-02-02 17:11:19 [modified] => [nome] => kjljkoj [email] => alfaomega.daniele@gmail.com [quantita] => 1 [amount] => 1.5 [statopagamento] => ) [id] => 26 [statopagamento] => OK )
The last two params is ID for record and the field statopagamento is what needs to be updated.
I must use custom code?
Now in the Update conditions of DB Save in IPN verified event I've this code:
<?php
$form->data["id"] = $form->data["custom"];//custom contain id value from db.
$form->data["statopagamento"] = "OK";
but don't work never.
I tried also:
id = $form->data["custom"];
statopagamento = "OK";
don't work.
š š¢
I've a DB Save and I read DB Save can update a record if is present in a table.
Ok but how write condition? I must use Model ID or not?
IPN event retur this data
Array ( [option] => com_chronoforms5 [chronoform] => prova [event] => ipn [mc_gross] => 4.50 [protection_eligibility] => Ineligible [payer_id] => SKACLJDM6843C [tax] => 0.00 [payment_date] => 08:16:49 Feb 02, 2015 PST [payment_status] => Completed [charset] => windows-1252 [first_name] => Test [mc_fee] => 0.50 [notify_version] => 3.8 [custom] => 26 [payer_status] => verified [business] => alfaomega.daniele-facilitator@gmail.com [quantity] => 1 [verify_sign] => AzDbX6DBXz0rIeAstAWkjdcXsjPZAg7KuRaOVB8wiTaEUYdTc-My.K5z [payer_email] => alfaomega.daniele-buyer@gmail.com [txn_id] => 2B494636AF508163U [payment_type] => instant [last_name] => Buyer [receiver_email] => alfaomega.daniele-facilitator@gmail.com [payment_fee] => [receiver_id] => DDLASSMP2XPH4 [txn_type] => web_accept [item_name] => kjljkoj [mc_currency] => EUR [item_number] => [residence_country] => IT [test_ipn] => 1 [handling_amount] => 0.00 [transaction_subject] => 26 [payment_gross] => [shipping] => 0.00 [ipn_track_id] => ff3dfd1c1c21e [ip_address] => 173.0.82.126 [Data] => Array ( [id] => 26 [uniq_id] => 0d050b7f87eda82c692984342e126f0bde5d8c3d [user_id] => 0 [created] => 2015-02-02 17:11:19 [modified] => [nome] => kjljkoj [email] => alfaomega.daniele@gmail.com [quantita] => 1 [amount] => 1.5 [statopagamento] => ) [id] => 26 [statopagamento] => OK )
The last two params is ID for record and the field statopagamento is what needs to be updated.
I must use custom code?
Now in the Update conditions of DB Save in IPN verified event I've this code:
<?php
$form->data["id"] = $form->data["custom"];//custom contain id value from db.
$form->data["statopagamento"] = "OK";
but don't work never.
I tried also:
id = $form->data["custom"];
statopagamento = "OK";
don't work.
š š¢