belongsTo('App\Models\GatewayType'); } public function setCreatedAtAttribute($value) { // to Disable created_at } public function areFeesEnabled() { return floatval($this->fee_amount) || floatval($this->fee_percent); } public function hasTaxes() { return floatval($this->fee_tax_rate1) || floatval($this->fee_tax_rate1); } public function feesToString() { $parts = []; if (floatval($this->fee_amount) != 0) { $parts[] = Utils::formatMoney($this->fee_amount); } if (floatval($this->fee_percent) != 0) { $parts[] = (floor($this->fee_percent * 1000) / 1000) . '%'; } return join(' + ', $parts); } }