Added Crazydomains and fixed payment updates

This commit is contained in:
Deon George
2014-06-24 14:38:39 +10:00
parent cbd10347a5
commit fadd59b20f
7 changed files with 104 additions and 17 deletions

View File

@@ -189,10 +189,8 @@ class Model_Payment extends ORM_OSB {
if (! $pio->check())
throw HTTP_Exception::factory(501,'Problem saving payment_item for invoice :invoice - Failed check()',array(':invoice'=>$pio->invoice_id));
$pio->save();
// @todo Mark payment as cancelled and write a memo, then...
if (! $pio->saved())
if ($pio->changed() AND ! $pio->save())
throw HTTP_Exception::factory(501,'Problem saving payment_item for invoice :invoice - Failed save()',array(':invoice'=>$pio->invoice_id));
}