belongsTo('App\Models\ShoppingOrder','shopping_order_id'); } public function payment_transactions() { return $this->hasMany('App\Models\PaymentTransaction','shopping_payment_id'); } public function getPaymentType(){ if($this->clearingtype === 'wlt') { if ($this->wallettype === 'PPE') { return 'PayPal'; } } if($this->clearingtype === 'cc') { return 'Kreditkarte'; } if($this->clearingtype === 'vor') { return 'Vorkasse'; } if($this->clearingtype === 'elv') { return 'SEPA Lastschrift'; } if($this->clearingtype === 'sb') { if ($this->onlinebanktransfertype === 'PNT') { return 'Sofort Überweisung'; } } } public function getPaymentAmount(){ return Util::formatNumber($this->amount/100)." ".$this->currency; } }