$bonus=$this->getPrioritiBonus();
$paysum=round($this->getBonusSum($bonus),5);
$bonusRu=$this->getBonusRu($order,$bonus);
$order->points_bonus=$paysum;
$order->bonus=$bonusRu;
$transaction=Yii::$app->db->beginTransaction();
if($order->save()){
$client = new Client();
$body=json_encode([
"ref"=>$user->affliliateProgramCode->code,
"apiKey" => Yii::$app->params['prioriti']['pvk'],
'sum'=>$paysum,
'orderNumber'=>$order->id]);
$response = $client->post(\Yii::$app->params['prioriti']['url']['transaction'],$body, Yii::$app->params['prioriti']['headers'])->send();
if (!$response->isOk){
Yii::$app->session->setFlash('error',$response->data['message']);
$transaction->rollBack();
return false;
}
}
$transaction->commit();
return $this->redirect('/cabinet');
"name": "Exception",
"message": "Expected response code 250 but got code \"553\", with message \"553 5.7.1 Sender address rejected: not owned by auth user.\r\n\"",
"code": 553,
"type": "Swift_TransportException",
"file": "/var/www/prioritiBack/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php",
"line": 383,