Fixes from live

This commit is contained in:
Deon George
2014-05-20 21:49:52 +10:00
parent a329cc3179
commit cbd10347a5
12 changed files with 26 additions and 28 deletions

View File

@@ -61,8 +61,8 @@ class Payment_Bulk_Ezypay {
$po->checkout_data = array('transid'=>$array[2].':'.$array[3]);
$po->date_payment = strtotime(str_replace('/','-',$array[8]));
$sbo = $po->account->service_billing->where('checkout_data','=',$array[3])->find();
if (! $sbo->loaded())
$sbo = ORM::factory('Service_Billing')->where('checkout_data','=',$array[3])->find();
if (! $sbo->loaded() OR $sbo->service->account_id != $aid)
throw HTTP_Exception::factory(501,'No Service Billing Data for :aid (:pd)?',array(':aid'=>$aid,':pd'=>$array[3]));
$po->checkout_id = $sbo->checkout_id;