add payment method

This commit is contained in:
2016-01-17 16:21:37 +01:00
parent abb69ce92d
commit d043759b1d
20 changed files with 751 additions and 168 deletions

View File

@@ -32,6 +32,8 @@ class TicketCreate extends Ticket{
public $cart;
public $payment_method;
public function rules()
{
return [
@@ -48,6 +50,11 @@ class TicketCreate extends Ticket{
[[ 'id_account'], 'integer'],
[[ 'id_account'], 'validateAccount'],
/////////////////////
//payment_method
/////////////////////
[[ 'payment_method'], 'required'],
[[ 'payment_method'], 'integer'],
/////////////////////
//id_discount
/////////////////////
[[ 'id_discount'], 'integer'],
@@ -123,7 +130,7 @@ class TicketCreate extends Ticket{
$transfer->paid_by = \Yii::$app->user->id;
}
$transfer->status = $status;
$transfer->payment_method = $this->payment_method;
if ( isset($this->comment)){
$transfer->comment = $this->comment;