/var/www/vhosts/nabawater/common/models
Edit: /var/www/vhosts/nabawater/common/models/OrderParcel.php (3805B)
AttributeKeyGeneratorBehaviour::class,
'attributes' => [
'order_parcel_key'
]
];
return $behaviors;
}
/**
*
* @param type $index
* @return type
*/
public function getPaymentOptionList()
{
return [
[
'type' => self::PAYMENT_OPTION_COD,
'label' => Yii::t('backend', 'COD'),
],
[
'type' => Yii::t('backend', 'Online'),
'label' => self::PAYMENT_OPTION_ONLINE
],
[
'type' => Yii::t('backend', 'Tabaogo credits'),
'label' => self::TABAOGO_CREDITS
]
];
}
/**
*
* @param integer $type
* @return string
*/
public function getPaymentOptionLabel($type)
{
$list = self::getPaymentOptionList();
foreach ($list as $value) {
if ($value['type'] === (int)$type) {
return $value['label'];
}
}
return '(not set)';
}
/**
*
* @param type $index
* @return type
*/
public function getPaymentProviderList()
{
return [
[
'type' => self::PAYMENT_SENDER,
'label' => Yii::t('backend', 'Sender'),
],
[
'type' => self::PAYMENT_RECEIVER,
'label' => Yii::t('backend', 'Receiver'),
]
];
}
/**
*
* @param integer $type
* @return string
*/
public function getPaymentProviderLabel($type)
{
$list = self::getPaymentProviderList();
foreach ($list as $value) {
if ($value['type'] === (int)$type) {
return $value['label'];
}
}
return '(not set)';
}
/**
*
* @return array
*/
public static function getPaymentStatusList()
{
return [
[
'type' => self::PAYMENT_STATUS_PENDING,
'label' => Yii::t('backend', 'Pending')
],
[
'type' => self::PAYMENT_STATUS_SUCCESS,
'label' => Yii::t('backend', 'Success')
],
[
'type' => self::PAYMENT_STATUS_FAILURE,
'label' => Yii::t('backend', 'Failure')
],
];
}
/**
*
* @param integer $type
* @return string
*/
public function getPaymentStatusLabel($type)
{
$list = self::getPaymentStatusList();
foreach ($list as $value) {
if ($value['type'] === (int)$type) {
return $value['label'];
}
}
return '(not set)';
}
}