payment Card first 4 payments inc. mails
This commit is contained in:
parent
c20deac3fe
commit
6e3adac4d7
38 changed files with 3063 additions and 921 deletions
|
|
@ -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';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue