/** * Adds Address for the destination set * * @param PayuAddress $current_address the address to be used as the billing * @return int returns 1 upon success */ public function setDestinationAddress(PayuAddress $current_address) { if ($current_address) { $this->destination_address = $current_address; $possible_errors = $current_address->validate(); // read errors for the current product $this->mergeErrorLogs($possible_errors); return 1; } return 0; }