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 __('payment.paypal'); } } if($this->clearingtype === 'cc') { return __('payment.credit_card'); } if($this->clearingtype === 'vor') { return __('payment.prepayment'); } if($this->clearingtype === 'elv') { return __('payment.sepa_direct_debit'); } if($this->clearingtype === 'sb') { if ($this->onlinebanktransfertype === 'PNT') { return __('payment.sofort_bank_transfer'); } } if($this->clearingtype === 'fnc') { if ($this->onlinebanktransfertype === 'MIV') { return __('payment.purchase_on_account'); } } } public function getPaymentAmount(){ return Util::formatNumber($this->amount/100)." ".$this->currency; } }