/** * Purchase article by user * * @param int $article_id - Purcased article ID * @return bool */ public function purchaseArticle($article_id = 0) { $res = false; $billing = new BillingClass(); $transaction = $billing->userPurchaseArticle($this, $article_id); if ($transaction instanceof Transaction) { // Add Article to My purchases list $pl = new ContentPurchase(); $res = $pl->userPurchaseArticle($this->getId(), $article_id, $transaction); } return $res; }