payment Card first 4 payments inc. mails

This commit is contained in:
Kevin Adametz 2019-02-28 18:09:54 +01:00
parent c20deac3fe
commit 6e3adac4d7
38 changed files with 3063 additions and 921 deletions

View file

@ -6,5 +6,47 @@ use Illuminate\Database\Eloquent\Model;
class ShoppingPayment extends Model
{
//
}
protected $table = 'shopping_payments';
protected $fillable = [
'shopping_order_id',
'clearingtype',
'wallettype',
'onlinebanktransfertype',
'reference',
'amount',
'currency',
];
public function shopping_order()
{
return $this->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 == 'sb') {
if ($this->onlinebanktransfertype == 'PNT') {
return 'Sofort Überweisung';
}
}
}
}