Skip to content

Commit

Permalink
possible fix for corner case paypal issue, where unconfirmed addresse…
Browse files Browse the repository at this point in the history
…s would overwrite txn details with blank data
  • Loading branch information
pollen8 committed Nov 19, 2013
1 parent c470ff8 commit a5869fb
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions plugins/fabrik_form/paypal/paypal.php
Original file line number Diff line number Diff line change
Expand Up @@ -808,11 +808,15 @@ public function onIpn()
$set_array[] = "$set_field = $set_value";
}

$query->clear();
$query->update($table->db_table_name)
->set(implode(',', $set_array))
->where($table->db_primary_key . ' = ' . $db->quote($rowid));
$db->setQuery($query);
// Only update IPN storage if txn field and status set
if (!empty($ipn_txn_field) && !empty($ipn_status_field))
{
$query->clear();
$query->update($table->db_table_name)
->set(implode(',', $set_array))
->where($table->db_primary_key . ' = ' . $db->quote($rowid));
$db->setQuery($query);
}

if (!$db->execute())
{
Expand Down

0 comments on commit a5869fb

Please sign in to comment.